[
  {
    "path": ".git-blame-ignore-revs",
    "content": "# .git-blame-ignore-revs\n# Ran black on major files to standardize codebase\n57da386795bc94a34275b333da586f171f96d7c8\n# Ran black on tests and other ancillary python files in code\n083fb9877b507ed27136441c683ce051edf37e81\n# Ran ruff on the codebase to standardize formatting\n95b1bbe75b049c9d3bdc0346d09116b76f736472\n# ruff check --select UP007,UP045 --fix\n18ac24dbeeb09cf2ff0b9dc9825e506b3dbfa89c\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**The bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nGive a full working code snippet that can be pasted into a notebook cell or python file. Make sure to include the LLM load step so we know which model you are using.\n```python\n# put your code snippet here\n```\n\n**System info (please complete the following information):**\n - OS (e.g. Ubuntu, Windows 11, Mac OS, etc.):\n - Guidance Version (`guidance.__version__`):\n"
  },
  {
    "path": ".github/workflows/call_cpu_tests.yml",
    "content": "name: call_cpu_tests\n\non:\n  workflow_call:\n    inputs:\n      os:\n        required: true\n        type: string\n      python-version:\n        required: true\n        type: string\n      model:\n        required: true\n        type: string\n      codeCovPython:\n        required: true\n        type: string\n        default: \"3.12\"\n    secrets:\n      HF_TOKEN:\n        required: false\n      CODECOV_TOKEN:\n        required: false\n  workflow_dispatch:\n    inputs:\n      os:\n        required: false\n        type: string\n        default: \"Large_Linux\" # can instead use \"Large_Windows\" or the default OSes like \"macos-latest\"\n      python-version:\n        required: false\n        type: string\n        default: \"3.12\"\n      model:\n        required: false\n        type: string\n        default: \"transformers_gpt2_cpu\" # also try \"llamacpp_llama2_7b_cpu\", etc\n      codeCovPython:\n        required: true\n        type: string\n        default: \"3.12\"\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n\njobs:\n  cpu_tests:\n    runs-on: ${{ inputs.os }}\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python ${{ inputs.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ inputs.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Install guidance and dependencies\n        shell: bash\n        if: ${{ inputs.python-version != '3.14' }}\n        run: |\n          uv pip install --system -e .[llamacpp,transformers,onnxruntime-genai,test]\n          uv pip install --system accelerate  # required if using smaller quantizations\n      - name: Install guidance and dependencies (3.14/ONNX workaround)\n        # https://github.com/microsoft/onnxruntime/issues/26547\n        shell: bash\n        if: ${{ inputs.python-version == '3.14' }}\n        run: |\n          uv pip install --system -e .[llamacpp,transformers,test]\n          uv pip install --system accelerate  # required if using smaller quantizations\n      - name: cpu_tests for ${{ inputs.model }}\n        shell: bash\n        env:\n          HF_TOKEN: ${{ secrets.HF_TOKEN }}\n        run: |\n          pytest -vv --cov=guidance --cov-report=xml --cov-report=term-missing \\\n            --selected_model ${{ inputs.model }} \\\n            ./tests/model_integration ./tests/model_specific\n      - name: Upload coverage reports to Codecov\n        uses: codecov/codecov-action@v5\n        if: ${{ (inputs.codeCovPython == inputs.python-version) }}\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/call_gpu_tests.yml",
    "content": "name: call_gpu_tests\n\non:\n  workflow_call:\n    inputs:\n      os:\n        required: true\n        type: string\n      python-version:\n        required: true\n        type: string\n      model:\n        required: true\n        type: string\n      codeCovPython:\n        required: true\n        type: string\n        default: \"3.12\"\n    secrets:\n      HF_TOKEN:\n        required: false\n      CODECOV_TOKEN:\n        required: false\n  workflow_dispatch:\n    inputs:\n      os:\n        required: false\n        type: string\n        default: \"gpu-runner\"\n      python-version:\n        required: false\n        type: string\n        default: \"3.12\"\n      model:\n        required: false\n        type: string\n        default: \"llamacpp_llama2_7b_gpu\" # also try \"transformers_gpt2_gpu\", \"transformers_phi2_gpu\", etc\n      codeCovPython:\n        required: true\n        type: string\n        default: \"3.12\"\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n\njobs:\n  gpu_tests:\n    runs-on: ${{ inputs.os }}\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python ${{ inputs.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ inputs.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Install NVIDIA SDK\n        shell: bash\n        run: |\n          nvidia-smi\n          sudo apt-get --yes update\n          sudo apt-get --yes install cuda-toolkit-12.6\n          echo \"/usr/local/cuda-12.6/bin\" >> $GITHUB_PATH\n      - name: Install other packages\n        shell: bash\n        run: |\n          uv pip install --system accelerate gpustat\n      - name: Install guidance in ${{ inputs.os }}\n        shell: bash\n        if: ${{ inputs.python-version != '3.14' }}\n        run: |\n          CMAKE_ARGS=\"-DGGML_CUDA=on\" uv pip install --system -e .[llamacpp,transformers,onnxruntime-genai,test]\n      - name: Install guidance in ${{ inputs.os }} (3.14/ONNX workaround)\n        # https://github.com/microsoft/onnxruntime/issues/26547\n        shell: bash\n        if: ${{ inputs.python-version == '3.14' }}\n        run: |\n          CMAKE_ARGS=\"-DGGML_CUDA=on\" uv pip install --system -e .[llamacpp,transformers,test]\n      - name: Check GPU available\n        shell: bash\n        run: |\n          python -c \"import torch; assert torch.cuda.is_available()\"\n      - name: gpu_tests for ${{ inputs.model }}\n        shell: bash\n        env:\n          HF_TOKEN: ${{ secrets.HF_TOKEN }}\n        run: |\n          pytest -vv --cov=guidance --cov-report=xml --cov-report=term-missing \\\n            --selected_model ${{ inputs.model }} \\\n            ./tests/model_integration ./tests/model_specific\n      - name: Upload coverage reports to Codecov\n        uses: codecov/codecov-action@v5\n        if: ${{ (inputs.codeCovPython == inputs.python-version) }}\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/ci_credentials.yml",
    "content": "# These access secrets, so should only be run on local branches.\n\nname: CI Tests - Credentialed\npermissions:\n  contents: read\n\n\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 09:00 UTC every day\n    - cron:  '00 09 * * *'\n\njobs:\n  credentialed_tests:\n    runs-on: ubuntu-latest\n    environment: test\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n    permissions:\n      id-token: write  # for Azure CLI login\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Install guidance\n        run: |\n          uv pip install --system -e .[all,test]\n      - name: Model tests\n        env:\n          HF_TOKEN: ${{ secrets.HF_TOKEN }}\n          # Configure OpenAI\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n          # Configure environment for Azure AI Studio\n          AZUREAI_STUDIO_PHI4_ENDPOINT: ${{ vars.AZUREAI_STUDIO_PHI4_ENDPOINT }}\n          AZUREAI_STUDIO_PHI4_MODEL_NAME: ${{ vars.AZUREAI_STUDIO_PHI4_MODEL_NAME }}\n          AZUREAI_STUDIO_PHI4_KEY: ${{ secrets.AZUREAI_STUDIO_PHI4_KEY }}\n          # Do not configure the environment for Azure OpenAI, so those tests will\n          # be skipped. GitHub cannot authenticate.\n        run: |\n          pytest -vv --cov=guidance --cov-report=xml --cov-report=term-missing \\\n            ./tests/need_credentials\n      - name: Upload coverage reports to Codecov\n        uses: codecov/codecov-action@v5\n        if: ${{ (vars.CODECOV_PYTHON == matrix.python-version) }}\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/ci_docs.yml",
    "content": "# These access secrets, so should only be run on local branches.\n\nname: CI Tests - Docs\npermissions:\n  contents: read\n\n\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 07:00 UTC every day\n    - cron:  '00 07 * * *'\n\njobs:\n  check_ReadMe:\n    runs-on: Large_Linux\n    environment: test\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.14\"]\n    steps:\n    - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      uses: actions/checkout@v6\n      with:\n        ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n    - name: Set up Python ${{ matrix.python-version }}\n      uses: actions/setup-python@v6\n      with:\n        python-version: ${{ matrix.python-version }}\n    - name: Set up uv\n      uses: astral-sh/setup-uv@v7\n    - name: Install guidance\n      run: |\n        uv pip install --system -e .[all,test]\n    - name: Extract Python code\n      run: python ./scripts/extract_python_from_readme.py --input_file ./README.md --output_file ./readme.py\n    - name: Run extracted Python\n      run: python ./readme.py"
  },
  {
    "path": ".github/workflows/ci_linux.yml",
    "content": "# CI Tests which run on Linux machines\n\n# These access secrets, so should only be run on local branches.\n\n# Ideally, the CI tests would be a single workflow, but several issues\n# (especially varied OS support) mean that it is hard to keep a single\n# workflow green.\n\nname: CI Tests - Linux\npermissions:\n  contents: read\n\non:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 09:30 UTC every day\n    - cron:  '30 09 * * *'\n\n\njobs:\n  cpu_small:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        model:\n          - \"transformers_gpt2_cpu\"\n          - \"llamacpp_llama3.2_3b_cpu\"\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: Large_Linux\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}\n      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n\n  cpu_big:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        model:\n          - \"transformers_llama3_8b_cpu\"\n          - \"transformers_phi4_mini_cpu\"\n          - \"onnxruntime_phi4_mini_instruct\"\n        exclude:\n          - model: \"onnxruntime_phi4_mini_instruct\"\n            python-version: \"3.14\"  # Waiting for ONNX update\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: Large_Linux\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}\n      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n\n  gpu_tests:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        model:\n          - \"transformers_gpt2_gpu\"\n          - \"transformers_phi4_mini_gpu\"\n          - \"onnxruntime_phi4_mini_instruct\"\n        exclude:\n          # https://github.com/microsoft/onnxruntime/issues/26547\n          - model: \"onnxruntime_phi4_mini_instruct\"\n            python-version: \"3.14\"  # Waiting for ONNX update\n    uses: ./.github/workflows/call_gpu_tests.yml\n    with:\n      os: \"gpu-runner\"\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}\n      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/ci_macos.yml",
    "content": "# CI Tests which run on MacOS machines\n\n# These access secrets, so should only be run on local branches.\n\n# Ideally, the CI tests would be a single workflow, but several issues\n# (especially varied OS support) mean that it is hard to keep a single\n# workflow green.\n\n# MacOS has been a particular trouble due to the small disk space\n# allocations on all the VMs, leading to the --selected_model\n# machinery\n\nname: CI Tests - MacOS\npermissions:\n  contents: read\n\non:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 09:10 UTC every day\n    - cron:  '10 09 * * *'\n\njobs:\n  cpu_small:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\"]\n        model:\n          - \"transformers_gpt2_cpu\"\n          - \"llamacpp_llama3.2_3b_cpu\"\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: \"macos-latest\"\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}"
  },
  {
    "path": ".github/workflows/ci_windows.yml",
    "content": "# CI Tests which run on Windows machines\n\n# These access secrets, so should only be run on local branches.\n\n# Ideally, the CI tests would be a single workflow, but several issues\n# (especially varied OS support) mean that it is hard to keep a single\n# workflow green. If there is one OS likely to lag slightly in support\n# it is Windows\n\nname: CI Tests - Windows\npermissions:\n  contents: read\n\non:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 09:30 UTC every day\n    - cron:  '30 09 * * *'\n\njobs:\n  cpu_small:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        model:\n          - \"transformers_gpt2_cpu\"\n          - \"llamacpp_llama3.2_3b_cpu\"\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: \"Large_Windows\"\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}\n\n  cpu_big:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        model:\n          - \"transformers_llama3_8b_cpu\"\n          - \"transformers_phi4_mini_cpu\"\n          - \"onnxruntime_phi4_mini_instruct\"\n        exclude:\n          # https://github.com/microsoft/onnxruntime/issues/26547\n          - model: \"onnxruntime_phi4_mini_instruct\"\n            python-version: \"3.14\"  # Waiting for ONNX update\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: \"Large_Windows\"\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n    secrets:\n      HF_TOKEN: ${{ secrets.HF_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/code_quality.yml",
    "content": "name: Code Quality\n\nenv:\n  PYTHON_VERSION: \"3.12\"\n\non:\n  pull_request:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # Run at 10:00 UTC every day\n    - cron: \"00 10 * * *\"\n\n\njobs:\n  format_ruff:\n    name: Check format with ruff\n    runs-on: ubuntu-latest\n    permissions:\n      checks: write\n    steps:\n      - name: Check out repo ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ env.PYTHON_VERSION }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Do dev install\n        run: uv pip install --system -e .[dev]\n      - name: Check format with ruff\n        shell: bash\n        id: check_format\n        continue-on-error: true\n        run: |\n          if ! ruff format --check; then\n            echo \"::warning title=ruff format::Files need re-formatting (run 'ruff format .' locally)\"\n            exit 78  # no longer works in github, but would mark action step with a warning\n          fi\n      - name: Check imports with ruff\n        shell: bash\n        id: check_import\n        continue-on-error: true\n        run: |\n          # This is separate from formatting. See:\n          # https://docs.astral.sh/ruff/formatter/#sorting-imports\n          if ! ruff check --select I,RUF022; then\n            echo \"::warning title=ruff import::Files need import sorting (run 'ruff check --select I,RUF022 --fix' locally to auto-fix)\"\n            exit 78  # no longer works in github, but would mark action step with a warning\n          fi\n      - name: Mark step with a warning\n        if: ${{ steps.check_format.outcome == 'failure' || steps.check_import.outcome == 'failure' }} \n        uses: actions/github-script@v8\n        with:\n          script: |\n            await github.rest.checks.create({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              name: 'Failed ruff checks',\n              head_sha: context.sha,\n              status: 'completed',\n              conclusion: 'neutral',\n              completed_at: new Date().toISOString(),\n              output: {\n                title: 'ruff found violations',\n                summary: 'Run `ruff format . and `ruff check --select I,RUF022 --fix` locally and push the changes.'\n              }\n            })\n\n  # Have a separate workflow because we don't want to enforce this at all\n  # It will have too many errors initially and is likely to deter contributors\n  ruff-linting:\n    name: Linting with ruff\n    runs-on: ubuntu-latest\n    permissions:\n      checks: read\n    steps:\n      - name: Check out repo ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ env.PYTHON_VERSION }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Do dev install\n        run: uv pip install --system -e .[dev]\n      - name: Run ruff linting\n        shell: bash\n        continue-on-error: true\n        run: |\n          ruff check\n\n\n  run-mypy:\n    name: Run informational mypy\n    runs-on: ubuntu-latest\n    permissions:\n      checks: read\n    steps:\n      - name: Check out repo ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ env.PYTHON_VERSION }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Do guidance install\n        run: uv pip install --system -e .[all,dev]\n      - name: Get mypy type packages\n        continue-on-error: true\n        run: mypy --install-types --non-interactive guidance\n      - name: Run mypy\n        shell: bash\n        continue-on-error: true\n        run: |\n          mypy guidance\n\n          echo \"===========================================\"\n          echo \"Done\""
  },
  {
    "path": ".github/workflows/notebook_tests.yml",
    "content": "# These access secrets, so should only be run on local branches.\n\n# Not part of the regular CI run, since notebook tests seem\n# particularly flaky\n\nname: CI Tests - Notebook\n\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # * is a special character in YAML so we quote this string\n    # Run at 10:00 UTC every day\n    - cron:  '00 10 * * *'\n\njobs:\n  notebook_tests:\n    runs-on: \"Large_Linux\"\n    environment: test\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n    permissions:\n      id-token: write  # for Azure CLI login\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Install guidance\n        shell: bash\n        run: |\n          uv pip install --system -e .[all,llamacpp,test]\n      - name: Install gpustat\n        shell: bash\n        run: |\n          uv pip install --system gpustat\n      - name: Notebook tests\n        shell: bash\n        env:\n          HF_TOKEN: ${{ secrets.HF_TOKEN }}\n          # Configure OpenAI\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n        run: |\n          # Run the non-AOAI notebooks\n          pytest -vv --cov=guidance --cov-report=xml --cov-report=term-missing --cov-append \\\n            ./tests/notebooks/test_notebooks.py\n      - name: Upload coverage reports to Codecov\n        uses: codecov/codecov-action@v5\n        if: ${{ (vars.CODECOV_PYTHON == matrix.python-version) }}\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/pull_request.yml",
    "content": "name: Pull Request\n\non:\n  pull_request:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # Run at 09:00 UTC every day\n    - cron: \"00 09 * * *\"\n\njobs:\n  unit_tests:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n    runs-on: ${{ matrix.os }}\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - name: Minimal install\n        run: |\n          uv pip install --system -e .\n      - name: Attempt import\n        run: |\n          python -c \"import guidance\"\n      - name: Bigger install\n        run: |\n          uv pip install --system -e .[test-unit]\n      - name: Unit Tests\n        shell: bash\n        run: |\n          pytest -vv --cov=guidance --cov-report=xml --cov-report=term-missing \\\n            ./tests/unit\n      - name: Upload coverage reports to Codecov\n        uses: codecov/codecov-action@v5\n        if: ${{ (vars.CODECOV_PYTHON == matrix.python-version) }}\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n\n  cpu_tests:\n    strategy:\n      fail-fast: false # Don't cancel all on first failure\n      matrix:\n        os: [\"Large_Linux\"]  # , \"Large_Windows\"]\n        python-version: [\"3.10\", \"3.14\"]\n        model:\n          - \"transformers_gpt2_cpu\"\n    uses: ./.github/workflows/call_cpu_tests.yml\n    with:\n      os: ${{ matrix.os }}\n      python-version: ${{ matrix.python-version }}\n      model: ${{ matrix.model }}\n      codeCovPython: ${{ vars.CODECOV_PYTHON }}\n\n  # gpu_tests:\n  #   strategy:\n  #     fail-fast: false # Don't cancel all on first failure\n  #     matrix:\n  #       os: [\"gpu-runner\"]\n  #       python-version: [\"3.10\", \"3.13\"]\n  #       model:\n  #         - \"transformers_gpt2_gpu\"\n  #         - \"llamacpp_llama2_7b_gpu\"\n  #   uses: ./.github/workflows/call_gpu_tests.yml\n  #   with:\n  #     os: ${{ matrix.os }}\n  #     python-version: ${{ matrix.python-version }}\n  #     model: ${{ matrix.model }}\n"
  },
  {
    "path": ".github/workflows/pypi_upload.yml",
    "content": "name: Build wheels\n\non:\n  release:\n    types: [published]\n  workflow_dispatch:  # Enable manual run\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n\njobs:\n  build_wheels:\n    name: Build wheel distribution\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python 3.11\n        uses: actions/setup-python@v6\n        with:\n          python-version: '3.11'\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n\n      - name: Build bdist\n        run: |\n          uv build --wheel\n\n      - name: Upload bdist\n        uses: actions/upload-artifact@v7\n        with:\n          name: bdist_files\n          path: dist/*.whl\n\n  build_sdist:\n    name: Build source distribution\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - name: Set up Python 3.11\n        uses: actions/setup-python@v6\n        with:\n          python-version: '3.11'\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n\n      - name: Build sdist (pep517)\n        run: |\n          uv build --sdist\n\n      - name: Upload sdist\n        uses: actions/upload-artifact@v7\n        with:\n          name: sdist_files\n          path: dist/*.tar.gz\n\n\n  assemble_wheels:\n    name: Combine wheels\n    needs: [build_wheels, build_sdist]\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/download-artifact@v8\n        with:\n          name: sdist_files\n          path: dist\n      \n      - uses: actions/download-artifact@v8\n        with:\n          name: bdist_files\n          path: dist\n\n      - uses: actions/upload-artifact@v7\n        with:\n          path: ./dist/*\n          name: collected_dist_files\n\n  test_wheels:\n    name: Test Wheels\n    needs: [assemble_wheels]\n    strategy:\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-14, macos-latest]\n        python-version: [\"3.11\", \"3.12\"]\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/download-artifact@v8\n        with:\n          name: collected_dist_files\n          path: wheelhouse\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Set up uv\n        uses: astral-sh/setup-uv@v7\n      - run: uv pip install --system guidance -f ./wheelhouse/\n        name: Install guidance from wheels\n      - run: uv pip install --system transformers torch\n        name: Other installs\n      # - run: python -c \"import guidance; import transformers; lm = guidance.models.Transformers('gpt2'); lm += '1,2,3,4,5,' + guidance.gen('num', max_tokens=5, temperature=0); print(f'\\n Transformers Version:{transformers.__version__}\\n\\n{str(lm)=}\\n'); assert lm['num'].startswith('6')\"\n      #   name: Run smoke test\n\n  publish_wheels:\n    permissions:\n      id-token: write\n    name: Publish wheels on pypi\n    needs: [test_wheels]\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/download-artifact@v8\n        with:\n          name: collected_dist_files\n          path: dist\n\n      - name: Publish package to PyPI\n        uses: pypa/gh-action-pypi-publish@v1\n        if: startsWith(github.ref, 'refs/tags')\n        with:\n          user: __token__\n          password: ${{ secrets.PYPI_API_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/widget_build.yml",
    "content": "name: Widget Build\npermissions:\n  contents: read\n\non:\n  pull_request:\n  workflow_dispatch:\n    inputs:\n      commit_id:\n        description: 'Branch or Commit ID (optional)'\n        required: false\n        type: string\n  schedule:\n    # Run at 10:00 UTC every day\n    - cron: \"00 10 * * *\"\n\njobs:\n  build_widget:\n    defaults:\n      run:\n        shell: bash\n        working-directory: ./client/graphpaper-inline\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n        uses: actions/checkout@v6\n        with:\n          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}\n      - uses: actions/setup-node@v6\n        with:\n          node-version: 18\n      - name: Install dependencies\n        run: |\n          npm install\n      - name: Build\n        run: |\n          ./build-to-guidance.sh\n        "
  },
  {
    "path": ".gitignore",
    "content": "notebooks/local_scratch\n__pycache__/\n.vscode\n.vs\n.idea/\n/build\n/dist\n*.egg-info\n*.diskcache\n.ipynb_checkpoints\nnode_modules\n.eggs/\n.env\n.DS_Store\nvenv/\n.venv/\n\n# Ignore native library built by setup\nguidance/*.so\nguidance/_rust/*.so\nguidance/_rust/target/\nguidance/_rust/Cargo.lock\n*.pyd\n\nnotebooks/**/*.papermill_out.ipynb\n\n.mypy_cache/*\n\n**/scratch.*\n\n# Claude Code generated files\nCLAUDE.md\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nThis Project welcomes contributions, suggestions, and feedback. All contributions, suggestions, and feedback you submitted are accepted under the [Project's license](./LICENSE.md). You represent that if you do not own copyright in the code that you have the authority to submit it under the [Project's license](./LICENSE.md). All feedback, suggestions, or contributions are not confidential.\n\nThe Project abides by the Organization's [code of conduct](https://github.com/guidance-ai/governance/blob/main/CODE-OF-CONDUCT.md) and [trademark policy](https://github.com/guidance-ai/governance/blob/main/TRADEMARKS.md).\n\n# Development Notes\n\nWe welcome contributions to `guidance`, and this document exists to provide useful information contributors.\n\n## Developer Setup\n\nStart by creating a fresh environment with something similar to:\n```bash\nconda create --name guidancedev python=3.12\nconda activate guidancedev\n```\n\nInstall guidance (without CUDA):\n```bash\npython -m pip install -e .[all,test,llamacpp,transformers]\n```\n\nAlternatively, install guidance with CUDA support. There are various ways to do this. We recommend:\n```bash\nconda install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia\nCMAKE_ARGS=\"-DGGML_CUDA=on\" python -m pip install -e .[all,test,llamacpp,transformers]\n```\n\n## Running Tests\n\nTo run a basic test suite locally:\n```bash\npython -m pytest ./tests/\n```\nwhich runs our basic test suite.\nWhere an LLM is required, this will default to using GPT2 on the CPU.\n\nTo change that default, run\n```bash\npython -m pytest --selected_model <MODELNAME> ./tests/\n```\nwhere `<MODELNAME>` is taken from one of the selected_model_name options defined in `./tests/conftest.py`.\n\nAlternatively, the default value for `--selected_model` can be set via the `GUIDANCE_SELECTED_MODEL` environment variable.\nThis may be useful when trying to use a debugger when running `pytest`, and setting the extra command line argument in the debugger configuration is tricky.\nJust remember that the environment variable needs to be set _before_ starting PyCharm/VSCode etc.\n\n## Adding LLMs to the test matrix\n\nOur tests run on a variety of LLMs.\nThese fall into three categories: CPU-based, GPU-based and endpoint-based (which need credentials).\n\n### New CPU or GPU-based models\n\nDue to the limited resources of the regular GitHub runner machines, the LLM under test is a dimension of our test matrix (otherwise the GitHub runners will tend to run out of RAM and/or hard drive space).\nNew models should be configured in `conftest.py`.\nThe model will then be available via the `selected_model` fixture for all tests.\nIf you have a test which should only run for particular models, you can use the `selected_model_name` fixture to check, and call `pytest.skip()` if necessary.\nAn example of this is given in `test_llama_cpp.py`.\n\n### New endpoint based models\n\nIf your model requires credentials, then those will need to be added to our GitHub repository as secrets.\nThe endpoint itself (and any other required information) should be configured as environment variables too.\nWhen the test runs, the environment variables will be set, and can then be used to configure the model as required.\nSee `test_azureai_openai.py` for examples of this being done.\n\n## Formatting & Linting\n\nWe use `ruff` to format our codebase.\nTo install the correct version, run `pip install -e .[dev]`.\nYou can then run `ruff format /path/to/modified/file.py` to format the code.\nThe path can also be an entire directory, or omitted entirely to format all files beneath the current directory.\nThere are (rare) cases where manual formatting is preferable; for these [`ruff` provides pragmas for suppression](https://docs.astral.sh/ruff/formatter/#format-suppression).\nTo sort imports, use `ruff check --select I /path/to/modified/file.py --fix`.\nThese commands are run (but not enforced *yet*) in the build.\n\n\n\n---\nPart of MVG-0.1-beta.\nMade with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).\n"
  },
  {
    "path": "GOVERNANCE.md",
    "content": "# Governance Policy\n\nThis document provides the governance policy for the Project. Maintainers agree to this policy and to abide by all Project polices, including the [code of conduct](https://github.com/guidance-ai/governance/blob/main/CODE-OF-CONDUCT.md), [trademark policy](https://github.com/guidance-ai/governance/blob/main//TRADEMARKS.md), and [antitrust policy](https://github.com/guidance-ai/governance/blob/main/ANTITRUST.md) by adding their name to the [maintainers.md file](./MAINTAINERS.md).\n\n## 1. Roles.\n\nThis project may include the following roles. Additional roles may be adopted and documented by the Project.\n\n**1.1. Maintainers**. Maintainers are responsible for organizing activities around developing, maintaining, and updating the Project. Maintainers are also responsible for determining consensus. This Project may add or remove Maintainers with the approval of the current Maintainers.\n\n**1.2. Contributors**. Contributors are those that have made contributions to the Project.\n\n## 2. Decisions.\n\n**2.1. Consensus-Based Decision Making**. Projects make decisions through consensus of the Maintainers. While explicit agreement of all Maintainers is preferred, it is not required for consensus. Rather, the Maintainers will determine consensus based on their good faith consideration of a number of factors, including the dominant view of the Contributors and nature of support and objections. The Maintainers will document evidence of consensus in accordance with these requirements.\n\n**2.2. Appeal Process**. Decisions may be appealed by opening an issue and that appeal will be considered by the Maintainers in good faith, who will respond in writing within a reasonable time. If the Maintainers deny the appeal, the appeal may be brought before the Organization Steering Committee, who will also respond in writing in a reasonable time.\n\n## 3. How We Work.\n\n**3.1. Openness**. Participation is open to anyone who is directly and materially affected by the activity in question. There shall be no undue financial barriers to participation.\n\n**3.2. Balance**. The development process should balance the interests of Contributors and other stakeholders. Contributors from diverse interest categories shall be sought with the objective of achieving balance.\n\n**3.3. Coordination and Harmonization**. Good faith efforts shall be made to resolve potential conflicts or incompatibility between releases in this Project.\n\n**3.4. Consideration of Views and Objections**. Prompt consideration shall be given to the written views and objections of all Contributors.\n\n**3.5. Written procedures**. This governance document and other materials documenting this project's development process shall be available to any interested person.\n\n## 4. No Confidentiality.\n\nInformation disclosed in connection with any Project activity, including but not limited to meetings, contributions, and submissions, is not confidential, regardless of any markings or statements to the contrary.\n\n## 5. Trademarks.\n\nAny names, trademarks, logos, or goodwill developed by and associated with the Project (the \"Marks\") are controlled by the Organization. Maintainers may only use these Marks in accordance with the Organization's trademark policy. If a Maintainer resigns or is removed, any rights the Maintainer may have in the Marks revert to the Organization.\n\n## 6. Amendments.\n\nAmendments to this governance policy may be made by affirmative vote of 2/3 of all Maintainers, with approval by the Organization's Steering Committee.\n\n---\nPart of MVG-0.1-beta.\nMade with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) The Guidance Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "MAINTAINERS.md",
    "content": "# Maintainers\n\nThis document lists the Maintainers of the Project. Maintainers may be added once approved by the existing maintainers as described in the [Governance document](./GOVERNANCE.md). By adding your name to this list you are agreeing to abide by the Project governance documents and to abide by all of the Organization's polices, including the [code of conduct](https://github.com/guidance-ai/governance/blob/main/CODE-OF-CONDUCT.md), [trademark policy](https://github.com/guidance-ai/governance/blob/main/TRADEMARKS.md), and [antitrust policy](https://github.com/guidance-ai/governance/blob/main/ANTITRUST.md). If you are participating because of your affiliation with another organization (designated below), you represent that you have the authority to bind that organization to these policies.\n\n| **NAME** | **Handle** | **Affiliated Organization** |\n| --- | --- | --- |\n| Scott Lundberg | [slundberg](https://github.com/slundberg) | |\n| Harsha Nori | [Harsha-Nori](https://github.com/Harsha-Nori) | Microsoft |\n| Marco Tulio Ribeiro | [marcotcr](https://github.com/marcotcr) | Google |\n\n---\nPart of MVG-0.1-beta.\nMade with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"right\">\n  <a href=\"https://discord.gg/cjPfAK43dz\"><img src=\"https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white\" alt=\"Discord\"></a>\n  <a href=\"mailto:guidanceai@microsoft.com\"><img src=\"https://img.shields.io/badge/Email-guidanceai%40microsoft.com-0078D4?logo=microsoft-outlook&logoColor=white\" alt=\"Email\"></a>\n  <img src=\"https://img.shields.io/badge/Hours-10am--2pm%20Pacific-gray\" alt=\"Hours\">\n</div>\n<div align=\"center\"><picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/figures/guidance_logo_blue_dark.svg\">\n  <img alt=\"guidance\" src=\"docs/figures/guidance_logo_blue.svg\" width=300\">\n</picture></div>\n<br/>\n\n**Guidance is an efficient programming paradigm for steering language models.** With Guidance, you can control how output is structured and get high-quality output for your use case—*while reducing latency and cost vs. conventional prompting or fine-tuning.* It allows users to constrain generation (e.g. with regex and CFGs) as well as to interleave control (conditionals, loops, tool use) and generation seamlessly.\n\n   * [Install](#install)\n   * [Features](#features)\n\n\n## Install\nGuidance is available through PyPI and supports a variety of backends (Transformers, llama.cpp, OpenAI, etc.).\nIf you already have the backend required for your model, you can simply run\n```bash\npip install guidance\n```\n\n## Features\n\n### A Pythonic interface for language models\n\nWhen using Guidance, you can work with large language models using common Python idioms:\n\n```python\nfrom guidance import system, user, assistant, gen\nfrom guidance.models import Transformers\n\n# Could also do LlamaCpp or many other models\nphi_lm = Transformers(\"microsoft/Phi-4-mini-instruct\")\n\n# Model objects are immutable, so this is a copy\nlm = phi_lm\n\nwith system():\n    lm += \"You are a helpful assistant\"\n\nwith user():\n    lm += \"Hello. What is your name?\"\n\nwith assistant():\n    lm += gen(max_tokens=20)\n\nprint(lm)\n```\nIf run at the command line, this will produce output like:\n```\n<|system|>You are a helpful assistant<|end|><|user|>Hello. What is your name?<|end|><|assistant|>I am Phi, an AI developed by Microsoft. How can I help you today?\n```\nHowever, if running in a Jupyter notebook, then Guidance provides a widget for a richer user experience:\n\n<img src=\"docs/figures/widget_basic_example_20250703.png\" alt=\"Guidance widget showing HTML generation\" />\n\nWith Guidance, it's really easy to capture generated text:\n\n```python\n# Get a new copy of the Model\nlm = phi_lm\n\nwith system():\n    lm += \"You are a helpful assistant\"\n\nwith user():\n    lm += \"Hello. What is your name?\"\n\nwith assistant():\n    lm += gen(name=\"lm_response\", max_tokens=20)\n\nprint(f\"{lm['lm_response']=}\")\n```\n\n```\nlm['lm_response']='I am Phi, an AI developed by Microsoft. How can I help you today?'\n```\n\n### Guarantee output syntax with constrained generation\n\nGuidance provides an easy to use, yet immensely powerful syntax for constraining the output of a language model.\nFor example, a `gen()` call can be constrained to match a regular expression:\n\n```python\nlm = phi_lm\n\nwith system():\n    lm += \"You are a teenager\"\n\nwith user():\n    lm += \"How old are you?\"\n\nwith assistant():\n    lm += gen(\"lm_age\", regex=r\"\\d+\", temperature=0.8)\n\nprint(f\"The language model is {lm['lm_age']} years old\")\n```\n\n```\nThe language model is 13 years old\n```\n\nOften, we know that the output has to be an item from a list we know in advance.\nGuidance provides a `select()` function for this scenario:\n\n```python\nfrom guidance import select\n\nlm = phi_lm\n\nwith system():\n    lm += \"You are a geography expert\"\n\nwith user():\n    lm += \"\"\"What is the capital of Sweden? Answer with the correct letter.\n\n    A) Helsinki\n    B) Reykjavík \n    C) Stockholm\n    D) Oslo\n    \"\"\"\n\nwith assistant():\n    lm += select([\"A\", \"B\", \"C\", \"D\"], name=\"model_selection\")\n\nprint(f\"The model selected {lm['model_selection']}\")\n```\n\n```\nThe model selected C\n```\n\nThe constraint system offered by Guidance is extremely powerful.\nIt can ensure that the output conforms to any context free grammar (so long as the backend LLM has full support for Guidance).\nMore on this below.\n\n### Debug grammars offline (no model API calls)\n\nWhen iterating on constraints, you can validate candidate strings locally and test a full run with the `Mock` model.\n\n```python\nfrom guidance import gen\nfrom guidance.models import Mock\n\ngrammar = \"expr=\" + gen(regex=r\"\\d+([+*]\\d+)*\", name=\"expr\")\n\n# 1) Validate strings directly against the grammar\nassert grammar.match(\"expr=12+7*3\") is not None\nassert grammar.match(\"expr=12+*3\") is None\n\n# 2) Run the same grammar with a local mock model\nlm = Mock(b\"<s>expr=12+7*3\")\nlm += grammar\nprint(lm[\"expr\"])  # 12+7*3\n```\n\n### Create your own Guidance functions\n\nWith Guidance, you can create your own Guidance functions which can interact with language models.\nThese are marked using the `@guidance` decorator.\nSuppose we wanted to answer lots of multiple choice questions.\nWe could do something like the following:\n\n```python\nimport guidance\n\nfrom guidance.models import Model\n\nASCII_OFFSET = ord(\"a\")\n\n@guidance\ndef zero_shot_multiple_choice(\n    language_model: Model,\n    question: str,\n    choices: list[str],\n):\n    with user():\n        language_model += question + \"\\n\"\n        for i, choice in enumerate(choices):\n            language_model += f\"{chr(i+ASCII_OFFSET)} : {choice}\\n\"\n\n    with assistant():\n        language_model += select(\n            [chr(i + ASCII_OFFSET) for i in range(len(choices))], name=\"string_choice\"\n        )\n\n    return language_model\n```\nNow, define some questions:\n```python\nquestions = [\n    {\n        \"question\" : \"Which state has the northernmost capital?\",\n        \"choices\" : [\n            \"New South Wales\",\n            \"Northern Territory\",\n            \"Queensland\",\n            \"South Australia\",\n            \"Tasmania\",\n            \"Victoria\",\n            \"Western Australia\",\n        ],\n        \"answer\" : 1,\n    },\n    {\n        \"question\" : \"Which of the following is venomous?\",\n        \"choices\" : [\n            \"Kangaroo\",\n            \"Koala Bear\",\n            \"Platypus\",\n        ],\n        \"answer\" : 2,\n    }\n]\n```\nWe can use our decorated function like `gen()` or `select()`.\nThe `language_model` argument will be filled in for us automatically:\n```python\nlm = phi_lm\n\nwith system():\n    lm += \"You are a student taking a multiple choice test.\"\n\nfor mcq in questions:\n    lm_temp = lm + zero_shot_multiple_choice(question=mcq[\"question\"], choices=mcq[\"choices\"])\n    converted_answer = ord(lm_temp[\"string_choice\"]) - ASCII_OFFSET\n    print(lm_temp)\n    print(f\"LM Answer: {converted_answer},  Correct Answer: {mcq['answer']}\")\n```\n\n```\n<|system|>You are a student taking a multiple choice test.<|end|><|user|>Which state has the northernmost capital?\na : New South Wales\nb : Northern Territory\nc : Queensland\nd : South Australia\ne : Tasmania\nf : Victoria\ng : Western Australia\n<|end|><|assistant|>b\nLM Answer: 1,  Correct Answer: 1\n<|system|>You are a student taking a multiple choice test.<|end|><|user|>Which of the following is venomous?\na : Kangaroo\nb : Koala Bear\nc : Platypus\n<|end|><|assistant|>c\nLM Answer: 2,  Correct Answer: 2\n```\n\nGuidance functions can be composed, in order to construct a full context free grammar.\nFor example, we can create Guidance functions to build a simple HTML webpage (note that this is _not_ a full implementation of HTML).\nWe start with a simple function which will generate text which does not contain any HTML tags.\nThe function is marked as `stateless` to indicate that we intend to use it for composing a grammar:\n\n```python\n@guidance(stateless=True)\ndef _gen_text(lm: Model):\n    return lm + gen(regex=\"[^<>]+\") \n```\n\nWe can then use this function to generate text within an arbitrary HTML tag:\n```python\n@guidance(stateless=True)\ndef _gen_text_in_tag(lm: Model, tag: str):\n    lm += f\"<{tag}>\"\n    lm += _gen_text()\n    lm += f\"</{tag}>\"\n    return lm\n```\nNow, let us create the page header. As part of this, we need to generate a page title:\n```python\n@guidance(stateless=True)\ndef _gen_header(lm: Model):\n    lm += \"<head>\\n\"\n    lm += _gen_text_in_tag(\"title\") + \"\\n\"\n    lm += \"</head>\\n\"\n    return lm\n```\nThe body of the HTML page is going to be filled with headings and paragraphs.\nWe can define a function to do each:\n```python\nfrom guidance.library import one_or_more\n\n@guidance(stateless=True)\ndef _gen_heading(lm: Model):\n    lm += select(\n        options=[_gen_text_in_tag(\"h1\"), _gen_text_in_tag(\"h2\"), _gen_text_in_tag(\"h3\")]\n    )\n    lm += \"\\n\"\n    return lm\n\n@guidance(stateless=True)\ndef _gen_para(lm: Model):\n    lm += \"<p>\"\n    lm += one_or_more(\n        select(\n            options=[\n                _gen_text(),\n                _gen_text_in_tag(\"em\"),\n                _gen_text_in_tag(\"strong\"),\n                \"<br />\",\n            ],\n        )\n    )\n    lm += \"</p>\\n\"\n    return lm\n```\nNow, the function to define the body of the HTML itself:\n```python\n@guidance(stateless=True)\ndef _gen_body(lm: Model):\n    lm += \"<body>\\n\"\n    lm += one_or_more(select(options=[_gen_heading(), one_or_more(_gen_para())]))\n    lm += \"</body>\\n\"\n    return lm\n```\nNext, we come to the function which generates the complete HTML page.\nWe add the HTML start tag, then generate the header, then body, and then append the ending HTML tag:\n```python\n@guidance(stateless=True)\ndef _gen_html(lm: Model):\n    lm += \"<html>\\n\"\n    lm += _gen_header()\n    lm += _gen_body()\n    lm += \"</html>\\n\"\n    return lm\n```\nFinally, we provide a user-friendly wrapper, which will allow us to:\n- Set the temperature of the generation\n- Capture the generated page from the Model object\n```python\nfrom guidance.library import capture, with_temperature\n\n@guidance(stateless=True)\ndef make_html(\n    lm,\n    name: str | None = None,\n    *,\n    temperature: float = 0.0,\n):\n    return lm + capture(\n        with_temperature(_gen_html(), temperature=temperature),\n        name=name,\n    )\n```\nNow, use this to generate a simple webpage:\n```python\nlm = phi_lm\n\nwith system():\n    lm += \"You are an expert in HTML\"\n\nwith user():\n    lm += \"Create a simple and short web page about your life story.\"\n\nwith assistant():\n    lm += make_html(name=\"html_text\", temperature=0.7)\n```\n\nWhen running in a Jupyter Notebook so that the widget is active, we get the following output:\n\n<img src=\"docs/figures/widget_make_html_20250703.png\" alt=\"Guidance widget showing HTML generation with token fast-forwarding\" />\n\nNote the varying highlighting of the generation.\nThis is showing another of Guidance's capabilities: fast-forwarding of tokens.\nThe constraints imposed by a grammar often mean that some tokens are known in advance.\nGuidance doesn't need the model to generate these; instead it can insert them into the generation.\nThis saves forward passes through the model, and hence reduces GPU usage.\nFor example, in the above HTML generation, Guidance always knows the last opening tag.\nIf the last opened tag was `<h1>` (for example), then as soon as the model generates `</`, Guidance can fill in `h1>` without needing the model to perform a forward pass.\n\n### Generating JSON\n\nA JSON schema is actually a context free grammar, and hence it can be used to constrain an LLM using Guidance.\nThis is a common enough case that Guidance provides special support for it.\nA quick sample, based on a Pydantic model:\n```python\nimport json\nfrom pydantic import BaseModel, Field\n\nfrom guidance import json as gen_json\n\nclass BloodPressure(BaseModel):\n    systolic: int = Field(gt=300, le=400)\n    diastolic: int = Field(gt=0, le=20)\n    location: str = Field(max_length=50)\n    model_config = dict(extra=\"forbid\")\n\nlm = phi_lm\n\nwith system():\n    lm += \"You are a doctor taking a patient's blood pressure taken from their arm\"\n\nwith user():\n    lm += \"Report the blood pressure\"\n\nwith assistant():\n    lm += gen_json(name=\"bp\", schema=BloodPressure)\n\nprint(f\"{lm['bp']=}\")\n\n# Use Python's JSON library\nloaded_json = json.loads(lm[\"bp\"])\nprint(json.dumps(loaded_json, indent=4))\n\n# Use Pydantic\nresult = BloodPressure.model_validate_json(lm[\"bp\"])\nprint(result.model_dump_json(indent=8))\n```\n```\nlm['bp']='{\"systolic\": 301, \"diastolic\": 15, \"location\": \"arm\"}'\n{\n    \"systolic\": 301,\n    \"diastolic\": 15,\n    \"location\": \"arm\"\n}\n{\n        \"systolic\": 301,\n        \"diastolic\": 15,\n        \"location\": \"arm\"\n}\n```\nNote that the generated blood pressure is not one the model will have seen for a human.\nWhen generating JSON, a substantial number of tokens can often be fast-forwarded, due to the structural constraints imposed by the schema.\n"
  },
  {
    "path": "client/graphpaper-inline/.gitignore",
    "content": "node_modules/\nbuild/\n.DS_Store\ntest-results/\nplaywright-report/"
  },
  {
    "path": "client/graphpaper-inline/build-to-guidance.sh",
    "content": "#!/bin/bash\nset -x\n\nnpm run build\ncp dist/index.html ../../guidance/resources/graphpaper-inline.html\n"
  },
  {
    "path": "client/graphpaper-inline/dist/.gitignore",
    "content": "*\n!.gitignore"
  },
  {
    "path": "client/graphpaper-inline/package.json",
    "content": "{\n    \"name\": \"graphpaper\",\n    \"version\": \"0.0.1\",\n    \"scripts\": {\n        \"build\": \"rollup -c\",\n        \"dev\": \"rollup -c -w\",\n        \"start\": \"sirv dist --port 3000\"\n    },\n    \"devDependencies\": {\n        \"@rollup/plugin-commonjs\": \"^26.0.1\",\n        \"@rollup/plugin-node-resolve\": \"^15.2.3\",\n        \"@rollup/plugin-terser\": \"^0.4.4\",\n        \"@rollup/plugin-typescript\": \"^11.1.6\",\n        \"@tailwindcss/postcss\": \"^4.1.8\",\n        \"@types/d3-scale\": \"^4.0.8\",\n        \"@types/d3-scale-chromatic\": \"^3.0.3\",\n        \"@types/dompurify\": \"^3.0.5\",\n        \"@types/video.js\": \"^7.3.58\",\n        \"autoprefixer\": \"^10.4.20\",\n        \"cssnano\": \"^7.0.5\",\n        \"postcss\": \"^8.4.41\",\n        \"rollup\": \"^4.21.0\",\n        \"rollup-plugin-copy\": \"^3.5.0\",\n        \"rollup-plugin-html-bundle\": \"^0.0.3\",\n        \"rollup-plugin-livereload\": \"^2.0.5\",\n        \"rollup-plugin-postcss\": \"^4.0.2\",\n        \"rollup-plugin-serve\": \"^1.1.1\",\n        \"rollup-plugin-svelte\": \"^7.2.2\",\n        \"sirv-cli\": \"^2.0.2\",\n        \"svelte\": \"^4.2.18\",\n        \"svelte-preprocess\": \"^6.0.2\",\n        \"tailwindcss\": \"^4.1.11\",\n        \"tslib\": \"^2.6.3\",\n        \"typescript\": \"^5.5.4\"\n    },\n    \"dependencies\": {\n        \"d3-interpolate\": \"^3.0.1\",\n        \"d3-scale\": \"^4.0.2\",\n        \"d3-scale-chromatic\": \"^3.1.0\",\n        \"dompurify\": \"^3.1.7\",\n        \"tailwind-scrollbar\": \"^4.0.2\",\n        \"video.js\": \"^8.21.0\"\n    }\n}\n"
  },
  {
    "path": "client/graphpaper-inline/postcss.config.js",
    "content": "module.exports = {\n    plugins: {\n        '@tailwindcss/postcss': {},\n        autoprefixer: {},\n        cssnano: { preset: 'default' }\n    }\n}"
  },
  {
    "path": "client/graphpaper-inline/rollup.config.mjs",
    "content": "import svelte from 'rollup-plugin-svelte';\nimport { sveltePreprocess } from 'svelte-preprocess';\nimport resolve from '@rollup/plugin-node-resolve';\nimport commonjs from '@rollup/plugin-commonjs';\nimport terser from '@rollup/plugin-terser';\nimport typescript from '@rollup/plugin-typescript';\nimport postcss from 'rollup-plugin-postcss';\nimport livereload from 'rollup-plugin-livereload';\n// @ts-ignore\nimport serve from 'rollup-plugin-serve';\n// @ts-ignore\nimport htmlBundle from 'rollup-plugin-html-bundle';\nimport copy from 'rollup-plugin-copy';\n\nconst production = !process.env.ROLLUP_WATCH;\n\nexport default [{\n\tinput: 'src/main.js',\n\toutput: {\n\t\tformat: 'iife',\n\t\tname: 'app',\n\t\tfile: 'build/bundle.js',\n\t\tsourcemap: !production,\n\t},\n\tplugins: [\n\t\ttypescript(),\n\t\tsvelte({\n\t\t\tcompilerOptions: {\n\t\t\t\tdev: !production\n\t\t\t},\n\t\t\tpreprocess: sveltePreprocess()\n\t\t}),\n\t\tresolve({\n\t\t\tbrowser: true,\n\t\t\tdedupe: importee => importee === 'svelte' || importee.startsWith('svelte/'),\n\t\t\textensions: ['.svelte', '.mjs', '.ts', '.js', '.json', '.node']\n\t\t}),\n\t\tcommonjs(),\n\t\tpostcss(),\n\t\tcopy({\n\t\t\ttargets: [\n\t\t\t\t{ src: 'src/template.html', dest: 'build' }\n\t\t\t]\n\t\t}),\n\t\thtmlBundle({\n\t\t\ttemplate: 'build/template.html',\n\t\t\ttarget: production ? 'dist/index.html' : 'build/index.html',\n\t\t\ttargetElement: 'body',\n\t\t\tinline: production\n\t\t}),\n\t\t!production && serve('build'),\n\t\t!production && livereload('build'),\n\t\tproduction && terser()\n\t],\n\twatch: {\n\t\tclearScreen: false\n\t}\n}];"
  },
  {
    "path": "client/graphpaper-inline/src/App.svelte",
    "content": "<!-- Main app that handles token rendering and metrics.\n\nThis has bidirectional communication between the guidance server (usually Jupyter kernel) and client.\nFor upcoming features, we won't be able to send all details over the wire, and will need to operate on client request.\n-->\n<script lang=\"ts\">\n  import './main.css';\n  import TokenGrid from './TokenGrid.svelte';\n  import ResizeListener from './ResizeListener.svelte';\n  import {\n    clientmsg,\n    type GuidanceMessage,\n    isAudioOutput,\n    isBacktrack,\n    isClientReadyAckMessage,\n    isExecutionCompletedMessage,\n    isExecutionStartedMessage,\n    isImageOutput,\n    isMetricMessage, isOutputRequestAckMessage,\n    isResetDisplayMessage,\n    isRoleCloserInput,\n    isRoleOpenerInput,\n    isTextOutput,\n    isTokenOutput,\n    isTraceMessage,\n    isVideoOutput,\n    kernelmsg,\n    type NodeAttr,\n    state,\n    Status,\n    type StitchMessage\n  } from './stitch';\n  import StitchHandler from './StitchHandler.svelte';\n  import { onMount } from 'svelte';\n  import MetricRecord from './MetricRecord.svelte';\n  import Select from './Select.svelte';\n  import { metricDefs } from './metrics';\n  import type { MetricVal } from './interfaces';\n  // import { mockNodeAttrs } from './mocks';\n\n  let isDarkMode = false;\n  \n  interface AppState {\n    components: Array<NodeAttr>,\n    status: Status,\n    metrics: Record<string, MetricVal>,\n    shownMetrics: Array<string>,\n    requireFullReplay: boolean,\n    currentMessageId: number,\n    backtrackCount: number,\n    resetCount: number,\n  }\n  let appState: AppState = {\n    components: [],\n    status: Status.Running,\n    shownMetrics: [],\n    metrics: {\n      'status': Status.Running,\n      'wall time': 0,\n      'consumed': 0,\n      'token reduction': 0,\n      'avg latency': 0,\n      'cpu': [0., 0., 0., 0., 0.],\n      'gpu': [0., 0., 0., 0., 0.],\n      'ram': 0,\n      'vram': 0,\n    },\n    requireFullReplay: true,\n    currentMessageId: -1,\n    backtrackCount: 0,\n    resetCount: 0,\n  };\n\n  let bgField: string = 'Type';\n  let underlineField: string = 'Probability';\n\n  const handleMessage = (msg: GuidanceMessage): void => {\n    // console.log(\"Received GuidanceMessage:\", msg);\n\n    // Duplicates can randomly occur from ipywidget layer.\n    if (appState.currentMessageId === msg.message_id) {\n      console.log(`Duplicate message detected: ${msg.message_id}`)\n      return;\n    } else {\n      appState.currentMessageId = msg.message_id;\n    }\n\n    if (isTraceMessage(msg)) {\n      if (isTokenOutput(msg.node_attr)) {\n        // console.log(msg.node_attr);\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isTextOutput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isRoleOpenerInput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isRoleCloserInput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isAudioOutput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isImageOutput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isVideoOutput(msg.node_attr)) {\n        appState.components = [...appState.components, msg.node_attr];\n      } else if (isBacktrack(msg.node_attr)) {\n        let numBacktrack = msg.node_attr.n_tokens;\n        console.log(`Backtracking ${numBacktrack} tokens.`);\n        appState.components = appState.components.slice(0, -numBacktrack);\n        appState.backtrackCount += 1;\n      } else {\n        // console.log(\"Unknown trace msg node_attr: \", msg)\n      }\n    } else if (isExecutionStartedMessage(msg)) {\n      appState.requireFullReplay = false;\n    } else if (isOutputRequestAckMessage(msg)) {\n      appState.requireFullReplay = false;\n    } else if (isClientReadyAckMessage(msg)) {\n      // Do nothing -- server will handle replay.\n    } else if (isResetDisplayMessage(msg)) {\n      appState.components = [];\n      appState.status = appState.status !== Status.Error ? Status.Running : appState.status;\n      appState.backtrackCount = 0;\n      appState.resetCount += 1;\n    } else if (isMetricMessage(msg)) {\n      const name = msg.name;\n      const value = msg.value;\n\n      if (name in appState.metrics && name in metricDefs) {\n        let currVal = appState.metrics[name];\n        const metricDef = metricDefs[name];\n        if (metricDef.isScalar === false) {\n          if (value.constructor === Array) {\n            appState.metrics[name] = value;\n          } else {\n            currVal = currVal as Array<any>;\n            appState.metrics[name] = [...currVal.slice(1), value as string | number];\n          }\n        } else if (metricDef.isScalar === true) {\n          appState.metrics[name] = value;\n        } else {\n          console.error(`Cannot handle metric: ${name}: ${value}.`);\n        }\n\n        // NOTE(nopdive): Need to update status too.\n        if (name === 'status') {\n          appState.status = value as Status;\n        }\n      }\n    } else if (isExecutionCompletedMessage(msg)) {\n      appState.status = Status.Done;\n\n      // Good time to save state.\n      const savedState = JSON.stringify(appState);\n      const stateMessage: StitchMessage = {\n        type: 'state',\n        content: savedState,\n      };\n      state.set(stateMessage);\n\n      // console.log(appState.components);\n    }\n\n    // Force reactivity update\n    appState = { ...appState };\n  };\n\n  $: if ($state !== undefined && $state.content !== '') {\n    // console.log(\"Client state received.\")\n    appState = JSON.parse($state.content);\n  }\n  $: if ($kernelmsg !== undefined && $kernelmsg.content !== '') {\n    const msg = JSON.parse($kernelmsg.content);\n    handleMessage(msg);\n  }\n  $: {\n    if (appState.status === Status.Running) {\n      appState.shownMetrics = [\n        'status',\n        // 'wall time',\n        'cpu',\n        'ram',\n        'gpu',\n        'vram',\n      ];\n    } else {\n      appState.shownMetrics = [\n        'status',\n        'consumed',\n        'token reduction',\n        'avg latency',\n        // 'wall time',\n      ];\n    }\n  }\n\n  let requestOutputIfNoMessages = () => {\n    if (appState.components.length === 0) {\n      console.log(\"No messages received: requesting output.\")\n      const msg: StitchMessage = {\n        type: 'clientmsg',\n        content: JSON.stringify({ 'class_name': 'OutputRequestMessage', 'identifier': '' })\n      };\n      clientmsg.set(msg);\n    }\n  };\n\n  onMount(() => {\n    const msg: StitchMessage = {\n      type: 'init_stitch',\n      content: ''\n    };\n    clientmsg.set(msg);\n\n    setTimeout(requestOutputIfNoMessages, 200 * 2);\n\n    // Listen for theme messages from parent\n    const handleThemeMessage = (event: MessageEvent) => {\n      if (event.data?.type === 'theme' && event.data?.theme === 'dark') {\n        isDarkMode = true;\n        document.documentElement.classList.add('dark');\n        console.log('[Guidance Widget] ✅ Dark mode applied via postMessage');\n      }\n    };\n    \n    window.addEventListener('message', handleThemeMessage);\n    \n    return () => {\n      window.removeEventListener('message', handleThemeMessage);\n    };\n  });\n</script>\n\n<svelte:head>\n  <title>graphpaper</title>\n  <meta name=\"description\" content=\"graphpaper\" />\n</svelte:head>\n\n<StitchHandler />\n<ResizeListener />\n<div class=\"w-full\">\n  <nav class=\"sticky top-0 z-50 bg-white dark:bg-gray-900\">\n    <section class=\"\">\n      <div class=\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\">\n        <!-- Controls -->\n        <span class=\"flex mr-2\">\n          <Select values={[\"None\", \"Type\", \"Probability\", \"Latency (ms)\"]} classes=\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\"\n                  defaultValue={\"Type\"}\n                  on:select={(selected) => bgField = selected.detail} />\n          <Select values={[\"None\", \"Probability\", \"Latency (ms)\"]} classes=\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\"\n                  defaultValue={\"Probability\"} on:select={(selected) => underlineField = selected.detail} />\n        </span>\n        <!-- Metrics -->\n        <!-- Commenting out scrollbar until it seems like it's actually necessary. Shows up all the time and looks ugly on website. -->\n        <!-- <span class=\"flex mr-4 text-gray-300 dark:text-gray-400 overflow-x-scroll scrollbar-thin scrollbar-track-gray-100 dark:scrollbar-track-gray-800 scrollbar-thumb-gray-200 dark:scrollbar-thumb-gray-700\"> -->\n        <span class=\"flex mr-4 text-gray-300 dark:text-gray-400\">\n          {#each appState.shownMetrics as name}\n            <MetricRecord value={appState.metrics[name]} metricDef={metricDefs[name]} />\n          {/each}\n        </span>\n      </div>\n    </section>\n  </nav>\n\n  <!-- Content pane -->\n  <section class=\"w-full min-h-40\">\n    <TokenGrid components={appState.components}\n               isCompleted={['Done', 'Error'].includes(appState.status)}\n               isError={appState.status === Status.Error}\n               bgField={bgField} underlineField={underlineField} requireFullReplay=\"{appState.requireFullReplay}\"\n               backtrackCount={appState.backtrackCount}\n               resetCount={appState.resetCount}\n               isDarkMode={isDarkMode} />\n  </section>\n</div>\n"
  },
  {
    "path": "client/graphpaper-inline/src/CustomAudio.svelte",
    "content": "<script lang=\"ts\">\n  import { onMount } from \"svelte\";\n  import type { MediaNode } from \"./interfaces\";\n\n  // Add proper TypeScript types\n  export let audioData: MediaNode; // Base64 data (without the data URL header)\n\n  let audio: HTMLAudioElement;\n  let isPlaying: boolean = false;\n  let progress: number = 0;\n  let duration: number = 0;\n  let currentTime: number = 0;\n  let volume: number = 1;\n  let isMuted: boolean = false;\n  let showVolumeSlider: boolean = false;\n  let waveformCanvas: HTMLCanvasElement;\n\n  // Store waveform data globally so we don't have to recompute it\n  let waveformData: any[] = [];\n  let maxAmp = 0;\n\n  // Decode the audio, downsample it, and draw the waveform onto the canvas.\n  // Track mouse position for optional hover preview\n  let hoverPosition = -1;\n\n  function togglePlay() {\n    if (audio.paused) {\n      audio.play();\n      isPlaying = true;\n    } else {\n      audio.pause();\n      isPlaying = false;\n    }\n  }\n\n  function seek(event: MouseEvent) {\n    const container = event.currentTarget as HTMLElement;\n    if (container == null) {\n      console.error(\"Null seek event target\");\n      return;\n    }\n    const seekPosition =\n      (event.offsetX / container.offsetWidth) * audio.duration;\n    audio.currentTime = seekPosition;\n  }\n\n  function changeVolume(event: Event) {\n    const target = event.target as HTMLInputElement;\n    if (target == null) {\n      console.error(\"Null change volume event target\");\n      return;\n    }\n    volume = parseFloat(target.value);\n\n    // If we're adjusting volume, we're unmuting\n    if (isMuted && volume > 0) {\n      isMuted = false;\n    }\n\n    // Apply volume or mute\n    audio.volume = isMuted ? 0 : volume;\n  }\n\n  $: if (audio) {\n    // Reactively update audio volume when isMuted changes\n    audio.volume = isMuted ? 0 : volume;\n  }\n\n  function formatTime(seconds: number) {\n    const min = Math.floor(seconds / 60);\n    const sec = Math.floor(seconds % 60);\n    return `${min}:${sec < 10 ? \"0\" : \"\"}${sec}`;\n  }\n\n  // Helper: convert base64 string to ArrayBuffer\n  function base64ToArrayBuffer(base64: string) {\n    const binaryString = atob(base64);\n    const len = binaryString.length;\n    const bytes = new Uint8Array(len);\n    for (let i = 0; i < len; i++) {\n      bytes[i] = binaryString.charCodeAt(i);\n    }\n    return bytes.buffer;\n  }\n\n  function setHoverPosition(event: MouseEvent) {\n    const container = event.currentTarget as HTMLElement;\n    if (container == null) {\n      console.error(\"Null hover event target\");\n      return;\n    }\n    hoverPosition = (event.offsetX / container.offsetWidth) * 100;\n  }\n\n  function clearHoverPosition() {\n    hoverPosition = -1;\n  }\n\n  // Add these new variables\n  let staticWaveformCanvas: HTMLCanvasElement;\n  let hasRenderedStatic = false;\n  let animationFrameId: number | null = null;\n\n  // Modified drawWaveform function\n  async function drawWaveform() {\n    if (!audioData || !waveformCanvas) return;\n\n    const canvas = waveformCanvas;\n    canvas.width = canvas.clientWidth;\n    canvas.height = canvas.clientHeight;\n    const width = canvas.width;\n    const height = canvas.height;\n    const ctx = canvas.getContext(\"2d\");\n    if (ctx == null) return;\n\n    // Keep existing waveform data computation code\n    if (waveformData.length === 0) {\n      const audioContext = new AudioContext();\n      const arrayBuffer = base64ToArrayBuffer(audioData.value);\n      try {\n        const decodedData = await audioContext.decodeAudioData(arrayBuffer);\n        const rawData = decodedData.getChannelData(0); // use first channel\n\n        // Downsample the raw data to one value per pixel\n        const samples = width;\n        const blockSize = Math.floor(rawData.length / samples);\n        waveformData = new Array(samples);\n        for (let i = 0; i < samples; i++) {\n          let sum = 0;\n          for (let j = 0; j < blockSize; j++) {\n            sum += Math.abs(rawData[i * blockSize + j]);\n          }\n          waveformData[i] = sum / blockSize;\n        }\n\n        // Find maximum amplitude for normalization\n        maxAmp = Math.max(...waveformData);\n        if (maxAmp === 0) maxAmp = 1; // Prevent division by zero\n      } catch (error) {\n        console.error(\"Error decoding audio for waveform:\", error);\n        return;\n      }\n    }\n\n    // Create static canvas for unplayed portions if needed\n    if (!hasRenderedStatic) {\n      staticWaveformCanvas = document.createElement(\"canvas\");\n      staticWaveformCanvas.width = width;\n      staticWaveformCanvas.height = height;\n      const staticCtx = staticWaveformCanvas.getContext(\"2d\");\n\n      if (staticCtx) {\n        // Draw all bars in unplayed state\n        const barWidth = 1.5;\n        const gap = 1;\n        const totalBars = Math.floor(width / (barWidth + gap));\n\n        for (let i = 0; i < totalBars; i++) {\n          const dataIndex = Math.floor((i / totalBars) * waveformData.length);\n          const normalizedAmp = waveformData[dataIndex] / maxAmp;\n\n          const barHeight = normalizedAmp * height * 0.8;\n          const y = (height - barHeight) / 2;\n          const x = i * (barWidth + gap);\n\n          staticCtx.fillStyle = \"#E5E5E5\"; // Light gray for unplayed\n          staticCtx.beginPath();\n          staticCtx.roundRect(x, y, barWidth, barHeight, 1);\n          staticCtx.fill();\n        }\n        hasRenderedStatic = true;\n      }\n    }\n\n    // Clear and redraw\n    ctx.clearRect(0, 0, width, height);\n\n    // Draw static background\n    if (hasRenderedStatic) {\n      ctx.drawImage(staticWaveformCanvas, 0, 0);\n    }\n\n    // Calculate progress pixel and draw played portion\n    const progressPixel = Math.floor((progress / 100) * width);\n    const barWidth = 2;\n    const gap = 1;\n    const totalBars = Math.floor(width / (barWidth + gap));\n\n    // Only draw played bars if there's actual progress\n    if (progress > 0) {\n      const barsToRedraw = Math.ceil(progressPixel / (barWidth + gap));\n\n      for (let i = 0; i < barsToRedraw; i++) {\n        const dataIndex = Math.floor((i / totalBars) * waveformData.length);\n        const normalizedAmp = waveformData[dataIndex] / maxAmp;\n\n        const barHeight = normalizedAmp * height * 0.8;\n        const y = (height - barHeight) / 2;\n        const x = i * (barWidth + gap);\n\n        ctx.fillStyle = \"#717171\"; // Gray for played portion\n        ctx.beginPath();\n        ctx.roundRect(x, y, barWidth, barHeight, 1);\n        ctx.fill();\n      }\n    }\n\n    // Draw progress indicator if playing\n    if (progress > 0) {\n      ctx.beginPath();\n      ctx.moveTo(progressPixel, 0);\n      ctx.lineTo(progressPixel, height);\n      ctx.strokeStyle = \"rgba(80, 80, 80, 0.7)\";\n      ctx.lineWidth = 2;\n      ctx.stroke();\n    }\n\n    // Draw hover indicator (keep as is)\n    if (hoverPosition >= 0) {\n      const hoverPixel = Math.floor((hoverPosition / 100) * width);\n      ctx.beginPath();\n      ctx.moveTo(hoverPixel, 0);\n      ctx.lineTo(hoverPixel, height);\n      ctx.strokeStyle = \"rgba(0, 0, 0, 0.3)\";\n      ctx.lineWidth = 1;\n      ctx.stroke();\n    }\n  }\n\n  // Simplified updateProgress function\n  function updateProgress() {\n    if (audio) {\n      progress = (audio.currentTime / audio.duration) * 100;\n      currentTime = audio.currentTime;\n      duration = audio.duration || 0;\n    }\n  }\n\n  // New renderLoop function\n  function renderLoop() {\n    if (isPlaying) {\n      updateProgress();\n    }\n\n    // Always draw waveform for hover effects\n    drawWaveform();\n\n    animationFrameId = requestAnimationFrame(renderLoop);\n  }\n\n  // Updated handleEnded function\n  function handleEnded() {\n    isPlaying = false;\n    progress = 0;\n    currentTime = 0;\n\n    // Force waveform reset\n    hasRenderedStatic = false;\n    drawWaveform();\n  }\n\n  // Updated onMount\n  onMount(() => {\n    // Initial waveform drawing\n    drawWaveform();\n\n    // Start animation loop\n    renderLoop();\n\n    // Add resize observer\n    const resizeObserver = new ResizeObserver(() => {\n      hasRenderedStatic = false;\n      drawWaveform();\n    });\n\n    if (waveformCanvas) {\n      resizeObserver.observe(waveformCanvas);\n    }\n\n    return () => {\n      if (waveformCanvas) {\n        resizeObserver.disconnect();\n      }\n      if (animationFrameId) {\n        cancelAnimationFrame(animationFrameId);\n      }\n    };\n  });\n</script>\n\n<div\n  class=\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\"\n>\n  <!-- Main player content -->\n  <div class=\"flex flex-col gap-2\">\n    <!-- Top row with play button, volume control, and waveform -->\n    <div class=\"flex items-center gap-1\">\n      <!-- Play Button -->\n      <button\n        class=\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\"\n        on:click={togglePlay}\n        aria-label=\"Toggle playback\"\n      >\n        {#if isPlaying}\n          <svg class=\"fill-white dark:fill-gray-900 w-5 h-5\" viewBox=\"0 0 24 24\">\n            <rect x=\"7\" y=\"6\" width=\"3\" height=\"12\" rx=\"1\" />\n            <rect x=\"14\" y=\"6\" width=\"3\" height=\"12\" rx=\"1\" />\n          </svg>\n        {:else}\n          <svg class=\"fill-white dark:fill-gray-900 w-5 h-5\" viewBox=\"0 0 24 24\">\n            <path d=\"M8 5.14v14l11-7-11-7z\" />\n          </svg>\n        {/if}\n      </button>\n\n      <!-- Volume Control (moved next to play button) -->\n      <div\n        class=\"relative\"\n        on:mouseenter={() => (showVolumeSlider = true)}\n        on:mouseleave={() => (showVolumeSlider = false)}\n        role=\"group\"\n        aria-label=\"Volume controls\"\n      >\n        <!-- Volume Button -->\n        <button\n          class=\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\"\n          on:click={() => (isMuted = !isMuted)}\n          aria-label={isMuted ? \"Unmute\" : \"Mute\"}\n          aria-pressed={isMuted}\n        >\n          <svg class=\"w-5 h-5\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n            {#if isMuted || volume === 0}\n              <!-- Muted icon -->\n              <path\n                d=\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\"\n              ></path>\n            {:else if volume < 0.5}\n              <!-- Low volume icon -->\n              <path d=\"M7 9v6h4l5 5V4l-5 5H7z\"></path>\n            {:else}\n              <!-- High volume icon -->\n              <path\n                d=\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\"\n              ></path>\n            {/if}\n          </svg>\n        </button>\n\n        <!-- Volume Slider (appears on hover) -->\n        {#if showVolumeSlider}\n          <div\n            class=\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\"\n            role=\"slider\"\n            aria-label=\"Volume\"\n            aria-valuemin=\"0\"\n            aria-valuemax=\"100\"\n            aria-valuenow={volume * 100}\n          >\n            <div class=\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\">\n              <input\n                type=\"range\"\n                min=\"0\"\n                max=\"1\"\n                step=\"0.01\"\n                bind:value={volume}\n                on:input={changeVolume}\n                class=\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\"\n                aria-label=\"Volume\"\n              />\n              <div\n                class=\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\"\n                style=\"width: {volume * 100}%\"\n              ></div>\n              <div\n                class=\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\"\n                style=\"left: calc({volume * 100}% - 6px); top: -2px\"\n              ></div>\n            </div>\n          </div>\n        {/if}\n      </div>\n\n      <!-- Waveform Canvas (clickable) -->\n      <div\n        class=\"flex-grow relative cursor-pointer\"\n        on:click={seek}\n        on:mousemove={setHoverPosition}\n        on:mouseleave={clearHoverPosition}\n        on:keydown={(e) => {\n          // Add keyboard controls for seeking\n          if (e.key === \"ArrowRight\") {\n            audio.currentTime = Math.min(audio.duration, audio.currentTime + 5);\n          } else if (e.key === \"ArrowLeft\") {\n            audio.currentTime = Math.max(0, audio.currentTime - 5);\n          }\n        }}\n        role=\"slider\"\n        tabindex=\"0\"\n        aria-label=\"Audio timeline\"\n        aria-valuemin=\"0\"\n        aria-valuemax=\"100\"\n        aria-valuenow={progress}\n      >\n        <canvas bind:this={waveformCanvas} class=\"w-full h-12\"></canvas>\n      </div>\n\n      <!-- Time Display -->\n      <div class=\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\">\n        {formatTime(currentTime)} / {formatTime(duration)}\n      </div>\n    </div>\n  </div>\n\n  <!-- Hidden audio element -->\n  <audio\n    bind:this={audio}\n    on:timeupdate={updateProgress}\n    on:ended={handleEnded}\n    src={`data:audio/${audioData.format};base64,` + audioData.value}\n    class=\"hidden\"\n  ></audio>\n</div>\n"
  },
  {
    "path": "client/graphpaper-inline/src/CustomVideo.svelte",
    "content": "<script lang=\"ts\">\n  import \"video.js/dist/video-js.css\";\n  import videojs from \"video.js\";\n  import { onMount, onDestroy } from \"svelte\";\n  import type { MediaNode } from \"./interfaces\";\n\n  export let videoData: MediaNode;\n  let videoElement: HTMLVideoElement;\n  let player: any;\n\n  onMount(() => {\n    // Debug log\n    console.log(\"videoElement exists?\", !!videoElement);\n\n    if (videoElement) {\n      // Add a small delay to ensure DOM is ready\n      setTimeout(() => {\n        try {\n          player = videojs(videoElement, {\n            controls: true,\n            fluid: true,\n            playsinline: true,\n            controlBar: {\n                fullscreenToggle: true\n            }\n          });\n          console.log(\"Player initialized successfully\");\n        } catch (e) {\n          console.error(\"Failed to initialize player:\", e);\n        }\n      }, 0);\n    } else {\n      console.error(\"Video element not found during mount\");\n    }\n  });\n\n  onDestroy(() => {\n    if (player) {\n      player.dispose();\n    }\n  });\n</script>\n\n<div class=\"video-container\">\n  <video bind:this={videoElement} class=\"video-js\" playsinline allow=\"fullscreen\" controls>\n    <source src={`data:video/${videoData.format};base64,${videoData.value}`} type=\"video/mp4\" />\n  </video>\n</div>\n\n<style>\n  .video-container {\n    width: 500px; /* Todo: make this more dynamic */\n  }\n</style>\n"
  },
  {
    "path": "client/graphpaper-inline/src/MetricRecord.svelte",
    "content": "<!-- Each metric is displayed as a card. -->\n<script lang=\"ts\">\n  import { type MetricDef, type MetricVal } from './interfaces';\n  import Sparkline from './Sparkline.svelte';\n\n  export let metricDef: MetricDef;\n  export let value: MetricVal;\n\n  const minibarPadding = {\n    'left': 0,\n    'right': 0,\n    'top': 5,\n    'bottom': 3\n  };\n</script>\n\n<style>\n    .dot-divider:not(:last-child)::after {\n        content: \"•\"; /* Dot separator */\n        color: #d1d5db; /* Dot color light mode */ \n    }\n    .dark .dot-divider:not(:last-child)::after {\n        color: #6b7280; /* Dot color dark mode */\n        margin-left: 0.5rem;\n    }\n</style>\n\n<span class={`dot-divider flex items-center text-xs whitespace-nowrap px-1`} title=\"{metricDef.description}\">\n    <span>\n        {#if value.constructor === Array}\n            <span class={`text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]`}>{metricDef.name}</span>\n            <Sparkline values={value} svgClass={\"w-8 h-4 inline\"} padding={minibarPadding} />\n        {:else}\n            <span class={`text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]`}>{metricDef.name}</span>\n            {#if typeof value === \"number\"}\n                <span class={`font-medium text-gray-700 dark:text-gray-300 `}>{value.toFixed(metricDef.precision)}\n                  {#if metricDef.units !== ''}\n                    <span class=\"\">{metricDef.units}</span>\n                  {/if}\n                </span>\n            {:else}\n                <span class={`font-medium text-center text-gray-700 dark:text-gray-300 `}>{value}\n                  {#if metricDef.units !== ''}\n                    <span class=\"\">{metricDef.units}</span>\n                  {/if}\n                </span>\n          {/if}\n        {/if}\n    </span>\n</span>"
  },
  {
    "path": "client/graphpaper-inline/src/ResizeListener.svelte",
    "content": "<!-- Handles resizing of content, especially important for jupyter notebooks. -->\n<script lang=\"ts\">\n    import { onMount, onDestroy } from 'svelte';\n    import { clientmsg, type StitchMessage} from \"./stitch\";\n\n    const INTERVAL_MS = 20;\n    let interval: any = null;\n    let htmlElem: any;\n\n    onMount(() => {\n        htmlElem = document.querySelector('html');\n        window.addEventListener(\"load\", () => {\n            let prevHeight = 0;\n\n            interval = setInterval(() => {\n                const height = htmlElem.getBoundingClientRect().height;\n                if (height !== prevHeight && htmlElem.checkVisibility()) {\n                    const msg: StitchMessage = {\n                        'type': 'resize',\n                        'content': {\n                            height: `${height}px`,\n                            width: '100%'\n                        }\n                    };\n                    clientmsg.set(msg);\n                }\n            }, INTERVAL_MS);\n        });\n    });\n    onDestroy(() => {\n        clearInterval(interval);\n    });\n</script>"
  },
  {
    "path": "client/graphpaper-inline/src/Select.svelte",
    "content": "<!-- Custom select dropdown -->\n<script lang=\"ts\">\n    import { clickOutside } from \"./clickoutside\";\n    import { createEventDispatcher } from 'svelte';\n\n    export let classes: string = \"\";\n    export let values: Array<string> = [];\n    export let defaultValue: string = \"\";\n\n    let selected = defaultValue;\n    let showList = false;\n\n    const dispatch = createEventDispatcher();\n\n    const onDropdownClick = (_: MouseEvent) => {\n        showList = !showList;\n    };\n    const onOutClick = (_: MouseEvent) => {\n        showList = false;\n    };\n    const selectOption = (option: string) => {\n        selected = option;\n        showList = false;\n        dispatch('select', selected);\n    }\n</script>\n\n<div class=\"relative\" use:clickOutside on:outclick={onOutClick}>\n    <button use:clickOutside on:click={onDropdownClick}>\n        <span class={`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${classes}`}>\n            <span class=\"\">\n                {selected}\n            </span>\n            <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4\">\n                <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n            </svg>\n        </span>\n    </button>\n    {#if showList}\n        <ul role=\"listbox\" class=\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\">\n            {#each values as value, i}\n                <li class={`w-full px-4 py-1 ${i === 0 ? \"mt-1\" : \"\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`} role=\"option\" aria-selected=\"false\" on:click={(_) => selectOption(value)} on:keypress={(_) => {}}>{value}</li>\n            {/each}\n        </ul>\n    {/if}\n</div>\n"
  },
  {
    "path": "client/graphpaper-inline/src/Sparkline.svelte",
    "content": "<!-- Sparkline for tracking distributions or values over time scaled from 0 to 1. -->\n\n<script lang=\"ts\">\n  import { scaleLinear } from 'd3-scale';\n\n  export let values;\n  export let svgClass: string;\n  export let padding = {\n    'left': 0,\n    'right': 0,\n    'top': 0,\n    'bottom': 0\n  };\n  $: typedValues = values as Array<number>;\n\n  let height = 0;\n  let width = 0;\n  $: xScale = scaleLinear()\n    .domain([0, typedValues.length-1])\n    .range([padding.left, padding.left + width - padding.right]);\n\n  $: yScale = scaleLinear()\n    .domain([0, 1])\n    .range([height - padding.bottom, padding.top]);\n\n  $: pathData = typedValues.map((v, i) => ({\n    x: xScale(i),\n    y: yScale(v),\n  }))\n</script>\n\n<div class=\"inline-block font-medium text-gray-700 dark:text-gray-300\" bind:clientHeight={height} bind:clientWidth={width}>\n  <svg class={svgClass}>\n    <g>\n      <path d=\"{pathData.map((v, i) => `${i === 0 ? 'M' : 'L'} ${v.x} ${v.y}`).join(' ')}\" fill=\"none\" stroke-width=\"1.25\" stroke=\"#374151\" class=\"stroke-gray-700 dark:stroke-gray-300\"/>\n    </g>\n  </svg>\n</div>"
  },
  {
    "path": "client/graphpaper-inline/src/StitchHandler.svelte",
    "content": "<!-- Handles stitch client and kernel messages. -->\n<script lang=\"ts\">\n    import type { Unsubscriber } from 'svelte/store';\n    import { kernelmsg, clientmsg, type StitchMessage, state } from './stitch';\n    import { onMount, onDestroy } from 'svelte';\n\n    const handleMessage = (event: MessageEvent<any>) => {\n        if (event.source === window.parent && 'type' in event.data) {\n            if (event.data.type === 'kernelmsg') {\n                let stitchMessage: StitchMessage = event.data;\n                kernelmsg.set(stitchMessage);\n            } else if (event.data.type === 'init_state') {\n                let stitchMessage: StitchMessage = event.data;\n                state.set(stitchMessage);\n                const clientReadyMsg: StitchMessage = {\n                    type: 'clientmsg',\n                    content: JSON.stringify({ 'class_name': 'ClientReadyMessage' })\n                };\n                clientmsg.set(clientReadyMsg);\n            }\n        }\n    };\n\n    let unsubscribeClient: Unsubscriber | null = null;\n    let unsubscribeState: Unsubscriber | null = null;\n    onMount(() => {\n        unsubscribeClient = clientmsg.subscribe((msg) => {\n            if (msg !== undefined) {\n                window.parent.postMessage(msg, \"*\");\n            }\n        });\n        unsubscribeState = state.subscribe((msg) => {\n            if (msg !== undefined) {\n                window.parent.postMessage(msg, \"*\");\n            }\n        });\n    });\n    onDestroy(() => {\n        if (unsubscribeClient) {\n            unsubscribeClient();\n        }\n        if (unsubscribeState) {\n            unsubscribeState();\n        }\n    });\n</script>\n\n<svelte:window on:message={handleMessage} />"
  },
  {
    "path": "client/graphpaper-inline/src/TokenGrid.svelte",
    "content": "<!-- Token grid that exposes each token and hover info. -->\n<script lang=\"ts\">\n  import {\n    isRoleOpenerInput,\n    isRoleCloserInput,\n    isTokenOutput,\n    isTextOutput,\n    isAudioOutput,\n    type NodeAttr,\n    type RoleOpenerInput,\n    isImageOutput,\n    isVideoOutput,\n    type AudioOutput,\n    type VideoOutput,\n    type ImageOutput,\n  } from \"./stitch\";\n  import CustomAudio from \"./CustomAudio.svelte\";\n  import CustomVideo from \"./CustomVideo.svelte\";\n  import TokenGridItem from \"./TokenGridItem.svelte\";\n  import {\n    type FlatToken,\n    type TokenCallback,\n    type MultimodalNode,\n    type MediaType,\n  } from \"./interfaces\";\n  import { longhover } from \"./longhover\";\n  import DOMPurify from \"dompurify\";\n\n  import {interpolateGreens, interpolateBlues} from \"d3-scale-chromatic\";\n\n  export let components: Array<NodeAttr>;\n  export let isCompleted: boolean;\n  export let isError: boolean;\n  export let requireFullReplay: boolean = false;\n  export let bgField: string = \"Token\";\n  export let underlineField: string = \"Probability\";\n  export let backtrackCount: number = 0;\n  export let resetCount: number = 0;\n  export let isDarkMode: boolean = false;\n\n  let underline: TokenCallback = (_: FlatToken) => \"\";\n  let bg: TokenCallback = (_: FlatToken) => \"\";\n\n  const tokenDisplayValue = (x: FlatToken, s: string) => {\n    if (s === \"Probability\") {\n      return x.prob?.toFixed(3);\n    } else if (s === \"Latency (ms)\") {\n      return x.latency_ms?.toFixed(0);\n    } else if (s === \"Type\") {\n      if (x.is_input) {\n        return \"Input\";\n      } else if (x.is_force_forwarded) {\n        return \"Forwarded\";\n      } else if (x.is_generated) {\n        return \"Generated\";\n      }\n    } else if (s === \"None\") {\n      return \"\";\n    }\n  };\n\n  const getBrightness = (rgba: string) => {\n    const rgbMatch = rgba.match(/rgba?\\(\\s*(\\d+),\\s*(\\d+),\\s*(\\d+)/);\n    if (!rgbMatch) {\n      console.error(\"Invalid RGBA format.\");\n      return 0;\n    }\n\n    const r = parseInt(rgbMatch[1], 10);\n    const g = parseInt(rgbMatch[2], 10);\n    const b = parseInt(rgbMatch[3], 10);\n    return r * 0.299 + g * 0.587 + b * 0.114;\n  };\n\n  const getTextColor = (backgroundColor: string) => {\n    const brightness = getBrightness(backgroundColor);\n    return brightness > 186 ? \"rgba(0, 0, 0, 1)\" : \"rgba(255, 255, 255, 1)\"; // Black for light bg, white for dark bg\n  };\n\n  const bgStyle = (\n    x: number | undefined,\n    color?: ((x: number) => string) | undefined\n  ) => {\n    if (x === undefined) {\n      return \"\";\n    }\n\n    // let colorVal = interpolateYlOrRd(x * 0.85);\n    let colorVal = interpolateBlues(x);\n    if (color !== undefined) {\n      colorVal = color(x);\n    }\n    let textColor = getTextColor(colorVal);\n    return `background-color: ${colorVal}; color: ${textColor};`;\n  };\n\n  const underlineStyle = (\n    x: number | undefined,\n    color?: ((x: number) => string) | undefined\n  ) => {\n    if (x === undefined) {\n      return \"\";\n    }\n\n    let colorVal = interpolateGreens(x * 0.7);\n    if (color !== undefined) {\n      colorVal = color(x);\n    }\n    return `border-bottom-color: ${colorVal};`;\n  };\n\n  const bgTokenStyle = (x: FlatToken, darkMode: boolean) => {\n    let color = \"\";\n    \n    if (x.is_input) {\n      color = \"rgba(255, 255, 255, 0)\";\n    } else if (x.is_force_forwarded) {\n      color = darkMode ? \"rgba(88, 119, 173, 1)\" : \"rgba(243, 244, 246, 1)\";\n    } else if (x.is_generated) {\n      color = darkMode ? \"rgba(88, 119, 173, 1)\" : \"rgba(229, 231, 235, 1)\";\n    } else {\n      // console.log(`ERROR: token ${x.text} does not have emit flags.`);\n      // Make slightly off white for error detection without console spam\n      color = \"rgba(255, 255, 254, 0)\";\n    }\n    return `background-color: ${color};`;\n  };\n\n  function findTargetWords(\n    text: string,\n    targetWords: string[]\n  ): [number, number, string][] {\n    // NOTE(nopdive): Not the most efficient approach, but there aren't many special words anyway.\n\n    const results: [number, number, string][] = [];\n    for (const targetWord of targetWords) {\n      let start = 0;\n      while ((start = text.indexOf(targetWord, start)) !== -1) {\n        results.push([start, start + targetWord.length, targetWord]);\n        start += targetWord.length;\n      }\n    }\n\n    results.sort((a, b) => (a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]));\n    return results;\n  }\n\n  const checkOverlapped = (\n    tokenStart: number,\n    tokenEnd: number,\n    matchStart: number,\n    matchEnd: number\n  ) => {\n    let overlapped = false;\n    let noSpecialOverride = false;\n\n    if (tokenStart <= matchStart && tokenEnd - 1 >= matchStart) {\n      // Match with token leading\n      overlapped = true;\n    } else if (tokenStart <= matchEnd - 1 && tokenEnd >= matchEnd) {\n      // Match with token trailing\n      overlapped = true;\n\n      // Visually looks bad when next word is also greyed out.\n      noSpecialOverride = true;\n    } else if (tokenStart >= matchStart && tokenEnd <= matchEnd) {\n      // Match with token equal or within\n      overlapped = true;\n    }\n\n    return [overlapped, noSpecialOverride];\n  };\n\n  let multimodalNodes: MultimodalNode[] = [];\n  let tokens: Array<FlatToken> = [];\n  let activeOpenerRoles: Array<RoleOpenerInput> = [];\n  let activeCloserRoleText: Array<string> = [];\n  let specialSet: Set<string> = new Set<string>();\n  let namedRoleSet: Record<string, string> = {};\n  let displayedRoles: Set<string> = new Set<string>();\n  let roleCounters: Record<string, number> = {};\n  let currentTokenIndex: number = 0;\n  let statCounter: Record<string, number> = {};\n  let lastBacktrackCount: number = 0;\n  let lastResetCount: number = 0;\n  \n  // Reset currentTokenIndex and clear tokens when backtracking occurs\n  $: if (backtrackCount !== lastBacktrackCount) {\n    currentTokenIndex = 0;\n    tokens = [];  // Clear existing tokens\n    multimodalNodes = [];  // Clear existing media\n    activeOpenerRoles = [];  // Reset role tracking\n    activeCloserRoleText = [];  // Reset role tracking\n    specialSet.clear();  // Clear special token set\n    namedRoleSet = {};  // Clear named role mapping\n    displayedRoles.clear();  // Clear displayed roles tracking\n    roleCounters = {};  // Clear role counters\n    lastBacktrackCount = backtrackCount;\n  }\n  \n  // Reset state when ResetDisplayMessage is received\n  $: if (resetCount !== lastResetCount) {\n    currentTokenIndex = 0;\n    tokens = [];\n    multimodalNodes = [];\n    activeOpenerRoles = [];\n    activeCloserRoleText = [];\n    specialSet.clear();\n    namedRoleSet = {};\n    displayedRoles.clear();\n    roleCounters = {};\n    lastResetCount = resetCount;\n  }\n  \n  $: {\n    if (components.length === 0) {\n      // Reset\n      tokens = []\n      multimodalNodes = [];\n      activeOpenerRoles = [];\n      activeCloserRoleText = [];\n      specialSet.clear();\n      namedRoleSet = {};\n      displayedRoles.clear();\n      roleCounters = {};\n      currentTokenIndex = 0;\n    } else if (currentTokenIndex > components.length) {\n      // Handle case where components were removed (e.g., after reset + partial replay)\n      currentTokenIndex = components.length;\n    }\n\n    for (; currentTokenIndex < components.length; currentTokenIndex += 1) {\n      const nodeAttr = components[currentTokenIndex];\n      const createMediaNode = (\n        mediaType: MediaType,\n        node: AudioOutput | VideoOutput | ImageOutput\n      ): MultimodalNode => {\n        return {\n          type: \"media\",\n          data: {\n            type: mediaType,\n            value: node.value,\n            format: node.format,\n            context: {\n              roleStack: [...activeOpenerRoles], // Clone current role stack\n              index: currentTokenIndex,\n            },\n          },\n        };\n      };\n\n      if (isRoleOpenerInput(nodeAttr)) {\n        activeOpenerRoles.push(nodeAttr);\n        activeCloserRoleText.push(nodeAttr.closer_text || \"\");\n        \n        // Increment counter for this role type\n        const roleName = nodeAttr.name || \"\";\n        roleCounters[roleName] = (roleCounters[roleName] || 0) + 1;\n      } else if (isRoleCloserInput(nodeAttr)) {\n        // Close the most recent role\n        if (activeOpenerRoles.length > 0) {\n          activeOpenerRoles.pop();\n          activeCloserRoleText.pop();\n        }\n      } else if (isAudioOutput(nodeAttr)) {\n        multimodalNodes.push(createMediaNode(\"audio\", nodeAttr));\n      } else if (isImageOutput(nodeAttr)) {\n        multimodalNodes.push(createMediaNode(\"image\", nodeAttr));\n      } else if (isVideoOutput(nodeAttr)) {\n        multimodalNodes.push(createMediaNode(\"video\", nodeAttr));\n      } else if (isTokenOutput(nodeAttr) || (isTextOutput(nodeAttr) && !nodeAttr.value.includes(\"<|im_start|>\") && !nodeAttr.value.includes(\"<|im_end|>\"))) {\n        // console.log(\"Processing token:\", nodeAttr.value, \"Active roles:\", activeOpenerRoles.map(r => r.name));\n        if (activeOpenerRoles.length === 0) {\n          if (\n            activeCloserRoleText.length !== 0 &&\n            activeCloserRoleText[activeCloserRoleText.length - 1] ===\n              nodeAttr.value\n          ) {\n            const token: FlatToken = {\n              text: nodeAttr.value,\n              prob: isTokenOutput(nodeAttr) ? nodeAttr.token.prob : 0,\n              latency_ms: nodeAttr.latency_ms,\n              role: \"\",\n              special: true,\n              is_input: nodeAttr.is_input,\n              is_force_forwarded: nodeAttr.is_force_forwarded,\n              is_generated: nodeAttr.is_generated,\n              is_masked: isTokenOutput(nodeAttr) ? nodeAttr.token.masked : false,\n              top_k: (isTokenOutput(nodeAttr) && nodeAttr.top_k !== null) ? nodeAttr.top_k.map(t => ({\n                text: t.token,\n                prob: t.prob,\n                is_masked: t.masked,\n                latency_ms: 0,\n              })) : undefined,\n            };\n            specialSet.add(token.text);\n            // TODO: handle interleaving tokens with multimodal data\n            // multimodalNodes.push({ type: \"token\", data: token });\n            statCounter[\"latency.max\"] = Math.max(token.latency_ms, statCounter[\"latency.max\"] || 0);\n            tokens.push(token)\n            activeCloserRoleText.pop();\n          } else {\n            const token: FlatToken = {\n              text: nodeAttr.value,\n              prob: isTokenOutput(nodeAttr) ? nodeAttr.token.prob : 0,\n              latency_ms: nodeAttr.latency_ms,\n              role: \"\",\n              special: false,\n              is_input: nodeAttr.is_input,\n              is_force_forwarded: nodeAttr.is_force_forwarded,\n              is_generated: nodeAttr.is_generated,\n              is_masked: isTokenOutput(nodeAttr) ? nodeAttr.token.masked : false,\n              top_k: (isTokenOutput(nodeAttr) && nodeAttr.top_k !== null) ? nodeAttr.top_k.map(t => ({\n                text: t.token,\n                prob: t.prob,\n                is_masked: t.masked,\n                latency_ms: 0,\n              })) : undefined,\n            };\n            // multimodalNodes.push({ type: \"token\", data: token });\n            statCounter[\"latency.max\"] = Math.max(token.latency_ms, statCounter[\"latency.max\"] || 0);\n            tokens.push(token);\n          }\n        } else {\n          const activeOpenerRole =\n            activeOpenerRoles[activeOpenerRoles.length - 1];\n          \n          // Check if this is a role marker token (like \"<|im_start|>assistant\\n\")\n          const isRoleMarker = nodeAttr.value.includes(\"<|im_start|>\") || \n                              nodeAttr.value.includes(\"<|im_end|>\");\n          \n          if (isRoleMarker) {\n            // Hide role marker tokens - don't add to display\n            specialSet.add(nodeAttr.value);\n          } else {\n            // Check if we've already displayed this role section\n            const roleName = activeOpenerRole.name || \"\";\n            const roleCount = roleCounters[roleName] || 0;\n            const roleKey = `${roleName}-${roleCount}`;\n            const shouldShowRole = !displayedRoles.has(roleKey);\n            \n            if (shouldShowRole) {\n              displayedRoles.add(roleKey);\n            }\n            \n            const token: FlatToken = {\n              text: nodeAttr.value,\n              prob: isTokenOutput(nodeAttr) ? nodeAttr.token.prob : 0,\n              latency_ms: nodeAttr.latency_ms,\n              role: shouldShowRole ? (activeOpenerRole.name || \"\") : \"\",\n              special: false,\n              is_input: nodeAttr.is_input, \n              is_force_forwarded: nodeAttr.is_force_forwarded,\n              is_generated: nodeAttr.is_generated,\n              is_masked: isTokenOutput(nodeAttr) ? nodeAttr.token.masked : false,\n              top_k: (isTokenOutput(nodeAttr) && nodeAttr.top_k !== null) ? nodeAttr.top_k.map(t => ({\n                text: t.token,\n                prob: t.prob,\n                is_masked: t.masked,\n                latency_ms: 0,\n              })) : undefined,\n            };\n            statCounter[\"latency.max\"] = Math.max(token.latency_ms, statCounter[\"latency.max\"] || 0);\n            tokens.push(token);\n          }\n        }\n            }\n        }\n        // NOTE(nopdive): Often the closer text is missing at the end of output.\n        if (activeOpenerRoles.length !== 0 || activeCloserRoleText.length !== 0) {\n            // console.log(\"Opener and closer role texts did not balance.\")\n        }\n\n    // Visual updates\n    if (!isCompleted || isError) {\n      underline = (_: FlatToken) => \"border: none;\";\n    } else if (underlineField === \"Probability\") {\n      underline = (x: FlatToken) => underlineStyle(x.prob);\n    } else if (underlineField === \"Latency (ms)\") {\n      underline = (x: FlatToken) =>\n        underlineStyle(\n          Math.log(x.latency_ms) / Math.log(statCounter[\"latency.max\"])\n        );\n    } else {\n      underline = (_: FlatToken) => \"border: none;\";\n    }\n\n    if (!isCompleted || isError) {\n      // bg = (_: Token) => \"\";\n      bg = (x: FlatToken) => bgTokenStyle(x, isDarkMode);\n    } else if (bgField === \"Type\") {\n      bg = (x: FlatToken) => bgTokenStyle(x, isDarkMode);\n    } else if (bgField === \"Probability\") {\n      bg = (x: FlatToken) => bgStyle(x.prob);\n    } else if (bgField === \"Latency (ms)\") {\n      bg = (x: FlatToken) =>\n        bgStyle(Math.log(x.latency_ms) / Math.log(statCounter[\"latency.max\"]));\n      console.log(statCounter[\"latency.max\"]);\n    } else {\n      bg = (_: FlatToken) => \"\";\n    }\n\n    // End bookkeeping (svelte)\n    isCompleted = isCompleted;\n    isError = isError;\n    components = components;\n    multimodalNodes = multimodalNodes;\n    tokens = tokens;\n  }\n\n  let tooltip: HTMLElement;\n  let tooltipX = 0;\n  let tooltipY = 0;\n  let tooltipToken: FlatToken;\n  const mouseLongHoverDuration = 200;\n\n  const handleLongMouseOver = (event: CustomEvent<MouseEvent>) => {\n    const target = event.detail.target as HTMLElement;\n    if (target.matches(\".token-grid-item\")) {\n      const index = target.dataset.index;\n      const positionXOffset = 15;\n      const positionYOffset = 10;\n\n      // Add tooltip\n      const rect = target.getBoundingClientRect();\n      tooltipX = rect.left + window.scrollX + rect.width / 2 + positionXOffset;\n      tooltipY = rect.bottom + window.scrollY + positionYOffset;\n      \n      const indexNum = Number(index);\n    //   const node = multimodalNodes[indexNum];\n    //   if (node.type === \"token\") {\n      tooltipToken = tokens[indexNum];\n      \n      // Show tooltip first to get accurate dimensions\n      tooltip.style.display = \"block\";\n      \n      // Use requestAnimationFrame to ensure dimensions are calculated after render\n      requestAnimationFrame(() => {\n        // Adjust if near edge of viewport\n        const tooltipRect = tooltip.getBoundingClientRect();\n        \n        // Check right edge\n        if (tooltipX + tooltipRect.width > window.innerWidth) {\n          tooltipX = window.innerWidth - tooltipRect.width - 10;\n        }\n        \n        // Check bottom edge - this is the key fix for first hover\n        if (tooltipY + tooltipRect.height > window.innerHeight) {\n          // Position above the element instead of below\n          tooltipY = rect.top + window.scrollY - tooltipRect.height - positionYOffset;\n        }\n        \n        // Ensure tooltip stays within left edge\n        if (tooltipX < 10) {\n          tooltipX = 10;\n        }\n        \n        // Ensure tooltip stays within top edge\n        if (tooltipY < 10) {\n          tooltipY = 10;\n        }\n      });\n    }\n  };\n\n  let highlightPrevColor = \"\";\n  let highlightPrevBackgroundColor = \"\";\n  const handleMouseOver = (event: MouseEvent) => {\n    const target = event.target as HTMLElement;\n    if (target.matches(\".token-grid-item\")) {\n      const index = target.dataset.index;\n      const siblingsIncludingSelf = target.parentElement?.querySelectorAll(\n        `.token-grid-item[data-index=\"${index}\"]`\n      );\n\n      // Add highlight\n      if (siblingsIncludingSelf) {\n        for (const sibling of siblingsIncludingSelf) {\n          const htmlSibling = sibling as HTMLElement;\n          highlightPrevColor = htmlSibling.style.color;\n          highlightPrevBackgroundColor = htmlSibling.style.backgroundColor;\n          htmlSibling.style.color = \"rgb(249, 250, 251)\";\n          htmlSibling.style.backgroundColor = \"rgb(75, 85, 99)\";\n        }\n      }\n    }\n  };\n\n  const handleLongMouseOut = (event: CustomEvent<MouseEvent>) => {\n    const target = event.detail.target as HTMLElement;\n    if (target.matches(\".token-grid-item\")) {\n      // Remove tooltip\n      tooltip.style.display = \"none\";\n    }\n  };\n\n  const handleMouseOut = (event: MouseEvent) => {\n    const target = event.target as HTMLElement;\n    if (target.matches(\".token-grid-item\")) {\n      const index = target.dataset.index;\n      const siblingsIncludingSelf = target.parentElement?.querySelectorAll(\n        `.token-grid-item[data-index=\"${index}\"]`\n      );\n\n      // Remove highlight\n      if (siblingsIncludingSelf) {\n        for (const sibling of siblingsIncludingSelf) {\n          const htmlSibling = sibling as HTMLElement;\n          htmlSibling.style.color = highlightPrevColor;\n          htmlSibling.style.backgroundColor = highlightPrevBackgroundColor;\n        }\n      }\n    }\n  };\n  const doNothing = (_: any) => {};\n  const renderText = (text: string) => {\n    return DOMPurify.sanitize(\n      text\n        .replaceAll(\" \", \"&nbsp;\")\n        .replaceAll(\"\\t\", \"\\\\t\")\n        .replaceAll(\"\\n\", \"\\\\n\")\n    );\n  };\n  const continuationToken = {\n    text: \"...\",\n    prob: 1,\n    latency_ms: 0,\n    role: \"\",\n    special: false,\n    is_input: true,\n    is_force_forwarded: false,\n    is_generated: true,\n  };\n</script>\n\n<!-- Tooltip -->\n<div\n  bind:this={tooltip}\n  class=\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\"\n  style=\"top: {tooltipY}px; left: {tooltipX}px; display: none;\"\n>\n  <div>\n    {#if tooltipToken}\n      <div class={`col-1 flex flex-col items-center`}>\n        <div class=\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\">\n          <div class=\"mb-5 mt-1\">\n            <TokenGridItem\n              token={tooltipToken}\n              index={-1}\n              underlineStyle={underline(tooltipToken)}\n              bgStyle={bg(tooltipToken)}\n            />\n          </div>\n          <table class=\"w-full\">\n            <tbody class=\"text-xs tracking-wider dark:text-white\">\n              {#if bgField !== \"None\"}\n                <tr>\n                  <td>\n                    <span style={bg(tooltipToken)}>\n                      {bgField}\n                    </span>\n                  </td>\n                  <td class=\"text-right dark:text-white\">\n                    <span class=\"pl-1\">\n                      {tokenDisplayValue(tooltipToken, bgField) ?? \"None\"}\n                    </span>\n                  </td>\n                </tr>\n              {/if}\n              {#if underlineField !== \"None\"}\n                <tr>\n                  <td>\n                    <span class=\"border-b-2\" style={underline(tooltipToken)}>\n                      {underlineField}\n                    </span>\n                  </td>\n                  <td class=\"text-right dark:text-white\">\n                    <span>\n                      {tokenDisplayValue(tooltipToken, underlineField) ?? \"None\"}\n                    </span>\n                  </td>\n                </tr>\n              {/if}\n            </tbody>\n          </table>\n        </div>\n        {#if tooltipToken.top_k !== undefined}\n          <hr class=\"bg-gray-400 dark:bg-gray-600 w-full my-2\" />\n          <table class=\"w-full\">\n            <thead>\n              <tr>\n                <th\n                  class={`px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide`}\n                >\n                  Candidate\n                </th>\n                <th\n                  class={`px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide`}\n                >\n                  Prob\n                </th>\n              </tr>\n            </thead>\n            <tbody>\n              {#each tooltipToken.top_k as candidate, i}\n                <tr\n                  class={`${i === 5 ? \"border-t border-dashed border-gray-300 dark:border-gray-600\" : \"\"}`}\n                >\n                  <td\n                    class={`px-1 text-left font-mono text-sm decoration-2 ${candidate.is_masked ? \"line-through\" : \"\"}`}\n                  >\n                    <span class=\"bg-gray-200 dark:bg-gray-700 dark:text-white\">\n                      {@html renderText(candidate.text)}\n                    </span>\n                  </td>\n                  <td\n                    class={`px-1 text-right font-mono text-sm decoration-2 dark:text-white ${candidate.is_masked ? \"line-through\" : \"\"}`}\n                  >\n                    {candidate.prob?.toFixed(3)}\n                  </td>\n                </tr>\n              {/each}\n            </tbody>\n          </table>\n        {/if}\n      </div>\n    {:else}\n      <div class=\"text-sm border-b text-red-700 dark:text-red-400\">\n        Missing tokens will show on completion.\n      </div>\n    {/if}\n  </div>\n</div>\n\n<!-- Tokens view -->\n<div class=\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\">\n  <div class=\"px-4\">\n    <span\n      class=\"flex flex-wrap text-sm\"\n      role=\"main\"\n      use:longhover={mouseLongHoverDuration}\n      on:longmouseover={handleLongMouseOver}\n      on:longmouseout={handleLongMouseOut}\n      on:mouseover={handleMouseOver}\n      on:mouseout={handleMouseOut}\n      on:focus={doNothing}\n      on:blur={doNothing}\n    >\n      {#if requireFullReplay}\n        <TokenGridItem token={continuationToken} index={-1} />\n        <div class=\"basis-full h-2\"></div>\n      {/if}\n\n      <!-- Render tokens first -->\n      {#each tokens as token, i}\n          {#if token.role !== \"\"}\n            <!-- Add spacing before role (except for first) -->\n            {#if i > 0}\n              <div class=\"basis-full py-3\"></div>\n            {/if}\n            <!-- Force line break for role header -->\n            <div class=\"basis-full h-0\"></div>\n          {/if}\n          <TokenGridItem\n            token={token}\n            index={i}\n            underlineStyle={underline(token)}\n            bgStyle={bg(token)}\n          />\n      {/each}\n\n      {#if isCompleted === false}\n        <span\n          class=\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\">\n        >\n          &nbsp;\n        </span>\n      {/if}\n    </span>\n\n    <!-- Render media nodes afterward -->\n    {#each multimodalNodes as node}\n      {#if node.type === \"media\"}\n        {#if node.data.type == \"audio\"}\n          <div class=\"my-3\">\n            <CustomAudio audioData={node.data} />\n          </div>\n        {/if}\n        {#if node.data.type == \"video\"}\n          <div class=\"my-3\">\n            <CustomVideo videoData={node.data} />\n          </div>\n        {/if}\n        {#if node.data.type == \"image\"}\n          <div class=\"my-3\">\n            <img\n              src={`data:${node.data.format};base64,${node.data.value}`}\n              alt=\"Image output\"\n            />\n          </div>\n        {/if}\n      {/if}\n    {/each}\n  </div>\n</div>\n"
  },
  {
    "path": "client/graphpaper-inline/src/TokenGridItem.svelte",
    "content": "<!-- Token(s) within token grid -->\n<script lang=\"ts\">\n    import {type FlatToken} from \"./interfaces\";\n\n    export let token: FlatToken;\n    export let index: number;\n    export let underlineStyle: string = \"\";\n    export let bgStyle: string = \"\";\n</script>\n\n{#each token.text as ch, i}\n    {#if ch === ' '}\n        <span data-index=\"{index}\" role=\"tooltip\" class={`token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500`} style={`${underlineStyle} ${bgStyle}`}>\n            {#if i === 0}\n                <span class=\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\">\n                    {token.role}\n                </span>\n            {/if}\n            &nbsp;\n        </span>\n    {:else if ch === '\\t'}\n        <span data-index=\"{index}\" role=\"tooltip\" class={`token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500`} style={`${underlineStyle} ${bgStyle}`}>\n            {#if i === 0}\n                <span class=\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\">\n                    {token.role}\n                </span>\n            {/if}\n            \\t&nbsp;&nbsp;\n        </span>\n    {:else if ch === '\\n'}\n        <span data-index=\"{index}\" role=\"tooltip\" class={`token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500`} style={`${underlineStyle} ${bgStyle}`}>\n            {#if i === 0}\n                <span class=\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\">\n                    {token.role}\n                </span>\n            {/if}\n            \\n\n        </span>\n        <div class=\"basis-full h-full\"></div>\n    {:else}\n        <span data-index=\"{index}\" role=\"tooltip\" class={`token-grid-item inline-block mt-2 border-b-2 ${token.special ? \"text-gray-300 dark:text-gray-500\" : \"\"}`} style={`${underlineStyle} ${bgStyle}`}>\n            {#if i === 0}\n                <span class=\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\">\n                    {token.role}\n                </span>\n            {/if}\n            {ch}\n        </span>\n    {/if}\n{/each}"
  },
  {
    "path": "client/graphpaper-inline/src/clickoutside.ts",
    "content": "// Action for clicking outside an element.\n\nexport function clickOutside(node: HTMLElement) {\n\tconst handleClick = (event: MouseEvent) => {\n\t\tlet target = event.target as HTMLElement;\n\t\tif (!node.contains(target)) {\n\t\t\tnode.dispatchEvent(new CustomEvent('outclick'));\n\t\t}\n\t};\n\n\tdocument.addEventListener('click', handleClick, true);\n\n\treturn {\n\t\tdestroy() {\n\t\t\tdocument.removeEventListener('click', handleClick, true);\n\t\t}\n\t};\n}"
  },
  {
    "path": "client/graphpaper-inline/src/interfaces.ts",
    "content": "// Interfaces used within the client. This is separate to messaging interfaces.\n\nimport type { RoleOpenerInput} from \"./stitch\";\n\nexport interface MetricDef {\n    name: string,\n    units: string,\n    description: string,\n    isScalar: boolean,\n    precision: number,\n}\n\nexport type MetricVal = string | number | Array<number | string>;\n\nexport interface FlatToken {\n    text: string,\n    prob: number,\n    latency_ms: number,\n    is_input?: boolean,\n    is_force_forwarded?: boolean,\n    is_generated?: boolean,\n    role?: string,\n    special?: boolean,\n    is_masked?: boolean,\n    top_k?: Array<FlatToken>\n}\nexport declare type TokenCallback = (token: FlatToken) => string;\n\nexport interface MediaNodeContext {\n    roleStack: RoleOpenerInput[];\n    index: number;\n}\n\nexport type MediaType = \"audio\" | \"video\" | \"image\";\n\nexport interface MediaNode {\n    type: MediaType;\n    value: any;\n    format: string;\n    context: MediaNodeContext;\n}\n\nexport type MultimodalNode = \n  | { type: 'token', data: FlatToken }\n  | { type: 'media', data: MediaNode };\n"
  },
  {
    "path": "client/graphpaper-inline/src/longhover.ts",
    "content": "// Action for long mouse hovers.\n\nexport function longhover(node: HTMLElement, duration: number) {\n    let timer: any;\n\n    const handleMouseOver = (event: MouseEvent) => {\n        timer = setTimeout(() => {\n            node.dispatchEvent(new CustomEvent('longmouseover', {detail: event}));\n        }, duration);\n    };\n    const handleMouseOut = (event: MouseEvent) => {\n        clearTimeout(timer);\n        node.dispatchEvent(new CustomEvent('longmouseout', {detail: event}));\n    }\n\n    node.addEventListener('mouseover', handleMouseOver);\n    node.addEventListener('mouseout', handleMouseOut);\n\n    return {\n        update(newDuration: number) {\n            duration = newDuration\n        },\n        destroy() {\n            node.removeEventListener('mouseover', handleMouseOver);\n            node.removeEventListener('mouseout', handleMouseOut);\n        }\n    };\n}\n"
  },
  {
    "path": "client/graphpaper-inline/src/main.css",
    "content": "/* Custom CSS for web app. */\n@import \"tailwindcss\";\n@variant dark (&:where(.dark, .dark *));\n\n/* Note - Tailwind v4 uses CSS configuration */\n/* Theme customizations */\n@theme {\n  /* Custom font family */\n  --font-token: 'JetBrains Mono', monospace;\n  \n  /* Custom animation timing */\n  --animate-cpulse: cpulse 3.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/* Custom keyframes */\n@keyframes cpulse {\n  50% {\n    opacity: 0;\n  }\n}\n\n/* Any other custom styles you have */\n"
  },
  {
    "path": "client/graphpaper-inline/src/main.js",
    "content": "// Entrypoint for web app.\n\nimport App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;"
  },
  {
    "path": "client/graphpaper-inline/src/metrics.ts",
    "content": "// Metrics and their definitions.\n\nimport type { MetricDef } from './interfaces';\n\nexport const metricDefs: Record<string, MetricDef> = {\n  'status': {\n    name: '',\n    units: '',\n    description: 'Determines whether engine is running, completed or in error.',\n    isScalar: true,\n    precision: 0\n  },\n  'cpu': {\n    name: 'CPU',\n    units: '%',\n    description: 'Average utilization across CPU cores.',\n    isScalar: false,\n    precision: 1\n  },\n  'gpu': {\n    name: 'GPU',\n    units: '%',\n    description: 'Average utilization across GPUs.',\n    isScalar: false,\n    precision: 1\n  },\n  'ram': {\n    name: 'RAM',\n    units: 'GB',\n    description: 'Utilization of RAM.',\n    isScalar: true,\n    precision: 1\n  },\n  'vram': {\n    name: 'VRAM',\n    units: 'GB',\n    description: 'Utilization of video RAM.',\n    isScalar: true,\n    precision: 1\n  },\n  'wall time': {\n    name: 'Time',\n    units: 's',\n    description: 'Time taken from initial display to engine completion.',\n    isScalar: true,\n    precision: 1\n  },\n  'avg latency': {\n    name: 'Latency',\n    units: 'ms',\n    description: 'Average roundtrip latency per token',\n    isScalar: true,\n    precision: 0\n  },\n  'consumed': {\n    name: 'Used',\n    units: 'tkn',\n    description: 'Total tokens consumed by language model.',\n    isScalar: true,\n    precision: 0\n  },\n  'token reduction': {\n    name: 'Reduced',\n    units: '%',\n    description: 'Total tokens consumed by language model divided by total tokens.',\n    isScalar: true,\n    precision: 0\n  }\n};\n"
  },
  {
    "path": "client/graphpaper-inline/src/mocks.ts",
    "content": "// Mocks for interactive testing\n\nimport {type TextOutput, type RoleOpenerInput, type RoleCloserInput } from './stitch';\n\nexport const mockNodeAttrs: Array<RoleCloserInput | RoleOpenerInput | TextOutput> = [\n  {\n    \"class_name\": \"RoleOpenerInput\",\n    \"name\": \"user\",\n    \"text\": \"<|user|>\\n\",\n    \"closer_text\": \"<|end|>\\n\"\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \"<|user|>\\n\",\n    \"is_input\": true,\n    \"is_generated\": false,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \"What is the capital of France?\",\n    \"is_input\": true,\n    \"is_generated\": false,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"RoleCloserInput\",\n    \"name\": \"user\",\n    \"text\": \"<|end|>\\n\"\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \"<|end|>\\n\",\n    \"is_input\": true,\n    \"is_generated\": false,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"RoleOpenerInput\",\n    \"name\": \"assistant\",\n    \"text\": \"<|assistant|>\\n\",\n    \"closer_text\": \"<|end|>\\n\"\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \"<|assistant|>\\n\",\n    \"is_input\": true,\n    \"is_generated\": false,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" The\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" capital\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" of\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" France\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" is\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" Paris\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \".\",\n    \"is_input\": false,\n    \"is_generated\": true,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" It\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" is\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" not\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" only\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" the\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" largest\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" city\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" in\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" France\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" but\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" also\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" one\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" of\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" the\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" most\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" important\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" cultural\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" and\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" commercial\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" cent\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \"ers\",\n    \"is_input\": false,\n    \"is_generated\": true,\n    \"is_force_forwarded\": false,\n    \"latency_ms\": 0,\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" in\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  },\n  {\n    \"class_name\": \"TextOutput\",\n    \"value\": \" Europe\",\n    \"is_input\": false,\n    \"is_generated\": false,\n    \"is_force_forwarded\": true,\n    \"latency_ms\": 0\n  }\n];\n"
  },
  {
    "path": "client/graphpaper-inline/src/stitch.ts",
    "content": "// Interfaces for working with guidance messages and stitch.\n\nimport { writable } from 'svelte/store';\n\n\nexport interface NodeAttr {\n    class_name: string\n}\n\nexport interface TextOutput extends NodeAttr {\n    class_name: 'TextOutput' | 'TokenOutput',\n    value: string,\n    is_input: boolean,\n    is_generated: boolean,\n    is_force_forwarded: boolean,\n    latency_ms: number,\n}\n\nexport interface TokenOutput extends TextOutput {\n    class_name: 'TokenOutput',\n    token: Token,\n    top_k: Array<Token>,\n}\n\nexport interface Token {\n    token: string,\n    bytes: string,\n    prob: number,\n    masked: boolean,\n}\n\nexport interface Backtrack extends NodeAttr {\n    class_name: 'Backtrack',\n    n_tokens: number,\n    bytes: string,\n}\n\nexport interface ImageOutput extends NodeAttr {\n    class_name: 'ImageOutput',\n    value: string,\n    format: string,\n    is_input: boolean,\n}\n\nexport interface AudioOutput extends NodeAttr {\n    class_name: 'AudioOutput',\n    value: string,\n    format: string,\n    is_input: boolean,\n}\n\nexport interface VideoOutput extends NodeAttr {\n    class_name: 'VideoOutput',\n    value: string,\n    format: string,\n    is_input: boolean,\n}\n\nexport interface RoleOpenerInput extends NodeAttr {\n    class_name: 'RoleOpenerInput',\n    name?: string,\n    text?: string,\n    closer_text?: string,\n}\n\nexport interface RoleCloserInput extends NodeAttr {\n    class_name: 'RoleCloserInput',\n    name?: string,\n    text?: string,\n}\n\nexport interface GuidanceMessage {\n    message_id: number,\n    class_name: string,\n}\n\nexport interface TraceMessage extends GuidanceMessage {\n    class_name: 'TraceMessage',\n    trace_id: number,\n    parent_trace_id?: number,\n    node_attr?: NodeAttr,\n}\n\nexport interface ResetDisplayMessage extends GuidanceMessage {\n    class_name: 'ResetDisplayMessage'\n}\n\nexport interface ExecutionStartedMessage extends GuidanceMessage {\n    class_name: 'ExecutionStartedMessage',\n}\n\nexport interface ExecutionCompletedMessage extends GuidanceMessage {\n    class_name: 'ExecutionCompletedMessage',\n    last_trace_id?: number,\n}\n\nexport interface ClientReadyMessage extends GuidanceMessage {\n    class_name: 'ClientReadyMessage'\n}\n\nexport interface ClientReadyAckMessage extends GuidanceMessage {\n    class_name: 'ClientReadyAckMessage'\n}\n\nexport interface OutputRequestMessage extends GuidanceMessage {\n    class_name: 'OutputRequestMessage',\n    identifier: string\n}\n\nexport interface OutputRequestAckMessage extends GuidanceMessage {\n    class_name: 'OutputRequestAckMessage'\n}\n\nexport interface MetricMessage extends GuidanceMessage {\n    class_name: 'MetricMessage',\n    name: string,\n    value: number | string | Array<number> | Array<string>,\n    scalar: boolean,\n}\n\nexport interface StitchMessage {\n    type: \"resize\" | \"clientmsg\" | \"kernelmsg\" | \"state\" | \"init_state\" | \"init_stitch\",\n    content: any\n}\n\nexport function isGuidanceMessage(o: GuidanceMessage | undefined | null): o is GuidanceMessage {\n    if (o === undefined || o === null) return false;\n    return o.hasOwnProperty(\"class_name\") && o.hasOwnProperty(\"message_id\");\n}\n\nexport function isTraceMessage(o: GuidanceMessage | undefined | null): o is TraceMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"TraceMessage\";\n}\n\nexport function isBacktrack(o: NodeAttr | undefined | null): o is Backtrack {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"Backtrack\";\n}\n\nexport function isRoleOpenerInput(o: NodeAttr | undefined | null): o is RoleOpenerInput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"RoleOpenerInput\";\n}\n\nexport function isRoleCloserInput(o: NodeAttr | undefined | null): o is RoleCloserInput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"RoleCloserInput\";\n}\n\nexport function isTextOutput(o: NodeAttr | undefined | null): o is TextOutput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"TextOutput\" || o.class_name === \"TokenOutput\";\n}\n\nexport function isTokenOutput(o: NodeAttr | undefined | null): o is TokenOutput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"TokenOutput\";\n}\n\nexport function isImageOutput(o: NodeAttr | undefined | null): o is ImageOutput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"ImageOutput\";\n}\n\nexport function isAudioOutput(o: NodeAttr | undefined | null): o is AudioOutput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"AudioOutput\";\n}\n\nexport function isVideoOutput(o: NodeAttr | undefined | null): o is VideoOutput {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"VideoOutput\";\n}\n\nexport function isResetDisplayMessage(o: GuidanceMessage | undefined | null): o is ResetDisplayMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"ResetDisplayMessage\";\n}\n\nexport function isMetricMessage(o: GuidanceMessage | undefined | null): o is MetricMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"MetricMessage\";\n}\n\nexport function isClientReadyAckMessage(o: GuidanceMessage | undefined | null): o is MetricMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"ClientReadyAckMessage\";\n}\n\nexport function isOutputRequestAckMessage(o: GuidanceMessage | undefined | null): o is MetricMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"OutputRequestAckMessage\";\n}\n\nexport function isExecutionCompletedMessage(o: GuidanceMessage | undefined | null): o is ExecutionCompletedMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"ExecutionCompletedMessage\";\n}\n\nexport function isExecutionStartedMessage(o: GuidanceMessage | undefined | null): o is ExecutionStartedMessage {\n    if (o === undefined || o === null) return false;\n    return o.class_name === \"ExecutionStartedMessage\";\n}\n\nexport const kernelmsg = writable<StitchMessage | undefined>(undefined);\nexport const clientmsg = writable<StitchMessage | undefined>(undefined);\nexport const state = writable<StitchMessage | undefined>(undefined);\n\nexport enum Status {\n  Running = 'Running',\n  Error = 'Error',\n  Done = 'Done',\n}"
  },
  {
    "path": "client/graphpaper-inline/src/template.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n\n    <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n    <link href=\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\" rel=\"stylesheet\">\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "client/graphpaper-inline/tsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": true,\n\t\t\"esModuleInterop\": true,\n\t\t\"forceConsistentCasingInFileNames\": true,\n\t\t\"resolveJsonModule\": true,\n\t\t\"skipLibCheck\": true,\n\t\t\"sourceMap\": true,\n\t\t\"strict\": true,\n        \"verbatimModuleSyntax\": true,\n\t\t\"module\": \"ESNext\",\n\t\t\"moduleResolution\": \"bundler\"\n\t}\n}"
  },
  {
    "path": "docs/.readthedocs.yaml",
    "content": "# version: 2\n\n# Read the Docs configuration file for Sphinx projects\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Required\nversion: 2\n\n# Set the OS, Python version and other tools you might need\nbuild:\n  os: ubuntu-22.04\n  tools:\n    python: \"3.10\"\n    # You can also specify other tool versions:\n    # nodejs: \"20\"\n    # rust: \"1.70\"\n    # golang: \"1.20\"\n\n# Build documentation in the \"docs/\" directory with Sphinx\nsphinx:\n  configuration: docs/conf.py\n  # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs\n  # builder: \"dirhtml\"\n  # Fail on all warnings to avoid broken references\n  # fail_on_warning: true\n\n# Optionally build your docs in additional formats such as PDF and ePub\n# formats:\n#   - pdf\n#   - epub\n\n# Optional but recommended, declare the Python requirements required\n# to build your documentation\n# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html\n# python:\n#   install:\n#     - requirements: docs/requirements.txt\n#    version: 3.8\npython:\n   install:\n      - method: pip\n        path: .\n        extra_requirements:\n            - docs\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         =\nBUILDDIR      = _build\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n# the i18n builder cannot share the environment and doctrees with the others\nI18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: help\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  applehelp  to make an Apple Help Book\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  epub3      to make an epub3\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  latexpdfja to make LaTeX files and run them through platex/dvipdfmx\"\n\t@echo \"  text       to make text files\"\n\t@echo \"  man        to make manual pages\"\n\t@echo \"  texinfo    to make Texinfo files\"\n\t@echo \"  info       to make Texinfo files and run them through makeinfo\"\n\t@echo \"  gettext    to make PO message catalogs\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  xml        to make Docutils-native XML files\"\n\t@echo \"  pseudoxml  to make pseudoxml-XML files for display purposes\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\t@echo \"  coverage   to run coverage check of the documentation (if enabled)\"\n\t@echo \"  dummy      to check syntax errors of document sources\"\n\n.PHONY: clean\nclean:\n\trm -rf $(BUILDDIR)/*\n\n.PHONY: html\nhtml:\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/html.\"\n\n.PHONY: dirhtml\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\n.PHONY: singlehtml\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\n.PHONY: pickle\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\n.PHONY: json\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\n.PHONY: htmlhelp\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\n.PHONY: qthelp\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/guidance.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/guidance.qhc\"\n\n.PHONY: applehelp\napplehelp:\n\t$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp\n\t@echo\n\t@echo \"Build finished. The help book is in $(BUILDDIR)/applehelp.\"\n\t@echo \"N.B. You won't be able to view it unless you put it in\" \\\n\t      \"~/Library/Documentation/Help or install it in your application\" \\\n\t      \"bundle.\"\n\n.PHONY: devhelp\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/guidance\"\n\t@echo \"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/guidance\"\n\t@echo \"# devhelp\"\n\n.PHONY: epub\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\n.PHONY: epub3\nepub3:\n\t$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3\n\t@echo\n\t@echo \"Build finished. The epub3 file is in $(BUILDDIR)/epub3.\"\n\n.PHONY: latex\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make' in that directory to run these through (pdf)latex\" \\\n\t      \"(use \\`make latexpdf' here to do that automatically).\"\n\n.PHONY: latexpdf\nlatexpdf:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\n.PHONY: latexpdfja\nlatexpdfja:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through platex and dvipdfmx...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\n.PHONY: text\ntext:\n\t$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\n\t@echo\n\t@echo \"Build finished. The text files are in $(BUILDDIR)/text.\"\n\n.PHONY: man\nman:\n\t$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\n\t@echo\n\t@echo \"Build finished. The manual pages are in $(BUILDDIR)/man.\"\n\n.PHONY: texinfo\ntexinfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo\n\t@echo \"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo.\"\n\t@echo \"Run \\`make' in that directory to run these through makeinfo\" \\\n\t      \"(use \\`make info' here to do that automatically).\"\n\n.PHONY: info\ninfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo \"Running Texinfo files through makeinfo...\"\n\tmake -C $(BUILDDIR)/texinfo info\n\t@echo \"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo.\"\n\n.PHONY: gettext\ngettext:\n\t$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\n\t@echo\n\t@echo \"Build finished. The message catalogs are in $(BUILDDIR)/locale.\"\n\n.PHONY: changes\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\n.PHONY: linkcheck\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\n.PHONY: doctest\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n\n.PHONY: coverage\ncoverage:\n\t$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage\n\t@echo \"Testing of coverage in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/coverage/python.txt.\"\n\n.PHONY: xml\nxml:\n\t$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml\n\t@echo\n\t@echo \"Build finished. The XML files are in $(BUILDDIR)/xml.\"\n\n.PHONY: pseudoxml\npseudoxml:\n\t$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml\n\t@echo\n\t@echo \"Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml.\"\n\n.PHONY: dummy\ndummy:\n\t$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy\n\t@echo\n\t@echo \"Build finished. Dummy builder generates no files.\""
  },
  {
    "path": "docs/_static/css/styles.css",
    "content": ".wy-side-nav-search > a img.logo, .wy-side-nav-search .wy-dropdown > a img.logo {\n    width: 250px;\n    margin-top: 20px;\n    margin-bottom: 15px;\n}\n\n.wy-side-nav-search>div.version {\n    color: black;\n}\n@media screen and (min-width: 767px) {\n   .wy-table-responsive table td {\n      white-space: normal;\n   }\n   .wy-table-responsive {\n      overflow: visible;\n   }\n}\n\n/* .wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo {\n   max-width: 40%;\n} */\n\n.wy-side-nav-search>div.version {\n   color: #d9d9d9;\n}\n\n.wy-nav-top {\n   background: #343131;\n}\n\n.highlight {\n   background: #f7f7f7;\n}\n\n.wy-side-nav-search input[type=text] {\n   border-color: #666666;\n}\n\na {\n   color: #008bfb;\n}\n\na:hover {\n   color: #008bfb;\n}\n\na:visited {\n   color: #008bfb;\n}\n\nhtml.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {\n   background: #008bfb11;\n   color: #0086f6;\n   border-top: 3px solid #008bfbaa;\n}\n\n.rst-versions .rst-current-version {\n   color: #fcfcfc;\n}\n\n.wy-menu-vertical a {\n   color: #d9d9d9;\n}\n\nsection h2 {\n   margin-top: 30px;\n}\n\n.rst-content code.literal, .rst-content tt.literal {\n   color: #008bfb;\n}"
  },
  {
    "path": "docs/api.rst",
    "content": ".. currentmodule:: guidance\n\nAPI Reference\n=============\nThis page contains the API reference for public objects and functions in Guidance.\n\n\n.. _functions_api:\n\nfunctions\n---------\n.. autosummary::\n    :toctree: generated/\n\n    guidance.gen\n    guidance.select\n    guidance.json\n\n\n.. _contexts_api:\n\ncontext blocks\n--------------\n.. autosummary::\n    :toctree: generated/\n\n    guidance.instruction\n    guidance.system\n    guidance.user\n    guidance.assistant\n\n\n.. _models_api:\n\nmodels\n------\n.. autosummary::\n    :toctree: generated/\n\n    guidance.models.Model\n    guidance.models.Mock\n    guidance.models.LlamaCpp\n    guidance.models.Transformers\n    guidance.models.Anthropic\n    guidance.models.AzureOpenAI\n    guidance.models.Cohere\n    guidance.models.GoogleAI\n    guidance.models.LiteLLM\n    guidance.models.OpenAI\n    guidance.models.VertexAI\n"
  },
  {
    "path": "docs/api_examples.rst",
    "content": ".. currentmodule:: guidance\n\n.. _api_examples:\n\nAPI Examples\n------------\n\nThese examples parallel the namespace structure of Guidance. Each object or function in Guidance has a \ncorresponding example notebook here that demonstrates its API usage. The source notebooks\nare `available on GitHub <https://github.com/guidance-ai/guidance/tree/master/notebooks/api_examples>`_.\n\n\n.. _functions_examples:\n\nfunctions\n=========\n.. Examples for built-in guidance functions.\n\n.. toctree::\n    :glob:\n    :maxdepth: 1\n\n    example_notebooks/api_examples/library/*\n\n\n.. _models_examples:\n\nmodels\n======\n.. Examples for members of :ref:`guidance.models <models_api>`.\n\n.. toctree::\n    :glob:\n    :maxdepth: 1\n\n    example_notebooks/api_examples/models/*\n"
  },
  {
    "path": "docs/art_of_prompt_design.rst",
    "content": ".. currentmodule:: guidance\n\n.. _art_of_prompt_design:\n\nThe Art of Prompt Design\n------------------------\n\nThese notebooks demonstrate how to design effective prompts and guidance programs, they also cover common useful\ndesign patterns. The source notebooks are `available on GitHub <https://github.com/guidance-ai/guidance/tree/master/notebooks/art_of_prompt_design>`_.\n\n\n.. toctree::\n    :glob:\n    :maxdepth: 1\n\n    example_notebooks/art_of_prompt_design/use_clear_syntax.ipynb\n    example_notebooks/art_of_prompt_design/prompt_boundaries_and_token_healing.ipynb\n    example_notebooks/art_of_prompt_design/tool_use.ipynb\n    example_notebooks/art_of_prompt_design/react.ipynb\n    example_notebooks/art_of_prompt_design/rag.ipynb"
  },
  {
    "path": "docs/conf.py",
    "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Guidance documentation build configuration file, created by\n# sphinx-quickstart on Tue May 22 10:44:55 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport shutil\nimport sys\n\nimport sphinx_rtd_theme\n\nprint(os.path.abspath(\"./guidance\"))\nsys.path.insert(0, os.path.abspath(\"..\"))\n\n# make copy of notebooks in docs folder, as they must be here for sphinx to\n# pick them up properly.\nNOTEBOOKS_DIR = os.path.abspath(\"example_notebooks\")\nif os.path.exists(NOTEBOOKS_DIR):\n    import warnings\n\n    warnings.warn(\"example_notebooks directory exists, replacing...\")\n    shutil.rmtree(NOTEBOOKS_DIR)\nshutil.copytree(\n    os.path.abspath(\"../notebooks\"),\n    NOTEBOOKS_DIR,\n)\nif os.path.exists(NOTEBOOKS_DIR + \"/local_scratch\"):\n    shutil.rmtree(NOTEBOOKS_DIR + \"/local_scratch\")\n\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx_rtd_theme\",\n    \"numpydoc\",\n    \"nbsphinx\",\n]\nautodoc_default_options = {\"members\": True, \"inherited-members\": True}\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Don't try to execute the notebooks, they overwhelm RTD\nnbsphinx_execute = \"never\"\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"Guidance\"\ncopyright = \"2023, Guidance contributors\"\nauthor = \"Scott Lundberg, Marco Tulio Ribeiro\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = \"latest\"\n# The full version, including alpha/beta/rc tags.\nrelease = \"latest\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = \"en\"\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\"]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'alabaster'\nhtml_theme = \"sphinx_rtd_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {\n    #'canonical_url': '',\n    \"logo_only\": True,\n    \"display_version\": True,\n    \"prev_next_buttons_location\": \"bottom\",\n    \"style_external_links\": False,\n    \"style_nav_header_background\": \"#343131\",\n    # Toc options\n    \"collapse_navigation\": True,\n    \"sticky_navigation\": True,\n    \"navigation_depth\": 4,\n    \"includehidden\": True,\n    \"titles_only\": False,\n}\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = \"figures/guidance_logo_white_dark.svg\"\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\n# html_title = 'Guidance'\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\nhtml_favicon = \"figures/favicon.ico\"\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\nhtml_css_files = [\"css/styles.css\"]\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\n# html_domain_indices = True\n\n# If false, no index is generated.\n#\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#\n# html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n#   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'\n#   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'\n#\nhtml_search_language = \"en\"\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Guidance_doc\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, \"Guidance.tex\", \"Guidance Documentation\", \"Scott Lundberg\", \"manual\"),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n#\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"guidance\", \"Guidance Documentation\", [author], 1)]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"Guidance\",\n        \"Guidance Documentation\",\n        author,\n        \"Guidance\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    ),\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\n\ndef setup(app):\n    from guidance import guidance\n\n    app.connect(\"build-finished\", build_finished)\n\n\ndef build_finished(app, exception):\n    shutil.rmtree(NOTEBOOKS_DIR)\n"
  },
  {
    "path": "docs/index.rst",
    "content": "\n.. image:: figures/guidance_logo_blue.svg\n   :width: 300px\n   :align: center\n|\n\n**Guidance** enables you to control modern language models more effectively and efficiently than traditional prompting or chaining. Guidance programs allow you to interleave generation, prompting, and logical control into a single continuous flow matching how the language model actually processes the text.\n\nInstall\n=======\n\nGuidance can be installed from `PyPI <https://pypi.org/project/guidance>`_::\n\n   pip install guidance\n\n\nContents\n========\n\n.. toctree::\n   :maxdepth: 2\n\n   Tutorials <tutorials>\n   API reference <api>\n   API examples <api_examples>\n   The Art of Prompt Design <art_of_prompt_design>\n"
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset BUILDDIR=_build\nset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\nset I18NSPHINXOPTS=%SPHINXOPTS% .\nif NOT \"%PAPER%\" == \"\" (\n\tset ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\n\tset I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%\n)\n\nif \"%1\" == \"\" goto help\n\nif \"%1\" == \"help\" (\n\t:help\n\techo.Please use `make ^<target^>` where ^<target^> is one of\n\techo.  html       to make standalone HTML files\n\techo.  dirhtml    to make HTML files named index.html in directories\n\techo.  singlehtml to make a single large HTML file\n\techo.  pickle     to make pickle files\n\techo.  json       to make JSON files\n\techo.  htmlhelp   to make HTML files and a HTML help project\n\techo.  qthelp     to make HTML files and a qthelp project\n\techo.  devhelp    to make HTML files and a Devhelp project\n\techo.  epub       to make an epub\n\techo.  epub3      to make an epub3\n\techo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\n\techo.  text       to make text files\n\techo.  man        to make manual pages\n\techo.  texinfo    to make Texinfo files\n\techo.  gettext    to make PO message catalogs\n\techo.  changes    to make an overview over all changed/added/deprecated items\n\techo.  xml        to make Docutils-native XML files\n\techo.  pseudoxml  to make pseudoxml-XML files for display purposes\n\techo.  linkcheck  to check all external links for integrity\n\techo.  doctest    to run all doctests embedded in the documentation if enabled\n\techo.  coverage   to run coverage check of the documentation if enabled\n\techo.  dummy      to check syntax errors of document sources\n\tgoto end\n)\n\nif \"%1\" == \"clean\" (\n\tfor /d %%i in (%BUILDDIR%\\*) do rmdir /q /s %%i\n\tdel /q /s %BUILDDIR%\\*\n\tgoto end\n)\n\n\nREM Check if sphinx-build is available and fallback to Python version if any\n%SPHINXBUILD% 1>NUL 2>NUL\nif errorlevel 9009 goto sphinx_python\ngoto sphinx_ok\n\n:sphinx_python\n\nset SPHINXBUILD=python -m sphinx.__init__\n%SPHINXBUILD% 2> nul\nif errorlevel 9009 (\n\techo.\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\n\techo.installed, then set the SPHINXBUILD environment variable to point\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\n\techo.may add the Sphinx directory to PATH.\n\techo.\n\techo.If you don't have Sphinx installed, grab it from\n\techo.http://sphinx-doc.org/\n\texit /b 1\n)\n\n:sphinx_ok\n\n\nif \"%1\" == \"html\" (\n\t%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/html.\n\tgoto end\n)\n\nif \"%1\" == \"dirhtml\" (\n\t%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\n\tgoto end\n)\n\nif \"%1\" == \"singlehtml\" (\n\t%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.\n\tgoto end\n)\n\nif \"%1\" == \"pickle\" (\n\t%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the pickle files.\n\tgoto end\n)\n\nif \"%1\" == \"json\" (\n\t%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the JSON files.\n\tgoto end\n)\n\nif \"%1\" == \"htmlhelp\" (\n\t%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run HTML Help Workshop with the ^\n.hhp project file in %BUILDDIR%/htmlhelp.\n\tgoto end\n)\n\nif \"%1\" == \"qthelp\" (\n\t%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run \"qcollectiongenerator\" with the ^\n.qhcp project file in %BUILDDIR%/qthelp, like this:\n\techo.^> qcollectiongenerator %BUILDDIR%\\qthelp\\guidance.qhcp\n\techo.To view the help file:\n\techo.^> assistant -collectionFile %BUILDDIR%\\qthelp\\guidance.ghc\n\tgoto end\n)\n\nif \"%1\" == \"devhelp\" (\n\t%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished.\n\tgoto end\n)\n\nif \"%1\" == \"epub\" (\n\t%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The epub file is in %BUILDDIR%/epub.\n\tgoto end\n)\n\nif \"%1\" == \"epub3\" (\n\t%SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The epub3 file is in %BUILDDIR%/epub3.\n\tgoto end\n)\n\nif \"%1\" == \"latex\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdf\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf\n\tcd %~dp0\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdfja\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf-ja\n\tcd %~dp0\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"text\" (\n\t%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The text files are in %BUILDDIR%/text.\n\tgoto end\n)\n\nif \"%1\" == \"man\" (\n\t%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The manual pages are in %BUILDDIR%/man.\n\tgoto end\n)\n\nif \"%1\" == \"texinfo\" (\n\t%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.\n\tgoto end\n)\n\nif \"%1\" == \"gettext\" (\n\t%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The message catalogs are in %BUILDDIR%/locale.\n\tgoto end\n)\n\nif \"%1\" == \"changes\" (\n\t%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.The overview file is in %BUILDDIR%/changes.\n\tgoto end\n)\n\nif \"%1\" == \"linkcheck\" (\n\t%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Link check complete; look for any errors in the above output ^\nor in %BUILDDIR%/linkcheck/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"doctest\" (\n\t%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Testing of doctests in the sources finished, look at the ^\nresults in %BUILDDIR%/doctest/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"coverage\" (\n\t%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Testing of coverage in the sources finished, look at the ^\nresults in %BUILDDIR%/coverage/python.txt.\n\tgoto end\n)\n\nif \"%1\" == \"xml\" (\n\t%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The XML files are in %BUILDDIR%/xml.\n\tgoto end\n)\n\nif \"%1\" == \"pseudoxml\" (\n\t%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.\n\tgoto end\n)\n\nif \"%1\" == \"dummy\" (\n\t%SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. Dummy builder generates no files.\n\tgoto end\n)\n\n:end"
  },
  {
    "path": "docs/tutorials.rst",
    "content": ".. currentmodule:: guidance\n\n.. _tutorials:\n\nTutorials\n----------------\n\nThese notebooks demonstrate various features of `guidance``. The source notebooks\nare `available on GitHub <https://github.com/guidance-ai/guidance/tree/master/notebooks/api_examples>`_.\n\n\n.. toctree::\n    :glob:\n    :maxdepth: 1\n\n    example_notebooks/tutorials/intro_to_guidance.ipynb\n    example_notebooks/tutorials/token_healing.ipynb\n    example_notebooks/tutorials/regex_constraints.ipynb\n    example_notebooks/tutorials/guidance_acceleration.ipynb\n    example_notebooks/tutorials/code_generation.ipynb\n    example_notebooks/tutorials/chat.ipynb"
  },
  {
    "path": "guidance/__init__.py",
    "content": "__version__ = \"0.3.2\"\n\nimport sys\nfrom types import ModuleType\n\nfrom . import library, models\nfrom ._guidance import guidance\nfrom ._tools import Tool\n\n# we expose all the library functions at the top level of the module\nfrom .library import *  # noqa: F403\n\n__all__ = [\n    \"guidance\",\n    \"library\",\n    \"models\",\n    \"Tool\",\n    *library.__all__,\n]\n\n\n# This makes the guidance module callable\nclass _Guidance(ModuleType):\n    def __call__(self, f=None, *, stateless=False, cache=None, dedent=True, model=models.Model):\n        return guidance(f, stateless=stateless, cache=cache, dedent=dedent, model=model)\n\n\nsys.modules[__name__].__class__ = _Guidance\n"
  },
  {
    "path": "guidance/_ast.py",
    "content": "import copy\nimport json\nimport re\nimport textwrap\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass, field\nfrom functools import cached_property\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Callable,\n    Iterator,\n    Literal,\n    Sequence,\n    TypedDict,\n    TypeVar,\n    Union,\n    cast,\n)\n\nfrom llguidance import LLMatcher\nfrom pydantic import Base64Bytes\nfrom typing_extensions import assert_never\n\nfrom ._parser import ByteParser, ByteParserException\nfrom ._tools import Tool\nfrom .trace import OutputAttr\n\nif TYPE_CHECKING:\n    from .models._base import Interpreter, State\n\n# to support the embedding of guidance functions inside Python f-strings we use tags with these delimiters\ntag_start = \"{{G|\"  # start of a call tag\ntag_end = \"|G}}\"  # end of a call tag\n_tag_pool: dict[str, Union[\"Function\", \"GrammarNode\"]] = {}  # the Functions or GrammarNodes associated with the tags\n_tag_pattern = re.compile(re.escape(tag_start) + r\"([^\\|]+)\" + re.escape(tag_end))  # the pattern for matching call tags\n\n\ndef _parse_tags(s: str) -> Union[\"GrammarNode\", \"Function\"]:\n    parts = cast(list[str], _tag_pattern.split(s))\n    obj: GrammarNode = LiteralNode(parts.pop(0))\n    is_tag = True\n    for part in parts:\n        if is_tag:\n            obj += _tag_pool[part]\n        else:\n            obj += LiteralNode(part)\n        is_tag = not is_tag\n    return obj\n\n\nclass Tagged:\n    def __str__(self):\n        \"\"\"Creates a string tag that can be used to retrieve this object.\"\"\"\n\n        # save the call in our call pool, ready to be run when it is attached to an LM object\n        str_id = str(id(self))\n        if str_id not in _tag_pool:\n            _tag_pool[str_id] = self\n\n        # return a string representation of this call so it can be combined with other strings/calls\n        return tag_start + str_id + tag_end\n\n\nclass Match:\n    def __init__(self, captures, log_probs, partial):\n        self.captures = captures\n        self.log_probs = log_probs\n        self.partial = partial\n\n    def __getitem__(self, key):\n        return self.captures[key]\n\n    def __len__(self):\n        return len(self.captures)\n\n    def __bool__(self):\n        return True\n\n    def __str__(self):\n        return str(self.captures)\n\n    def __repr__(self):\n        return \"<guidance.Match object; captures=\" + str(self.captures) + \"; partial=\" + str(self.partial) + \">\"\n\n\nclass StatefulException(Exception):\n    \"\"\"This is raised when we try and use the state of a grammar object like it was a live model.\n\n    Note that eventually it would be nice to support stateful parser/grammar constructs directly, but\n    such \"parser combinators\" cannot be run effciently in Python. So we use a traditional parser and\n    grammar separation (hence the need for this exception).\"\"\"\n\n    pass\n\n\n@dataclass\nclass Function(Tagged):\n    name: str = field(init=False)\n    f: Callable\n    args: tuple[Any, ...]\n    kwargs: dict[str, Any]\n\n    def __post_init__(self):\n        self.name = self.f.__name__\n\n    def __call__(self, model):\n        model = self.f(model, *self.args, **self.kwargs)\n        if model is None:\n            raise Exception(\n                f\"The guidance function `{self.f.__name__}` did not return a model object! You need to return an updated model object at the end of your guidance function.\"\n            )\n        return model\n\n    def __add__(self, other):\n        if not isinstance(other, (str, GrammarNode, Function)):\n            return NotImplemented\n\n        if isinstance(other, str):\n            other = _parse_tags(other)\n\n        if isinstance(other, GrammarNode) and other.is_null:\n            return self\n\n        def __add__(model):\n            return self(model) + other\n\n        return Function(__add__, [], {})\n\n    def __radd__(self, other):\n        if not isinstance(other, (str, GrammarNode, Function)):\n            return NotImplemented\n\n        if isinstance(other, str):\n            other = _parse_tags(other)\n\n        if isinstance(other, GrammarNode) and other.is_null:\n            return self\n\n        def __radd__(model):\n            return self(model + other)\n\n        return Function(__radd__, [], {})\n\n\nS = TypeVar(\"S\", bound=\"State\")\n\n\nclass ASTNode(ABC):\n    @abstractmethod\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        pass\n\n    def simplify(self) -> \"ASTNode\":\n        return self\n\n\n@dataclass\nclass RoleStart(ASTNode):\n    role: str\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter._role_start(self, **kwargs)\n\n\n@dataclass\nclass RoleEnd(ASTNode):\n    role: str\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter._role_end(self, **kwargs)\n\n\n@dataclass\nclass ImageBlob(ASTNode):\n    data: Base64Bytes\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.image_blob(self, **kwargs)\n\n\n@dataclass\nclass ImageUrl(ASTNode):\n    url: str\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.image_url(self, **kwargs)\n\n\n@dataclass\nclass AudioBlob(ASTNode):\n    data: Base64Bytes\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.audio_blob(self, **kwargs)\n\n\nclass GenAudio(ASTNode):\n    def __init__(self, kwargs: dict[str, Any]):\n        self.kwargs = kwargs\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.gen_audio(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass GrammarNode(Tagged, ASTNode):\n    @property\n    def is_null(self) -> bool:\n        \"\"\"\n        If this returns true, then this node matches empty string and empty string only.\n        \"\"\"\n        return False\n\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        \"\"\"\n        If this returns true, then this node will be compiled down to a regular expression.\n        It cannot be recursive.\n        \"\"\"\n        return all(child.is_allowed_in_lark_terminal for child in self.children())\n\n    @property\n    def is_allowed_in_lark_rule_with_attrs(self) -> bool:\n        \"\"\"\n        If this returns true, then this node can be used as a Lark rule with attributes.\n        \"\"\"\n        # Typically, not being allowed in terminal implies that a node is not allowed in a rule with attributes,\n        # however this is notably false for subgrammars\n        return self.is_allowed_in_lark_terminal\n\n    def simplify(self) -> \"GrammarNode\":\n        return self\n\n    def children(self) -> Sequence[\"GrammarNode\"]:\n        return ()\n\n    def __add__(self, other) -> \"GrammarNode\":\n        if not isinstance(other, (str, GrammarNode)):\n            return NotImplemented\n\n        if isinstance(other, str):\n            other = _parse_tags(other)\n\n        if self.is_null:\n            return other\n\n        if isinstance(other, Function):\n            return other.__radd__(self)\n\n        if other.is_null:\n            return self\n\n        return JoinNode((self, other))\n\n    def __radd__(self, other) -> \"GrammarNode\":\n        if not isinstance(other, (str, GrammarNode)):\n            return NotImplemented\n\n        if isinstance(other, str):\n            other = _parse_tags(other)\n\n        if self.is_null:\n            return other\n\n        if isinstance(other, Function):\n            return other.__add__(self)\n\n        if other.is_null:\n            return self\n\n        return JoinNode((other, self))\n\n    def __getitem__(self, key):\n        raise StatefulException(\"GrammarNodes can't access state!\")\n\n    def match(\n        self,\n        byte_string: str | bytes,\n        allow_partial: bool = False,\n        raise_exceptions: bool = False,\n        enforce_max_tokens: bool = True,\n    ) -> Match | None:\n        if isinstance(byte_string, str):\n            byte_string = byte_string.encode()\n        parser = ByteParser(self.ll_grammar(enforce_max_tokens=enforce_max_tokens))\n\n        try:\n            parser.consume_bytes(byte_string)\n            if not allow_partial:\n                parser.force_done()\n        except ByteParserException:\n            if raise_exceptions:\n                raise\n            else:\n                return None\n\n        if not allow_partial and not parser.matched():\n            return None\n\n        if parser.matched():\n            parser.force_done()\n\n        return Match(*parser.get_captures(), partial=not parser.matched())  # type: ignore[misc]\n\n    def forced_prefix(self) -> str:\n        parser = ByteParser(self.ll_grammar())\n        return parser.bytes.decode(\"utf-8\", errors=\"ignore\")\n\n    def ll_grammar(self, enforce_max_tokens: bool = True) -> str:\n        lark_str = LarkSerializer(enforce_max_tokens=enforce_max_tokens).serialize(self.simplify())\n        return lark_str\n\n\n@dataclass(frozen=True)\nclass LiteralNode(GrammarNode):\n    value: str\n\n    @property\n    def is_null(self) -> bool:\n        return self.value == \"\"\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.text(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass SpecialToken(GrammarNode):\n    text: str | None = None\n    id: int | None = None\n    range: tuple[int, int] | None = None\n\n    def __post_init__(self):\n        if [self.text, self.id, self.range].count(None) != 2:\n            raise ValueError(\"Exactly one of text, id, or range must be set\")\n\n    def format(self) -> str:\n        if self.text is not None:\n            return f\"<{self.text}>\"\n        if self.id is not None:\n            return f\"<[{self.id}]>\"\n        if self.range is not None:\n            return f\"<[{self.range[0]}-{self.range[1]}]>\"\n        raise ValueError(\"SpecialToken must have either text, id, or range set\")\n\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        return False\n\n    @property\n    def is_allowed_in_lark_rule_with_attrs(self) -> bool:\n        return True\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        # Just use grammar -- I don't think we need a special case for this\n        return interpreter.grammar(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass RegexNode(GrammarNode):\n    regex: str | None\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.regex(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass SelectNode(GrammarNode):\n    alternatives: tuple[GrammarNode, ...]\n\n    @property\n    def is_null(self) -> bool:\n        return all(alt.is_null for alt in self.alternatives)\n\n    def simplify(self) -> \"GrammarNode\":\n        if self.is_null:\n            return LiteralNode(\"\")\n        alternatives = tuple(alt.simplify() for alt in self.alternatives if not alt.is_null)\n        if len(alternatives) == 1:\n            node = alternatives[0]\n        else:\n            node = SelectNode(alternatives)\n\n        if any(alt.is_null for alt in self.alternatives):\n            return RepeatNode(node, 0, 1)\n        return node\n\n    def children(self) -> Sequence[\"GrammarNode\"]:\n        return self.alternatives\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.select(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass JoinNode(GrammarNode):\n    nodes: tuple[GrammarNode, ...]\n\n    @property\n    def is_null(self) -> bool:\n        return all(node.is_null for node in self.nodes)\n\n    def simplify(self) -> \"GrammarNode\":\n        if self.is_null:\n            return LiteralNode(\"\")\n        nodes = tuple(node.simplify() for node in self.nodes if not node.is_null)\n        if len(nodes) == 1:\n            return nodes[0]\n        return JoinNode(nodes)\n\n    def children(self) -> Sequence[\"GrammarNode\"]:\n        return self.nodes\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.join(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass RepeatNode(GrammarNode):\n    node: GrammarNode\n    min: int\n    max: int | None\n\n    @property\n    def is_null(self) -> bool:\n        return self.node.is_null or self.min == self.max == 0\n\n    def __post_init__(self):\n        if self.min < 0:\n            raise ValueError(\"min must be >= 0\")\n        if self.max is not None and self.max < self.min:\n            raise ValueError(\"max must be >= min\")\n\n    def children(self) -> Sequence[\"GrammarNode\"]:\n        return (self.node,)\n\n    def simplify(self) -> GrammarNode:\n        return RepeatNode(self.node.simplify(), self.min, self.max)\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.repeat(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass SubstringNode(GrammarNode):\n    chunks: tuple[str, ...]\n\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        # this can be used as part of bigger regexes\n        return True\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.substring(self, **kwargs)\n\n\n# This creates a name for the given grammar node (value), which can be referenced\n# via RuleRefNode (or directly).\n# In Lark syntax this results in approx. \"{name}: {value}\"\n# This can either Lark rule (non-terminal) or terminal definition\n# (meaning name can be upper- or lowercase).\n@dataclass(frozen=True)\nclass RuleNode(GrammarNode):\n    name: str\n    value: GrammarNode\n    capture: str | None = None\n    list_append: bool = False\n    temperature: float | None = None\n    max_tokens: int | None = None\n    stop: RegexNode | LiteralNode | None = None\n    suffix: LiteralNode | None = None\n    stop_capture: str | None = None\n    lazy: bool = False\n\n    def __post_init__(self) -> None:\n        if (\n            # Note: capture is very intentionally missing from this list, as it's not like the other attributes\n            self.temperature is not None\n            or self.max_tokens is not None\n            or self.stop is not None\n            or self.suffix is not None\n            or self.stop_capture is not None\n            or self.lazy\n        ) and not self.value.is_allowed_in_lark_rule_with_attrs:\n            raise ValueError(\"RuleNode is not terminal, so it cannot have a temperature, max_tokens, or stop condition\")\n\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        check_self = (\n            self.capture is None\n            and self.temperature is None\n            and self.max_tokens is None\n            and self.stop is None\n            and self.suffix is None\n            and self.stop_capture is None\n            and not self.lazy\n        )\n        return check_self and super().is_allowed_in_lark_terminal\n\n    def children(self) -> tuple[GrammarNode]:\n        return (self.value,)\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.rule(self, **kwargs)\n\n\n@dataclass(frozen=True, eq=False)\nclass RuleRefNode(GrammarNode):\n    target: RuleNode | None = field(default=None, init=False)\n\n    def set_target(self, target: RuleNode) -> None:\n        if self.target is not None:\n            raise ValueError(\"RuleRefNode target already set\")\n        # Side-step frozen=True to set target\n        object.__setattr__(self, \"target\", target)\n\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        # RuleRefNode should only ever be used to enable recursive rule definitions,\n        # so it should never be terminal.\n        return False\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        if self.target is None:\n            raise ValueError(\"RuleRefNode target not set\")\n        return interpreter.rule(self.target)\n\n\n@dataclass(frozen=True)\nclass BaseSubgrammarNode(GrammarNode):\n    @property\n    def is_allowed_in_lark_terminal(self) -> bool:\n        return False\n\n    @property\n    def is_allowed_in_lark_rule_with_attrs(self) -> bool:\n        # Typically, not being allowed in terminal implies that a node is not allowed in a rule with attributes,\n        # however this is notably false for subgrammars\n        return True\n\n\n@dataclass(frozen=True)\nclass SubgrammarNode(BaseSubgrammarNode):\n    body: GrammarNode\n    skip_regex: str | None = None\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.subgrammar(self, **kwargs)\n\n\nclass LLGJsonCompileOptions(TypedDict):\n    # defaults to \",\"\n    item_separator: str | None\n    # defaults to \":\"\n    key_separator: str | None\n    # defaults to None - depends on whitespace_flexible\n    whitespace_pattern: str | None\n    # defaults to true (r\"[\\x20\\x0A\\x0D\\x09]+\"); if false, no whitespace is allowed\n    whitespace_flexible: bool | None\n    # defaults to false\n    coerce_one_of: bool | None\n    # ignore unimplemented keywords; defaults to false\n    lenient: bool | None\n\n\n@dataclass(frozen=True, eq=False)\nclass JsonNode(BaseSubgrammarNode):\n    schema: dict[str, Any] | None = None\n    llg_options: LLGJsonCompileOptions | None = None\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.json(self, **kwargs)\n\n    @cached_property\n    def _llguidance_json(self) -> dict[str, Any]:\n        if self.schema is None:\n            # The user did not pass a schema. Let's assume that they want an object\n            # (this should match the behavior of most remote providers)\n            schema = {\"type\": \"object\"}\n        else:\n            # shallow copy is ok\n            schema = copy.copy(self.schema)\n\n        if self.llg_options is not None:\n            # Maybe TODO: let LLGJsonCompileOptions be non-total\n            # and update the schema with any present options\n            # (in case x-guidance was already set with some options)\n            schema[\"x-guidance\"] = self.llg_options\n        return schema\n\n    def _llguidance_validate(self) -> None:\n        \"\"\"Validate the JSON schema with `llguidance` and warn about any issues.\"\"\"\n        grm = LLMatcher.grammar_from_json_schema(self._llguidance_json)\n        is_err, messages = LLMatcher.validate_grammar_with_warnings(grm)\n        if is_err:\n            raise ValueError(messages[0])\n        else:\n            # this will warn about oneOf coercion, and any other unsupported features if lenient is enabled\n            for message in messages:\n                warnings.warn(message, stacklevel=2)\n\n\n@dataclass(frozen=True, eq=False)\nclass LarkNode(BaseSubgrammarNode):\n    lark_grammar: str\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.lark(self, **kwargs)\n\n\n@dataclass(frozen=True)\nclass ToolCallNode(ASTNode):\n    tools: dict[str, Tool]\n    tool_choice: Literal[\"auto\", \"required\"] = \"auto\"\n    parallel_tool_calls: bool = False\n    plaintext_regex: str | None = None\n\n    @classmethod\n    def from_tools(\n        cls,\n        tools: list[Callable | Tool],\n        tool_choice: Literal[\"auto\", \"required\"] = \"auto\",\n        parallel_tool_calls: bool = False,\n        plaintext_regex: str | None = None,\n    ) -> \"ToolCallNode\":\n        tool_defs = {}\n        for tool in tools:\n            if isinstance(tool, Tool):\n                tool_def = tool\n            elif callable(tool):\n                tool_def = Tool.from_callable(tool)\n            else:\n                raise ValueError(f\"Unsupported tool type: {type(tool)}\")\n            if tool_def.name in tool_defs:\n                raise ValueError(f\"Duplicate tool name: {tool_def.name}\")\n            tool_defs[tool_def.name] = tool_def\n        return cls(\n            tools=tool_defs,\n            tool_choice=tool_choice,\n            parallel_tool_calls=parallel_tool_calls,\n            plaintext_regex=plaintext_regex,\n        )\n\n    def __post_init__(self):\n        if not self.tools:\n            raise ValueError(\"ToolCallNode must have at least one tool\")\n\n    def _run(self, interpreter: \"Interpreter[S]\", **kwargs) -> Iterator[OutputAttr]:\n        return interpreter.tool_call(self, **kwargs)\n\n\nclass LarkSerializer:\n    def __init__(self, enforce_max_tokens: bool = True):\n        self.enforce_max_tokens = enforce_max_tokens\n        self.rules: dict[str, str] = {}\n        self.names: dict[RuleNode, str] = {}\n\n    def serialize(self, node: GrammarNode) -> str:\n        if isinstance(node, RuleNode) and node.name == \"start\":\n            self.visit(node)\n        else:\n            self.visit(RuleNode(\"start\", node))\n\n        res = \"%llguidance {}\\n\\n\"\n        if \"start\" not in self.rules:\n            assert \"START\" in self.rules\n            res += \"start: START\\n\"\n\n        prev_nl = True\n        for name in self.names.values():\n            s = self.rules[name]\n            if not prev_nl and \"\\n\" in s:\n                res += \"\\n\"\n            res += s + \"\\n\"\n            prev_nl = \"\\n\" in s\n            if prev_nl:\n                res += \"\\n\"\n\n        return res\n\n    def visit(self, node: GrammarNode, top=False) -> str:\n        if isinstance(node, RuleNode):\n            if node in self.names:\n                return self.names[node]\n\n            name = self.normalize_name(node.name, node.is_allowed_in_lark_terminal)\n            names = set(self.names.values())\n            if name in names:\n                i = 1\n                while f\"{name}_{i}\" in names:\n                    i += 1\n                name = f\"{name}_{i}\"\n            self.names[node] = name\n\n            res = name\n            attrs = []\n            if node.capture is not None:\n                capture_name = node.capture\n                if node.list_append:\n                    capture_name = f\"__LIST_APPEND:{capture_name}\"\n                if capture_name != name:\n                    attrs.append(f\"capture={json.dumps(capture_name)}\")\n                else:\n                    attrs.append(\"capture\")\n            if node.temperature is not None:\n                attrs.append(f\"temperature={node.temperature}\")\n            if self.enforce_max_tokens and node.max_tokens is not None:\n                attrs.append(f\"max_tokens={node.max_tokens}\")\n            if node.stop:\n                attrs.append(f\"stop={self.visit(node.stop)}\")\n            if node.suffix:\n                attrs.append(f\"suffix={self.visit(node.suffix)}\")\n            if node.stop_capture:\n                attrs.append(f\"stop_capture={json.dumps(node.stop_capture)}\")\n            if node.lazy:\n                attrs.append(\"lazy\")\n            if attrs:\n                res += f\"[{', '.join(attrs)}]\"\n\n            res += \": \"\n            target = node.value\n            if isinstance(target, JsonNode):\n                res += \"%json \" + json.dumps(target._llguidance_json, indent=2)\n            elif isinstance(target, LarkNode):\n                # TODO: we can't decide whether or not to enforce max tokens here easily.\n                # We could in principle parse the grammar and/or use a regex?\n                res += f\"%lark {{\\n{textwrap.indent(target.lark_grammar, '  ').strip()}\\n}}\"\n            elif isinstance(target, SubgrammarNode):\n                lark_grammar = LarkSerializer(enforce_max_tokens=self.enforce_max_tokens).serialize(target.body)\n                if target.skip_regex:\n                    lark_grammar += f\"\\n%ignore /{target.skip_regex}/\"\n                res += f\"%lark {{\\n{textwrap.indent(lark_grammar, '  ').strip()}\\n}}\"\n            elif isinstance(target, GrammarNode):\n                if (\n                    not isinstance(target, RuleNode)\n                    and target.is_allowed_in_lark_terminal\n                    and not node.is_allowed_in_lark_terminal\n                ):\n                    \"\"\"\n                    If the RHS could be written as a terminal, but the presence of attributes on the LHS\n                    prevents it, we wrap the RHS in a new rule like so:\n                    ```\n                    rule[attr]: TERMINAL | TERMINAL | TERMINAL\n                    ```\n                    gets rewritten as:\n                    ```\n                    rule[attr]: RULE\n                    RULE: TERMINAL | TERMINAL | TERMINAL\n                    ```\n                    In particular, this lets us ensure that large alternations are handled as single lexemes\n                    rather than a choice between multiple lexemes. Keeping the number of individual lexemes\n                    to a minimum is important for performance.\n                    Indeed, llguidance imposes a limit to maintain performance: see issue #1320\n                    \"\"\"\n                    target = RuleNode(\n                        name=node.name,\n                        value=target,\n                    )\n                res += self.visit(target.simplify(), top=True)\n            else:\n                if TYPE_CHECKING:\n                    assert_never(target)\n                raise TypeError(f\"Unknown rule value type: {target}\")\n            self.rules[name] = res\n            return name\n        if node.is_null:\n            return '\"\"'\n\n        if isinstance(node, LiteralNode):\n            return json.dumps(node.value)\n\n        if isinstance(node, SpecialToken):\n            return node.format()\n\n        if isinstance(node, RegexNode):\n            rx = node.regex\n            if rx is None:\n                rx = \"(?s:.*)\"\n            return self.regex(rx)\n\n        if isinstance(node, SelectNode):\n            if top:\n                return \"\\n     | \".join(self.visit(alt) for alt in node.alternatives)\n            else:\n                return \"(\" + \" | \".join(self.visit(alt) for alt in node.alternatives) + \")\"\n\n        if isinstance(node, JoinNode):\n            return \" \".join(self.visit(n) for n in node.nodes if not n.is_null)\n\n        if isinstance(node, RepeatNode):\n            inner = self.visit(node.node)\n            if isinstance(node.node, (JoinNode, RepeatNode)):\n                inner = f\"({inner})\"\n            if (node.min, node.max) == (0, None):\n                return f\"{inner}*\"\n            if (node.min, node.max) == (1, None):\n                return f\"{inner}+\"\n            if (node.min, node.max) == (0, 1):\n                return f\"{inner}?\"\n            if node.max is None:\n                return f\"{inner}{{{node.min},}}\"\n            return f\"{inner}{{{node.min},{node.max}}}\"\n\n        if isinstance(node, SubstringNode):\n            return f\"%regex {json.dumps({'substring_chunks': node.chunks}, indent=2)}\"\n\n        if isinstance(node, RuleRefNode):\n            if node.target is None:\n                raise ValueError(\"RuleRefNode has no target\")\n            return self.visit(node.target)\n\n        raise TypeError(f\"Unknown node type: {node}\")\n\n    def normalize_name(self, name: str, terminal: bool) -> str:\n        new_name = name.replace(\"-\", \"_\")\n        # convert fooBar_Baz to foo_Bar_Baz\n        new_name = re.sub(r\"([a-z])([A-Z])\", r\"\\1_\\2\", new_name)\n        if terminal:\n            new_name = new_name.upper()\n        else:\n            new_name = new_name.lower()\n        return new_name\n\n    def regex(self, pattern: str) -> str:\n        escaped = re.sub(r\"(?<!\\\\)/\", r\"\\/\", pattern).replace(\"\\n\", \"\\\\n\")\n        return f\"/{escaped}/\"\n"
  },
  {
    "path": "guidance/_bg/__init__.py",
    "content": "\"\"\"Background thread for asyncio handling.\n\nThis is currently being used for messaging, visualization and metrics.\n\"\"\"\n\nimport asyncio\nimport threading\nfrom asyncio import AbstractEventLoop, Task\nfrom concurrent.futures import Future\nfrom typing import Any, Coroutine, TypeVar\n\nT = TypeVar(\"T\")\n\n\ndef _start_asyncio_loop(loop: AbstractEventLoop):\n    asyncio.set_event_loop(loop)\n    loop.run_forever()\n\n\ndef _asyncio_background_thread() -> tuple[threading.Thread, AbstractEventLoop]:\n    loop = asyncio.new_event_loop()\n    thread = threading.Thread(target=_start_asyncio_loop, args=(loop,))\n    thread.daemon = True\n    return thread, loop\n\n\nclass BackgroundAsync:\n    \"\"\"Runs background thread that has an asyncio event loop.\"\"\"\n\n    def __init__(self):\n        \"\"\"Initializes.\"\"\"\n        self._loop = None\n        self._thread = None\n\n    def _thread_and_loop(self) -> tuple[threading.Thread, AbstractEventLoop]:\n        if self._loop is None:\n            self._thread, self._loop = _asyncio_background_thread()\n            self._thread.start()\n        return self._thread, self._loop\n\n    def call_soon_threadsafe(self, cb, *args, context=None):\n        \"\"\"Fires callback in background thread.\"\"\"\n\n        _, loop = self._thread_and_loop()\n        return loop.call_soon_threadsafe(cb, *args, context=context)\n\n    def run_async_coroutine(self, coroutine: Coroutine[Any, Any, T]) -> Future[T]:\n        \"\"\"Runs an asynchronous coroutine in the visual thread.\n\n        Args:\n            coroutine: Coroutine to be run on visual thread.\n\n        Returns:\n            Future of coroutine.\n        \"\"\"\n        _, loop = self._thread_and_loop()\n        future = asyncio.run_coroutine_threadsafe(coroutine, loop)\n        return future\n\n    @staticmethod\n    async def async_task(coroutine: Coroutine[Any, Any, T]) -> Task[T]:\n        \"\"\"Creates an asyncio task from coroutine.\n\n        Args:\n            coroutine: Coroutine within task.\n\n        Returns:\n            Asyncio task.\n        \"\"\"\n        task = asyncio.create_task(coroutine)\n        return task\n\n    @staticmethod\n    async def print_all_tasks():  # pragma: no cover\n        \"\"\"Prints all tasks running in background thread loop (for debugging purposes).\"\"\"\n        for task in asyncio.all_tasks():\n            print(task)\n"
  },
  {
    "path": "guidance/_grammar.py",
    "content": "import dataclasses\nimport re\nfrom typing import Sequence\n\nfrom ._ast import (\n    Function,\n    GrammarNode,\n    LiteralNode,\n    RegexNode,\n    RepeatNode,\n    RuleNode,\n    SelectNode,\n    SpecialToken,\n    SubgrammarNode,\n    _parse_tags,\n)\n\n\ndef string(s: str) -> LiteralNode:\n    return LiteralNode(s)\n\n\ndef regex(pattern: str) -> RegexNode:\n    return RegexNode(pattern)\n\n\ndef gen(\n    regex: str | None = None,\n    stop: str | None = None,\n    stop_regex: str | None = None,\n    suffix: str | None = None,\n    stop_capture: str | None = None,\n    name: str | None = None,\n    temperature: float | None = None,\n    max_tokens: int | None = None,\n    list_append: bool = False,\n) -> RuleNode:\n    if stop is not None and stop_regex is not None:\n        raise ValueError(\"You cannot specify both a stop and a stop_regex\")\n\n    stop_value: LiteralNode | RegexNode | None = None\n    if stop is not None:\n        stop_value = LiteralNode(stop)\n    elif stop_regex is not None:\n        stop_value = RegexNode(stop_regex)\n\n    node = RuleNode(\n        name=name or \"gen\",\n        value=RegexNode(regex),\n        capture=name,\n        stop=stop_value,\n        suffix=LiteralNode(suffix) if suffix else None,\n        stop_capture=stop_capture,\n        list_append=list_append,\n        temperature=temperature,\n        max_tokens=max_tokens,\n    )\n    return node\n\n\ndef select(\n    options: Sequence[str | int | float | GrammarNode],\n    name: str | None = None,\n    list_append: bool = False,\n) -> GrammarNode:\n    \"\"\"Choose between a set of options.\n\n    This function constrains the next generation from the LLM to be one of the\n    given `options`.\n    If the list only has a single element, then that value can be returned\n    immediately, without calling the LLM.\n\n        >>> lm += select([\"Temeraire\", \"Redoutable\", \"Bucentaure\"], name=\"my_selection\")\n        >>> print(lm[\"my_selection\"])\n        Temeraire\n\n    Parameters\n    ----------\n    name : str or None\n        If this is not None then the the results of the generation will be saved as a variable on\n        the Model object (so you can access the result as `lm[\"var_name\"]`).\n\n    options : list\n        The set of available choices for the next generation\n\n    list_append : bool\n        If this is True then the results saved to `lm[name]` will not be written directly but rather appended\n        to a list (if no list with the current name is present one will be created). This is useful for\n        building lists inside python loops.\n    \"\"\"\n    alternatives: list[GrammarNode] = []\n    for v in options:\n        if isinstance(v, (int, float)):\n            alternatives.append(string(str(v)))\n        elif isinstance(v, str):\n            node = _parse_tags(v)\n            if isinstance(node, Function):\n                raise ValueError(\"You cannot select between stateful functions in the current guidance implementation!\")\n            if callable(node):\n                raise ValueError(\n                    \"Did you pass a function without calling it to select? You need to pass the results of a called guidance function to select.\"\n                )\n            alternatives.append(node)\n        elif isinstance(v, GrammarNode):\n            alternatives.append(v)\n        else:\n            raise ValueError(f\"Option {v} is not a valid type: {type(v)}\")\n\n    return RuleNode(\n        name=name or \"select\",\n        value=SelectNode(tuple(alternatives)),\n        capture=name,\n        list_append=list_append,\n    )\n\n\ndef repeat(value: str | int | float | GrammarNode, min: int, max: int | None = None) -> GrammarNode:\n    node: GrammarNode\n    if isinstance(value, (int, float)):\n        node = string(str(value))\n    elif isinstance(value, str):\n        _node = _parse_tags(value)\n        if isinstance(_node, Function):\n            raise ValueError(\"You cannot repeat a stateful function in the current guidance implementation!\")\n        if callable(_node):\n            raise ValueError(\n                \"Did you pass a function without calling it? You need to pass the results of a called guidance function to repeat.\"\n            )\n        node = _node\n    elif isinstance(value, GrammarNode):\n        node = value\n    else:\n        raise ValueError(f\"Value {value} is not a valid type: {type(value)}\")\n\n    return RuleNode(\n        name=\"repeat\",\n        value=RepeatNode(node, min, max),\n    )\n\n\ndef token_limit(value: GrammarNode, max_tokens: int) -> RuleNode:\n    \"\"\"This sets the token limit to be used for the given portion of the grammar.\"\"\"\n\n    def inner(value: GrammarNode) -> RuleNode:\n        if isinstance(value, RuleNode):\n            return dataclasses.replace(value, max_tokens=max_tokens)\n        else:\n            return RuleNode(name=\"token_limit\", value=value, max_tokens=max_tokens)\n\n    try:\n        return inner(value)\n    except ValueError:\n        return inner(subgrammar(value))\n\n\ndef with_temperature(value: GrammarNode, temperature: float) -> RuleNode:\n    \"\"\"This sets the sampling temperature to be used for the given portion of the grammar.\n\n    Note that if the grammar passed to us already has some portions with a temperature\n    setting in place, those settings will not be overridden.\n    \"\"\"\n\n    def inner(value: GrammarNode) -> RuleNode:\n        if isinstance(value, RuleNode):\n            return dataclasses.replace(value, temperature=temperature)\n        else:\n            return RuleNode(name=\"with_temperature\", value=value, temperature=temperature)\n\n    try:\n        return inner(value)\n    except ValueError:\n        return inner(subgrammar(value))\n\n\ndef capture(value: GrammarNode, name: str, list_append: bool = False) -> RuleNode:\n    if isinstance(value, RuleNode) and value.capture is None:\n        return dataclasses.replace(value, capture=name, list_append=list_append)\n    else:\n        return RuleNode(name=\"capture\", value=value, capture=name, list_append=list_append)\n\n\ndef subgrammar(\n    body: GrammarNode,\n    name: str | None = None,\n    skip_regex: str | None = None,\n    max_tokens: int | None = None,\n    temperature: float | None = None,\n) -> RuleNode:\n    capture_name = name\n    name = name or (body.name if isinstance(body, RuleNode) else \"subgrammar\")\n    node = RuleNode(name=name or \"subgrammar\", value=SubgrammarNode(body=body, skip_regex=skip_regex))\n    if max_tokens:\n        node = token_limit(node, max_tokens)\n    if temperature:\n        node = with_temperature(node, temperature)\n    if capture_name:\n        node = capture(node, capture_name)\n    return node\n\n\ndef special_token(token: str) -> SpecialToken:\n    match = re.match(r\"<([^<>]+)>\", token)\n    if not match:\n        # TODO: Support special tokens that do not start and end with '<' and '>' -- requires a PR to llguidance\n        raise ValueError(\n            f\"Only special tokens that start and end with '<' and '>' are currently supported, got: {token}\"\n        )\n    return SpecialToken(match.group(1))\n\n\ndef quote_regex(value: str) -> str:\n    return re.sub(r\"([\\\\+*?^$(){}\\[\\]\\.|])\", r\"\\\\\\1\", value)\n"
  },
  {
    "path": "guidance/_guidance.py",
    "content": "import dataclasses\nimport functools\nimport inspect\nimport threading\nimport weakref\nfrom contextvars import ContextVar\nfrom typing import Any\n\nfrom ._ast import Function, RuleNode, RuleRefNode\nfrom ._grammar import string\nfrom ._utils import make_weak_bound_method, signature_pop, strip_multiline_string_indents\nfrom .models import Model\n\n_in_stateless_context: ContextVar[bool] = ContextVar(\"in_stateless_context\", default=False)\n\n\ndef guidance(\n    f=None,\n    *,\n    stateless=False,\n    cache=False,\n    dedent=True,\n    model=Model,\n):\n    \"\"\"Decorator used to define guidance grammars\"\"\"\n    # if we are not yet being used as a decorator, then save the args\n\n    if f is None:\n        return functools.partial(\n            guidance,\n            stateless=stateless,\n            cache=cache,\n            dedent=dedent,\n            model=model,\n        )\n\n    # this strips out indentation in multiline strings that aligns with the current python indentation\n    if dedent is True or dedent == \"python\":\n        f = strip_multiline_string_indents(f)\n\n    return GuidanceFunction(f, stateless=stateless, cache=cache, model=model)\n\n\nclass GuidanceFunction:\n    def __init__(\n        self,\n        f,\n        *,\n        stateless=False,\n        cache=False,\n        model=Model,\n    ):\n        self.f = f\n        self.stateless = stateless\n        self.cache = cache\n        self.model = model\n        self._impl = _decorator(f, stateless=stateless, cache=cache, model=model)\n        self._methods: dict[Any, GuidanceMethod] = {}\n\n        # Update self with the wrapped function's metadata\n        functools.update_wrapper(self, self._impl)\n        # Pretend to be one level of wrapping lower than we are\n        self.__wrapped__ = self._impl.__wrapped__\n\n    def __call__(self, *args, **kwargs):\n        return self._impl(*args, **kwargs)\n\n    def __get__(self, instance, owner=None, /):\n        \"\"\"\n        Return a GuidanceMethod bound to the instance.\n        \"\"\"\n        if instance is None:\n            return self\n        return GuidanceMethod.from_guidance_function(self, instance)\n\n    def __repr__(self):\n        return f\"<GuidanceFunction {self.__module__}.{self.__qualname__}{self.__signature__}>\"\n\n\nclass GuidanceMethod:\n    impl_cache = {}\n\n    def __init__(self, impl, instance):\n        # Make object that looks like a method (__self__ and __func__) in order to be able to better support weak referencing via weakref.WeakMethod\n        # Note we keep a hard reference to the instance to keep it (and therefore our cached impl) alive as long as we are alive\n        self.__self__ = instance\n        self.__func__ = impl\n\n        # Update self with the wrapped function's metadata\n        functools.update_wrapper(self, impl)\n        # Pretend to be one level of wrapping lower than we are\n        self.__wrapped__ = impl.__wrapped__\n\n    @classmethod\n    def from_guidance_function(cls, guidance_function: GuidanceFunction, instance: Any) -> \"GuidanceMethod\":\n        # We can't directly use a weakref.WeakKeyDictionary because those don't really work when the key objects\n        # are allowed to change their hash value.\n\n        # Instead use instance hash in addition to identity to make sure we miss the cache if the instance is meaningfully mutated.\n        # This should be safe because an id will only be reused after the original object is garbage collected, at which point we\n        # should have removed the cache entry (since we use weakref.finalize to remove the cache entry when the instance is deleted).\n        key = (guidance_function.f, hash(instance), id(instance))\n        try:\n            impl = cls.impl_cache[key]\n        except KeyError:\n            # Make a weak bound method to prevent the instance from being kept alive by the cache\n            weak_method = make_weak_bound_method(guidance_function.f, instance)\n            impl = _decorator(\n                weak_method,\n                stateless=guidance_function.stateless,\n                cache=guidance_function.cache,\n                model=guidance_function.model,\n            )\n            cls.impl_cache[key] = impl\n            # Clean up the cache when the instance is deleted\n            weakref.finalize(instance, cls.impl_cache.pop, key)\n        return cls(impl, instance)\n\n    def __call__(self, *args, **kwargs):\n        return self.__func__(*args, **kwargs)\n\n    def __repr__(self):\n        return f\"<bound GuidanceMethod {self.__qualname__} of {self.__self__!r}>\"\n\n\n_null_grammar = string(\"\")\n\n\ndef _decorator(f, *, stateless, cache, model):\n    # we cache the function itself if requested\n    # do this before updating the wrapper so we can maintain the __wrapped__ chain\n    if cache:\n        f = functools.cache(f)\n\n    # Use thread local to store the reference to the grammar node for recursive calls\n    # Otherwise, shared state between threads may otherwise trick us into thinking we are in a recursive call\n    thread_local = threading.local()\n\n    @functools.wraps(f)\n    def wrapped(*args, **kwargs):\n        # make a stateless grammar if we can\n        if stateless is True or (callable(stateless) and stateless(*args, **kwargs)):\n            # if we have a (deferred) reference set, then we must be in a recursive definition and so we return the reference\n            reference = getattr(thread_local, \"_self_call_reference_\", None)\n            if reference is not None:\n                return reference\n\n            # otherwise we call the function to generate the grammar\n            else:\n                # set the stateless context variable so that others can detect that we're currently calling a stateless function\n                token = _in_stateless_context.set(True)\n\n                # set a RuleRefNode for recursive calls (only if we don't have arguments that might make caching a bad idea)\n                no_args = len(args) + len(kwargs) == 0\n                if no_args:\n                    thread_local._self_call_reference_ = RuleRefNode()\n\n                try:\n                    # call the function to get the grammar node\n                    node = f(_null_grammar, *args, **kwargs)\n                except:\n                    raise\n                else:\n                    # If we're just wrapping a RuleNode, don't add an extra layer of RuleNode\n                    if isinstance(node, RuleNode):\n                        rule = dataclasses.replace(node, name=f.__name__)\n                    else:\n                        rule = RuleNode(name=f.__name__, value=node)\n                    # set the reference value with our generated node\n                    if no_args:\n                        thread_local._self_call_reference_.set_target(rule)\n                finally:\n                    # Reset the stateless context back to the previous value\n                    _in_stateless_context.reset(token)\n                    # Clean up the thread local reference\n                    if no_args:\n                        del thread_local._self_call_reference_\n\n                return rule\n\n        # otherwise must be stateful (which means we can't be inside a select() call)\n        else:\n            return Function(f, args, kwargs)\n\n    # Remove the first argument from the wrapped function since we're going to drop the `lm` argument\n    wrapped.__signature__ = signature_pop(inspect.signature(f), 0)\n\n    # attach this as a method of the model class (if given)\n    # if model is not None:\n    #     setattr(model, f.__name__, f)\n\n    return wrapped\n"
  },
  {
    "path": "guidance/_guidance.pyi",
    "content": "import sys\nfrom contextvars import ContextVar\nfrom typing import (\n    Any,\n    Callable,\n    Literal,\n    TypeVar,\n    overload,\n)\n\nif sys.version_info >= (3, 10):\n    from typing import Concatenate, ParamSpec, TypeAlias\nelse:\n    from typing_extensions import Concatenate, ParamSpec, TypeAlias\n\nfrom ._ast import Function, RuleNode\nfrom .models import Model\n\n_in_stateless_context: ContextVar[bool]\n\nP = ParamSpec(\"P\")\nM: TypeAlias = Any  # sort of Union[Model, GrammarNode]?\nR = TypeVar(\"R\", bound=Function | RuleNode)\nGuidanceWrappable = Callable[Concatenate[M, P], M]\nGuidanceFunction = Callable[P, R]\nStatefulGuidanceFunction = GuidanceFunction[P, Function]\nStatelessGuidanceFunction = GuidanceFunction[P, RuleNode]\n\n@overload\ndef guidance(\n    f: GuidanceWrappable[P],\n    *,\n    stateless: Literal[False] = False,\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> StatefulGuidanceFunction[P]: ...\n@overload\ndef guidance(\n    f: None = None,\n    *,\n    stateless: Literal[False] = False,\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> Callable[[GuidanceWrappable[P]], StatefulGuidanceFunction[P]]: ...\n@overload\ndef guidance(\n    f: GuidanceWrappable[P],\n    *,\n    stateless: Literal[True],\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> StatelessGuidanceFunction[P]: ...\n@overload\ndef guidance(\n    f: None = None,\n    *,\n    stateless: Literal[True],\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> Callable[[GuidanceWrappable[P]], StatelessGuidanceFunction[P]]: ...\n@overload\ndef guidance(\n    f: GuidanceWrappable[P],\n    *,\n    stateless: Callable[..., bool],\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> GuidanceFunction[P, Function | RuleNode]: ...\n@overload\ndef guidance(\n    f: None = None,\n    *,\n    stateless: Callable[..., bool],\n    cache: bool = ...,\n    dedent: bool = ...,\n    model: type[Model] = ...,\n) -> Callable[[GuidanceWrappable[P]], GuidanceFunction[P, Function | RuleNode]]: ...\n"
  },
  {
    "path": "guidance/_parser.py",
    "content": "import os\nimport time\nfrom concurrent.futures import Future, ThreadPoolExecutor\nfrom typing import TYPE_CHECKING, Any, Generator\n\nimport llguidance  # type: ignore[import-untyped]\nimport numpy as np\nfrom numpy.typing import NDArray\n\nfrom ._schema import GenData, LegacyEngineCallResponse, LLInterpreterResponse\n\nif TYPE_CHECKING:\n    from .models._engine import Tokenizer\n\n\nclass TokenParserException(Exception):\n    pass\n\n\nclass InvalidTokenException(TokenParserException):\n    def __init__(self, token: int, valid_tokens: list[int]):\n        self.token = token\n        self.valid_tokens = valid_tokens\n        super().__init__(f\"Invalid token {token}, expected one of {valid_tokens}\")\n\n\nclass TokenParser:\n    def __init__(\n        self,\n        grammar: str,\n        tokenizer: \"Tokenizer\",\n        enable_backtrack: bool = True,\n        enable_ff_tokens: bool = True,\n    ):\n        self.tokenizer = tokenizer\n        self.ll_tokenizer = tokenizer._ll_tokenizer\n        self.ll_interpreter = llguidance.LLInterpreter(\n            self.ll_tokenizer,\n            grammar,\n            enable_backtrack,\n            enable_ff_tokens,\n            log_level=int(os.environ.get(\"LLGUIDANCE_LOG_LEVEL\", \"1\")),\n        )\n        self._threadpool = ThreadPoolExecutor(max_workers=1)\n        self._generator = self._parse()\n        self._done = False\n        self._has_pending_stop = False\n\n    def is_accepting(self) -> bool:\n        return self.ll_interpreter.is_accepting()\n\n    def done(self) -> bool:\n        return self._done\n\n    def advance(\n        self, token_id: int | None\n    ) -> tuple[\n        int,\n        list[int],\n        Future[tuple[bytes | None, LLInterpreterResponse, float]],\n    ]:\n        if self.done():\n            raise TokenParserException(\"Cannot advance on a done parser\")\n\n        return self._generator.send(token_id)\n\n    def has_pending_stop(self) -> bool:\n        return self._has_pending_stop\n\n    def process_prompt(\n        self, prompt_tokens: list[int], ensure_bos_token: bool = True\n    ) -> tuple[\n        list[int],  # prefix_tokens\n        int,  # backtrack\n        list[int],  # ff_tokens\n        # mask: Optional[bytes] (None if stop), ll_response: LLInterpreterResponse\n        Future[tuple[bytes | None, LLInterpreterResponse]],\n    ]:\n        new_prompt_tokens = self.ll_interpreter.process_prompt(prompt_tokens)\n        if (\n            ensure_bos_token\n            and self.tokenizer.bos_token_id is not None\n            and new_prompt_tokens[:1] != [self.tokenizer.bos_token_id]\n        ):\n            assert prompt_tokens[:1] != [self.tokenizer.bos_token_id]\n            prefix_tokens = [self.tokenizer.bos_token_id]\n        else:\n            prefix_tokens = []\n\n        _backtrack, _ff_tokens, mask_fut = self._generator.send(None)\n        assert _backtrack == 0\n        assert _ff_tokens == []\n\n        # Apply the prefix tokens before computing the backtrack\n        prompt_tokens = prefix_tokens + prompt_tokens\n        new_prompt_tokens = prefix_tokens + new_prompt_tokens\n\n        # Compute backtrack and ff_tokens s.t.\n        # new_prompt_tokens == (\n        #       prompt_tokens[:-backtrack] if backtrack > 0\n        #       else prompt_tokens\n        #   ) + ff_tokens\n        backtrack = len(prompt_tokens)\n        for old, new in zip(prompt_tokens, new_prompt_tokens, strict=False):\n            if old != new:\n                break\n            backtrack -= 1\n        common_len = len(prompt_tokens) - backtrack\n        ff_tokens = new_prompt_tokens[common_len:]\n\n        return prefix_tokens, backtrack, ff_tokens, mask_fut\n\n    def compute_mask(self) -> tuple[bytes | None, LLInterpreterResponse, float]:\n        t0 = time.monotonic()\n        mask, ll_response_string = self.ll_interpreter.compute_mask()\n        ll_response = LLInterpreterResponse.model_validate_json(ll_response_string)\n        return mask, ll_response, (time.monotonic() - t0) * 1000\n\n    def _parse(\n        self,\n    ) -> Generator[\n        tuple[\n            int,  # backtrack\n            list[int],  # ff_tokens\n            # mask: Optional[bytes] (None if stop), ll_response: LLInterpreterResponse, mask_compute_ms: float\n            Future[tuple[bytes | None, LLInterpreterResponse, float]],\n        ],\n        int | None,\n        None,\n    ]:\n        backtrack = 0\n        ff_tokens: list[int] = []\n        token_id: int | None = None\n        while True:\n            # Note: need to call/set has_pending_stop before spinning up the compute mask\n            # future as the two methods cannot be called concurrently\n            self._has_pending_stop = self.ll_interpreter.has_pending_stop()\n            compute_mask_future = self._threadpool.submit(self.compute_mask)\n\n            # Send caller the mask and response; wait for token\n            token_id = yield (backtrack, ff_tokens, compute_mask_future)\n\n            # Upstairs should have already waited on this future\n            mask, r, _ = compute_mask_future.result()\n\n            if r.stop:\n                # This is the only case in which the mask is None\n                assert mask is None\n                # If we're done, our caller should NOT send us a token\n                if token_id is not None:\n                    raise TokenParserException(f\"Expected None, got token {token_id}\")\n                self._done = True\n                break\n\n            assert mask is not None\n            assert r.temperature is not None\n\n            if token_id is None:\n                raise TokenParserException(\"Expected token, got None\")\n\n            if not mask[token_id]:\n                # Note: we could punt this probem to ll_interpreter.post_process,\n                # but it's a bit clearer to handle it here\n                raise InvalidTokenException(\n                    token=token_id,\n                    valid_tokens=[i for i in range(len(mask)) if mask[i]],\n                )\n\n            backtrack, ff_tokens = self.ll_interpreter.commit_token(token_id)\n\n    def cleanup(self):\n        # Rather than having our caller send us None at the end, we'll handle that internally\n        # so we can (1) verify that the generator actually stops and (2) check the stop reason\n        # and raise if needed\n        if not self.done():\n            try:\n                self._generator.send(None)\n            except StopIteration:\n                pass\n        if not self.done():\n            raise TokenParserException(\"Tried to cleanup but parser is not done\")\n        stop_reason = self.ll_interpreter.stop_reason()\n        if stop_reason not in {\"NoExtension\", \"EndOfSentence\"}:\n            # Will raise if there is some \"bad\" stop reason (like hit token limit) OR we're NOT stopped.\n            # TODO: raise specific exceptions for reasons such as MaxTokensTotal\n            raise TokenParserException(f\"Unexpected stop reason: {stop_reason}\")\n\n\nclass ByteParserException(Exception):\n    def __init__(self, *args, **kwargs):\n        self.current_byte = kwargs.pop(\"current_byte\", None)\n        self.allowed_bytes = kwargs.pop(\"allowed_bytes\", None)\n        self.consumed_bytes = kwargs.pop(\"consumed_bytes\", None)\n        super().__init__(*args, **kwargs)\n\n\nclass ByteParser:\n    def __init__(\n        self,\n        grammar: str,\n    ):\n        # TODO: figure out this circular import\n        from .models._byte_tokenizer import ByteTokenizer\n\n        self.tokenizer = ByteTokenizer()\n        self.token_parser = TokenParser(grammar, self.tokenizer)\n        self.bytes = b\"\"\n        self.gen_data: GenData | None = None\n        self.pos = 0\n        self._variables: dict[str, Any] = {}\n        self._variables_log_probs: dict[str, Any] = {}\n        # Prime the parser\n        self._advance(None)\n\n    def matched(self) -> bool:\n        if self.pos < len(self.bytes):\n            return False\n        return self.token_parser.is_accepting()\n\n    def valid_next_bytes(self) -> set[bytes]:\n        if self.pos < len(self.bytes):\n            return {self.bytes[self.pos : self.pos + 1]}\n        if self.gen_data is None:\n            return set()\n        return {bytes([t]) for t in self.gen_data.valid_next_tokens if t != self.tokenizer.eos_token_id}\n\n    def next_byte_mask(self) -> NDArray[np.uint8]:\n        mask = np.zeros(256, dtype=np.uint8)\n        for t in self.valid_next_bytes():\n            mask[t[0]] = 1\n        return mask\n\n    def _advance(self, token_id: int | None) -> None:\n        if self.gen_data is not None:\n            tokens = self.gen_data.tokens\n        else:\n            tokens = []\n        if token_id is None:\n            assert tokens == []\n            prefix_tokens, backtrack, ff_tokens, compute_mask_future = self.token_parser.process_prompt(tokens)\n            tokens += prefix_tokens\n        else:\n            backtrack, ff_tokens, compute_mask_future = self.token_parser.advance(token_id)\n        if backtrack:\n            tokens = tokens[:-backtrack]\n        tokens += ff_tokens\n        mask, ll_response, _ = compute_mask_future.result()\n        if ll_response.stop:\n            assert mask is None\n            self.token_parser.cleanup()\n            self.gen_data = None\n        else:\n            assert mask is not None\n            assert ll_response.temperature is not None\n            self.gen_data = GenData(\n                tokens=tokens,\n                mask=mask,\n                temperature=ll_response.temperature,\n            )\n        response = ll_response.progress.to_engine_call_response()\n        self._update_capture(response)\n        self.bytes += response.new_bytes\n\n    def consume_bytes(self, bts: bytes) -> None:\n        if not bts:\n            return\n\n        b = bts[0]\n        # If the current position is less than the length of the bytes, then we are in fast_forward mode\n        # and we need to make sure that the byte we are consuming is the same as the byte at the current\n        # position\n        if self.pos < len(self.bytes):\n            if b != self.bytes[self.pos]:\n                next_byte = self.bytes[self.pos : self.pos + 1]\n                raise ByteParserException(\n                    f\"Expected byte {next_byte!r} (fast_forward), got {bytes([b])!r}\",\n                    current_byte=bytes([b]),\n                    allowed_bytes={next_byte},\n                    consumed_bytes=self.bytes[: self.pos],\n                )\n            # Byte was good, move to the next byte\n            self.pos += 1\n            self.consume_bytes(bts[1:])\n        else:\n            # If we are here, then we are either in generation mode or we are done.\n            if self.gen_data is None:\n                # TODO: may run into trouble here if we need to backtrack\n                assert self.token_parser.done()\n                assert not self.valid_next_bytes()\n                raise ByteParserException(\n                    f\"Expected end of input, got {bytes([b])!r}\",\n                    current_byte=bytes([b]),\n                    allowed_bytes=set(),\n                    consumed_bytes=self.bytes[: self.pos],\n                )\n            # We're in generation mode. Assure that the byte is one of the valid next bytes\n            if b not in self.gen_data.valid_next_tokens:\n                valid_next_bytes = self.valid_next_bytes()\n                raise ByteParserException(\n                    f\"Expected one of the following bytes: {valid_next_bytes!r}, got {bytes([b])!r}\",\n                    current_byte=bytes([b]),\n                    allowed_bytes=valid_next_bytes,\n                    consumed_bytes=self.bytes[: self.pos],\n                )\n            # Byte was good, have ll_parser consume it so we can advance further\n            self._advance(b)\n\n            # Run consume_bytes to advance ll_parser and consume the next byte\n            self.consume_bytes(bts)\n\n    def force_done(self):\n        if not self.matched():\n            raise ByteParserException(\"Hit end of input before reaching a valid state\")\n        if self.token_parser.done():\n            return\n\n        self._advance(self.tokenizer.eos_token_id)\n        if not self.token_parser.done() or not self.matched():\n            raise ByteParserException(\"Hit end of input before reaching a valid state\")\n\n    def get_captures(self):\n        return self._variables, self._variables_log_probs\n\n    def _update_capture(self, response: LegacyEngineCallResponse):\n        # Stolen from model. TODO: refactor to share code\n        for k in response.capture_groups:\n            v = response.capture_groups[k]\n\n            # see if we are in a list_append mode\n            if isinstance(v, list):\n                for i, inner_v in enumerate(v):\n                    # convert to a string if possible\n                    # TODO: will need to not just always do this once we support images etc.\n                    try:\n                        inner_v = inner_v.decode(\"utf8\") if isinstance(inner_v, bytes) else inner_v\n                    except UnicodeDecodeError:\n                        pass\n\n                    if k not in self._variables or not isinstance(self._variables[k], list):\n                        self._variables[k] = []\n                        self._variables_log_probs[k] = []\n                    self._variables[k].append(inner_v)\n                    self._variables_log_probs[k].append(response.capture_group_log_probs[k][i])\n\n            # ...or standard assignment mode\n            else:\n                # convert to a string if possible\n                # TODO: will need to not just always do this once we support images etc.\n                try:\n                    v = v.decode(\"utf8\") if isinstance(v, bytes) else v\n                except UnicodeDecodeError:\n                    pass\n                self._variables[k] = v\n                self._variables_log_probs[k] = response.capture_group_log_probs[k]\n"
  },
  {
    "path": "guidance/_schema.py",
    "content": "from functools import cached_property\nfrom typing import Any, Callable, Literal, Set, TypedDict\n\nfrom annotated_types import Ge, Le\nfrom pydantic import BaseModel, Field, NonNegativeInt, RootModel, computed_field, model_validator\nfrom typing_extensions import Annotated\n\n\nclass TokenUsage(BaseModel):\n    input_tokens: NonNegativeInt = 0\n    \"\"\"Number of tokens used as input to the model, inclusive of cached_input_tokens.\"\"\"\n\n    cached_input_tokens: NonNegativeInt = 0\n    \"\"\"Number of input tokens that were already in the KV cache.\"\"\"\n\n    forward_passes: NonNegativeInt = 0\n    \"\"\"Number of forward passes made to the model.\"\"\"\n\n    cached_output_tokens: NonNegativeInt = 0\n    \"\"\"Number of forward passes we avoided by hitting the KV cache.\"\"\"\n\n    ff_tokens: NonNegativeInt | None = None\n    \"\"\"Number of output tokens that were fast-forwarded by the parser (if applicable).\"\"\"\n\n    round_trips: NonNegativeInt = 0\n    \"\"\"Number of times a completion was generated. For remote models, this is the number of\n    API calls made to the model. For local models, this is the number of times we entered a\n    completion loop to generate output tokens.\"\"\"\n\n    total_latency_ms: Annotated[float, Ge(0)] = 0.0\n    \"\"\"Total latency of the model in milliseconds. This includes the time spent on all forward passes and\n    the time spent on fast-forwarding tokens (if applicable).\"\"\"\n\n    ttft_ms: Annotated[float, Ge(0)] = 0.0\n    \"\"\"Time to first token in ms\"\"\"\n\n    mask_times_ms: list[Annotated[float, Ge(0)]] = Field(default_factory=list)\n    \"\"\"List of mask times in ms for each token generated.\"\"\"\n\n    mask_overheads_ms: list[Annotated[float, Ge(0)]] = Field(default_factory=list)\n    \"\"\"List of mask overhead times in ms for each token generated.\"\"\"\n\n    ttfm_ms: Annotated[float, Ge(0)] = 0.0\n    \"\"\"Time to first mask in ms\"\"\"\n\n    @computed_field  # type: ignore[misc]\n    @property\n    def output_tokens(self) -> NonNegativeInt:\n        \"\"\"Total number of output tokens generated by the model, inclusive of cached_output_tokens and ff_tokens.\n\n        Note that this may overcount the actual number of tokens generated if some tokens were backtracked or some\n        forward passes were used just to pre-fill or compute probabilities for visualization\"\"\"\n        return self.forward_passes + self.cached_output_tokens + (self.ff_tokens or 0)\n\n    @computed_field  # type: ignore[misc]\n    @property\n    def token_savings(self) -> Annotated[float, Ge(0), Le(1)] | None:\n        \"\"\"The fraction of output tokens that were fast-forwarded by the parser (if applicable).\"\"\"\n        if self.ff_tokens is None:\n            return None\n        if self.output_tokens == 0:\n            return 0.0\n        return self.ff_tokens / self.output_tokens\n\n    @computed_field  # type: ignore[misc]\n    @property\n    def avg_latency_ms(self) -> float:\n        \"\"\"Average latency of tokens generated by the model.\"\"\"\n        if self.output_tokens == 0:\n            return 0.0\n        return self.total_latency_ms / self.output_tokens\n\n    def __add__(self, other: \"TokenUsage\") -> \"TokenUsage\":\n        if self.ff_tokens is None and other.ff_tokens is None:\n            ff_tokens = None\n        else:\n            ff_tokens = (self.ff_tokens or 0) + (other.ff_tokens or 0)\n\n        ttft_ms = other.ttft_ms\n        ttfm_ms = other.ttfm_ms\n\n        return TokenUsage(\n            ff_tokens=ff_tokens,\n            ttft_ms=ttft_ms,\n            ttfm_ms=ttfm_ms,\n            **{\n                field: getattr(self, field) + getattr(other, field)\n                for field in set(self.__class__.model_fields) - {\"ff_tokens\", \"ttft_ms\", \"ttfm_ms\"}\n            },\n        )\n\n\nclass EngineResponse(BaseModel):\n    new_bytes: bytes\n    backtrack_bytes: bytes\n    capture_groups: dict\n    capture_group_log_probs: dict\n    backtrack: NonNegativeInt = 0  # number of tokens was backtracked by the parser\n    tokens: list[\"GenToken\"] = []  # tokens associated with the generated bytes\n    injection_backtrack: bool = False  # if True, backtrack should be processed before adding new_bytes\n\n\nclass LegacyEngineCallResponse(BaseModel):\n    new_bytes: bytes\n    is_generated: bool\n    new_bytes_prob: float\n    capture_groups: dict\n    capture_group_log_probs: dict\n    new_token_count: NonNegativeInt\n    backtrack: NonNegativeInt = 0  # number of tokens was backtracked by the parser\n    latency_ms: NonNegativeInt = 0  # time taken by the engine to generate the output chunk\n    generated_bytes: bytes = b\"\"  # bytes generated by the engine\n    generated_tokens: list[\"GenToken\"] = []  # tokens associated with the generated bytes\n    force_forwarded_bytes: bytes = b\"\"  # bytes that were forced forwards by the parser\n    force_forwarded_tokens: list[\"GenToken\"] = []  # tokens associated with the forced forwarded bytes\n\n\nclass GenToken(BaseModel):\n    token_id: int\n    bytes: bytes\n    prob: float = float(\"nan\")\n    latency_ms: float = 0.0\n    is_masked: bool = False  # true if this token was ignored by the parser\n    is_generated: bool = False  # true if this token was generated by the engine\n    is_force_forwarded: bool = False  # true if this token was forced forwarded by the parser\n    is_input: bool = False  # true if this token was part of the input\n    is_backtracked: bool = False  # true if this token was backtracked by the parser\n\n\nclass GenTokenExtra(GenToken):\n    top_k: list[\"GenToken\"] = []\n\n\nclass GenData(BaseModel):\n    tokens: list[int]\n    mask: bytes\n    temperature: float\n\n    @computed_field  # type: ignore[misc]\n    @cached_property\n    def valid_next_tokens(self) -> list[int]:\n        return [i for i, b in enumerate(self.mask) if b != 0]\n\n\nclass LLProgressCapture(BaseModel):\n    object: Literal[\"capture\"]\n    name: str\n    hex: str\n    log_prob: float\n    list_append: bool = False\n\n    @model_validator(mode=\"before\")\n    def strip_list_append_prefix(cls, values):\n        name = values[\"name\"]\n        if name.startswith(\"__LIST_APPEND:\"):\n            values[\"name\"] = name[14:]\n            # Override whatever was set\n            values[\"list_append\"] = True\n        return values\n\n\nclass LLProgressText(BaseModel):\n    object: Literal[\"text\"]\n    hex: str\n    num_tokens: NonNegativeInt\n    log_prob: float\n    is_generated: bool\n\n\nclass LLProgressFinalText(BaseModel):\n    object: Literal[\"final_text\"]\n    # we don't need to handle this for now\n\n\nLLProgressItem = Annotated[\n    LLProgressCapture | LLProgressText | LLProgressFinalText,\n    Field(discriminator=\"object\"),\n]\n\n\nclass LLProgress(RootModel):\n    root: list[LLProgressItem]\n\n    def to_engine_call_response(self) -> LegacyEngineCallResponse:\n        new_bytes = b\"\"\n        new_token_count = 0\n        new_bytes_prob = 0.0\n        is_generated = False\n        capture_groups: dict[str, Any] = {}\n        capture_group_log_probs: dict[str, Any] = {}\n        num_text_entries = 0\n\n        for j in self.root:\n            if isinstance(j, LLProgressCapture):\n                is_generated = True\n                cname = j.name\n                data = bytes.fromhex(j.hex)\n                if j.list_append:\n                    if cname not in capture_groups or not isinstance(capture_groups[cname], list):\n                        capture_groups[cname] = []\n                        capture_group_log_probs[cname] = []\n                    capture_groups[cname].append(data)\n                    capture_group_log_probs[cname].append(j.log_prob)\n                else:\n                    capture_groups[cname] = data\n                    capture_group_log_probs[cname] = j.log_prob\n            elif isinstance(j, LLProgressText):\n                # it actually should only happen once per round...\n                new_bytes += bytes.fromhex(j.hex)\n                new_token_count += j.num_tokens\n                new_bytes_prob += j.log_prob\n                is_generated |= j.is_generated\n                num_text_entries += 1\n        if num_text_entries > 0:\n            new_bytes_prob /= num_text_entries\n\n        return LegacyEngineCallResponse(\n            new_bytes=new_bytes,\n            new_token_count=new_token_count,\n            new_bytes_prob=new_bytes_prob,\n            is_generated=is_generated,\n            capture_groups=capture_groups,\n            capture_group_log_probs=capture_group_log_probs,\n        )\n\n\nclass LLInterpreterResponse(BaseModel):\n    progress: LLProgress\n    stop: bool\n    temperature: float | None\n\n\nclass SamplingParams(TypedDict):\n    top_p: float | None\n    top_k: int | None\n    min_p: float | None\n    repetition_penalty: float | None\n\n\nclass StepContext(TypedDict):\n    last_step_text: str\n    last_step_tokens: list[int]\n    all_text: str\n    all_tokens: list[int]\n    captures: dict\n    step_counter: int\n\n\nclass StepFeedback(TypedDict, total=False):\n    # Either injected_text (utf-8) or injected_bytes can be provided.\n    injected_text: str\n    injected_bytes: bytes\n\n\nclass StepConfig(TypedDict, total=False):\n    # Trigger every k generated tokens (including fast-forwarded and injected)\n    step_every_k: int\n    # Trigger when the last generated token id is in this set\n    step_stop_tokens: Set[str]\n    # Callback invoked at each step boundary\n    # Returns optional feedback to inject next.\n    callback: Callable[[StepContext], StepFeedback]\n"
  },
  {
    "path": "guidance/_tools.py",
    "content": "import builtins\nimport inspect\nimport textwrap\nimport traceback\nfrom types import TracebackType\nfrom typing import TYPE_CHECKING, Annotated, Any, Callable, Literal\n\nfrom pydantic import BaseModel, ConfigDict, Field, create_model, field_serializer\n\nif TYPE_CHECKING:\n    from ._ast import GrammarNode\n\n\nclass GrammarFormat(BaseModel):\n    type: Literal[\"grammar\"] = \"grammar\"\n    syntax: Literal[\"lark\", \"regex\"]\n    definition: str\n\n\n# Placeholder TypeAlias for possible future Union\nCustomFormat = GrammarFormat\n\n\nclass CustomTool(BaseModel):\n    type: Literal[\"custom\"] = \"custom\"\n    format: CustomFormat\n\n\nclass FunctionTool(BaseModel):\n    type: Literal[\"function\"] = \"function\"\n    parameters: builtins.type[BaseModel] | dict[str, Any]\n\n    @classmethod\n    def from_callable(cls, callable: Callable) -> \"FunctionTool\":\n        from guidance._guidance import GuidanceFunction\n\n        if isinstance(callable, GuidanceFunction):\n            raise TypeError(\n                \"An @guidance-wrapped function was passed to Tool.from_callable. The function must be called and return a valid grammar, which should be passed to Tool.from_grammar.\"\n            )\n\n        signature = inspect.signature(callable)\n        parameters = {}\n        for name, param in signature.parameters.items():\n            if param.kind not in {\n                inspect.Parameter.POSITIONAL_OR_KEYWORD,\n                inspect.Parameter.KEYWORD_ONLY,\n            }:\n                raise ValueError(f\"Unsupported parameter kind: {param.kind.description}\")\n            parameters[name] = param.annotation if param.annotation is not inspect.Parameter.empty else Any\n\n        return FunctionTool(\n            parameters=create_model(callable.__name__, __config__=ConfigDict(extra=\"forbid\"), **parameters),\n        )\n\n    def get_schema(self) -> dict[str, Any]:\n        \"\"\"\n        Returns the JSON schema for the function's parameters.\n        If the parameters are a Pydantic model, it will return the model's schema.\n        If they are a dict, it will return the dict as is.\n        \"\"\"\n        return self.serialize_parameters(self.parameters)\n\n    @field_serializer(\"parameters\", mode=\"plain\")\n    def serialize_parameters(self, parameters: builtins.type[BaseModel] | dict[str, Any]) -> dict[str, Any]:\n        if isinstance(parameters, type) and issubclass(parameters, BaseModel):\n            return parameters.model_json_schema()\n        elif isinstance(parameters, dict):\n            return parameters\n        else:\n            raise TypeError(f\"Unsupported parameters type: {type(parameters)}. Expected a Pydantic model or a dict.\")\n\n\nToolType = Annotated[FunctionTool | CustomTool, Field(discriminator=\"type\")]\n\n\nclass Tool(BaseModel):\n    name: str\n    description: str\n    tool: ToolType\n    callable: Callable\n    exc_formatter: Callable[[type[BaseException], BaseException, TracebackType], str] | None = None\n\n    def call(self, *args, **kwargs) -> Any:\n        try:\n            return self.callable(*args, **kwargs)\n        except BaseException as e:  # noqa: BLE001\n            # Skip the current stack frame to make sure our traceback starts inside of self.callable\n            tb = e.__traceback__.tb_next\n            assert tb is not None  # must exist\n            if self.exc_formatter is None:\n                return \"\".join(traceback.format_exception(type(e), e, tb))\n            return self.exc_formatter(type(e), e, tb)\n\n    @classmethod\n    def from_callable(\n        cls,\n        callable: Callable,\n        *,\n        name: str | None = None,\n        description: str | None = None,\n        parameters: builtins.type[BaseModel] | dict[str, Any] | None = None,\n    ) -> \"Tool\":\n        if parameters is not None:\n            tool = FunctionTool(parameters=parameters)\n        else:\n            tool = FunctionTool.from_callable(callable)\n\n        return Tool(\n            name=name or callable.__name__,\n            description=description or textwrap.dedent((callable.__doc__ or \"\").strip()),\n            tool=tool,\n            callable=callable,\n        )\n\n    @classmethod\n    def from_regex(\n        cls,\n        pattern: str,\n        callable: Callable,\n        *,\n        name: str | None = None,\n        description: str | None = None,\n    ) -> \"Tool\":\n        return Tool(\n            name=name or callable.__name__,\n            description=description or (callable.__doc__ or \"\").strip(),\n            tool=CustomTool(\n                format=GrammarFormat(\n                    syntax=\"regex\",\n                    definition=pattern,\n                ),\n            ),\n            callable=callable,\n        )\n\n    @classmethod\n    def from_lark(\n        cls,\n        lark: str,\n        callable: Callable,\n        *,\n        name: str | None = None,\n        description: str | None = None,\n    ) -> \"Tool\":\n        return Tool(\n            name=name or callable.__name__,\n            description=description or (callable.__doc__ or \"\").strip(),\n            tool=CustomTool(\n                format=GrammarFormat(\n                    syntax=\"lark\",\n                    definition=lark,\n                )\n            ),\n            callable=callable,\n        )\n\n    @classmethod\n    def from_grammar(\n        cls,\n        grammar: \"GrammarNode\",\n        callable: Callable,\n        *,\n        name: str | None = None,\n        description: str | None = None,\n    ) -> \"Tool\":\n        from guidance._guidance import GuidanceFunction\n\n        if isinstance(grammar, GuidanceFunction):\n            raise TypeError(\n                \"An @guidance-wrapped function was passed to Tool.from_grammar. The function must be called and return a valid grammar.\"\n            )\n\n        return cls.from_lark(lark=grammar.ll_grammar(), callable=callable, name=name, description=description)\n\n    def to_openai_style(self) -> dict[str, Any]:\n        if isinstance(self.tool, FunctionTool):\n            return {\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": self.name,\n                    \"description\": self.description,\n                    \"parameters\": self.tool.get_schema(),\n                    \"strict\": True,\n                },\n            }\n        elif isinstance(self.tool, CustomTool):\n            return {\n                \"type\": \"custom\",\n                \"custom\": {\n                    \"name\": self.name,\n                    \"description\": self.description,\n                    \"format\": {\n                        \"type\": \"grammar\",\n                        \"grammar\": {\n                            \"syntax\": self.tool.format.syntax,\n                            \"definition\": self.tool.format.definition,\n                        },\n                    },\n                },\n            }\n        else:\n            raise TypeError(f\"Unsupported tool type: {type(self.tool)}. Expected FunctionTool or CustomTool.\")\n\n    def with_name(self, name: str) -> \"Tool\":\n        if self.name == name:\n            return self\n        new_self = self.model_copy()\n        new_self.name = name\n        return new_self\n"
  },
  {
    "path": "guidance/_topics.py",
    "content": "\"\"\"Exchange topic constants for guidance message routing.\n\nThis module centralizes all topic constants used throughout the guidance\ncodebase for the TopicExchange message routing system.\n\"\"\"\n\n# Default topic for general message routing\nDEFAULT_TOPIC = \"/default\"\n\n# Metrics-related topics\nMETRICS_TOPIC = \"/metrics\"\n\n# Trace topics\nTRACE_TOPIC = \"/trace\"\n\n# Visual topics\nVISUAL_TOPIC = \"/visual\"\n\n__all__ = [\n    \"DEFAULT_TOPIC\",\n    \"METRICS_TOPIC\",\n    \"TRACE_TOPIC\",\n    \"VISUAL_TOPIC\",\n]\n"
  },
  {
    "path": "guidance/_utils.py",
    "content": "import ast\nimport asyncio\nimport functools\nimport http\nimport inspect\nimport json\nimport logging\nimport pathlib\nimport re\nimport sys\nimport textwrap\nimport types\nimport urllib\nimport weakref\nfrom typing import TYPE_CHECKING, Optional, cast\n\nimport numpy as np\nimport pydantic\n\nif TYPE_CHECKING:\n    from ._schema import SamplingParams\n\nlogger = logging.getLogger(__name__)\n\n\ndef bytes_from(src: str | pathlib.Path | bytes, allow_local: bool) -> bytes:\n    if isinstance(src, str) and re.match(r\"[^:/]+://\", src):\n        with urllib.request.urlopen(src) as response:\n            response = cast(http.client.HTTPResponse, response)\n            bytes_data = response.read()\n\n    # ...from a local path\n    elif allow_local and (isinstance(src, str) or isinstance(src, pathlib.Path)):\n        with open(src, \"rb\") as f:\n            bytes_data = f.read()\n\n    # ...from audio file bytes\n    elif isinstance(src, bytes):\n        bytes_data = src\n\n    else:\n        raise Exception(f\"Unable to load bytes from {src}!\")\n\n    return bytes_data\n\n\nclass _Rewrite(ast.NodeTransformer):\n    def __init__(self, source_lines):\n        self.source_lines = source_lines\n        self.indentation = [None for _ in source_lines]\n\n    def visit_JoinedStr(self, node):\n        for value in node.values:\n            if isinstance(value, ast.Constant) and isinstance(value.value, str):\n                self._dedent_constant(value, node.lineno)\n        return node\n\n    def visit_Constant(self, node):\n        if isinstance(node.value, str) and \"\\n\" in node.value:\n            self._dedent_constant(node, node.lineno)\n        return node\n\n    def _dedent_constant(self, node, lineno):\n        start_lineno = lineno - 1\n        start_line = self.source_lines[start_lineno]\n        indent = len(start_line) - len(start_line.lstrip())\n\n        if indent > 0:\n            new_lines = []\n            for line in node.value.split(\"\\n\"):\n                if line.startswith(\" \" * indent):\n                    new_lines.append(line[indent:])\n                else:\n                    new_lines.append(line)\n            node.value = \"\\n\".join(new_lines)\n\n\nclass normalize_notebook_stdout_stderr:\n    \"\"\"Remaps stdout and stderr back to their normal selves from what ipykernel did to them.\n\n    Based on: https://github.com/ipython/ipykernel/issues/795\n    \"\"\"\n\n    def __enter__(self):\n        normal_stdout = sys.__stdout__.fileno()\n        self.restore_stdout = None\n        if getattr(sys.stdout, \"_original_stdstream_copy\", normal_stdout) != normal_stdout:\n            self.restore_stdout = sys.stdout._original_stdstream_copy\n            sys.stdout._original_stdstream_copy = normal_stdout\n\n        normal_stderr = sys.__stderr__.fileno()\n        self.restore_stderr = None\n        if getattr(sys.stderr, \"_original_stdstream_copy\", normal_stderr) != normal_stderr:\n            self.restore_stderr = sys.stderr._original_stdstream_copy\n            sys.stderr._original_stdstream_copy = normal_stderr\n\n    def __exit__(self, exc_type, exc_value, traceback):\n        if self.restore_stdout is not None:\n            sys.stdout._original_stdstream_copy = self.restore_stdout\n        if self.restore_stderr is not None:\n            sys.stderr._original_stdstream_copy = self.restore_stderr\n\n\ndef strip_multiline_string_indents(f):\n    source = textwrap.dedent(inspect.getsource(f))\n    blanks = \"\\n\" * f.__code__.co_firstlineno  # pad the source so the lines in the file line up for the debugger\n    source = blanks + \"\\n\".join(source.splitlines()[1:])  # remove the decorator first line.\n\n    # define the external closure variables so f.__closure__ will match our recompiled version\n    if len(f.__code__.co_freevars) > 0:\n        raise Exception(\n            \"You currently must use @guidance(dedent=False) for closure functions (function nested within other functions that reference the outer functions variables)!\"\n        )\n    #       lines = source.split(\"\\n\")\n    #       lines[0] = \"def __outer__closure_wrap():\"\n    #       lines[1] = (\n    #           \"    \"\n    #           + \",\".join(f.__code__.co_freevars)\n    #           + \" = \"\n    #           + \",\".join(\"None\" for _ in f.__code__.co_freevars)\n    #       )\n    #       source = \"    \\n\".join(\n    #           lines\n    #       )  # TODO: this does not quite work because new_code_obj is now the __outer__closure_wrap() function...could be fixed with work...\n\n    old_code_obj = f.__code__\n    old_ast = ast.parse(source)\n    r = _Rewrite(source.split(\"\\n\"))\n    new_ast = r.visit(old_ast)\n    new_code_obj = compile(new_ast, old_code_obj.co_filename, \"exec\")\n\n    # find the code block\n    for i in range(len(new_code_obj.co_consts)):\n        if type(new_code_obj.co_consts[i]) == types.CodeType and new_code_obj.co_consts[i].co_name == f.__name__:\n            break\n    else:\n        raise RuntimeError(\"Could not find function code object in modified code!\")\n\n    # create a new function based on the modified code\n    new_f = types.FunctionType(\n        new_code_obj.co_consts[i],\n        f.__globals__,\n        name=f.__name__,\n        argdefs=f.__defaults__,\n        closure=f.__closure__,\n    )\n    new_f.__kwdefaults__ = f.__kwdefaults__\n    new_f.__qualname__ = f.__qualname__\n    new_f.__annotations__ = f.__annotations__\n    new_f.__doc__ = f.__doc__\n    new_f.__module__ = f.__module__\n    return new_f\n\n\ndef make_weak_bound_method(f, instance):\n    instance_ref = weakref.ref(instance)\n    instance_repr = repr(instance)\n\n    @functools.wraps(f)  # ish\n    def weak_bound_f(*args, **kwargs):\n        instance = instance_ref()\n        if instance is None:\n            raise ReferenceError(f\"Lost reference to {instance_repr} and cannot bind {f} to it.\")\n        method = types.MethodType(f, instance)\n        return method(*args, **kwargs)\n\n    # remove the first argument from the wrapped function since it is now bound\n    weak_bound_f.__signature__ = signature_pop(inspect.signature(f), 0)\n    return weak_bound_f\n\n\ndef signature_pop(signature, index):\n    params = list(signature.parameters.values())\n    params.pop(index)\n    return signature.replace(parameters=params)\n\n\nclass JupyterComm:\n    def __init__(self, target_id, ipython_handle, callback=None, on_open=None, mode=\"register\"):\n        from ipykernel.comm import Comm\n\n        self.target_name = \"guidance_interface_target_\" + target_id\n        # print(\"TARGET NAME\", self.target_name)\n        self.callback = callback\n        self.jcomm = None\n        self.ipython_handle = ipython_handle\n        self.addd = 1\n        self.send_queue = asyncio.Queue()\n        self.open_event = asyncio.Event()\n        self.is_open = False\n        asyncio.get_event_loop().create_task(self._send_loop())\n        if mode == \"register\":\n            # log(\"REGISTERING\", self.target_name)\n            # asyncio.get_event_loop().create_task(self._register())\n            def comm_opened(comm, open_msg):\n                # log(\"OPENED\")\n                self.addd = 2\n                self.jcomm = comm\n                self.is_open = True\n                self.jcomm.on_msg(self._fire_callback)\n                self.open_event.set()\n                self._fire_callback({\"content\": {\"data\": {\"event\": \"opened\"}}})\n\n            self.ipython_handle.kernel.comm_manager.register_target(self.target_name, comm_opened)\n            # get_ipython().kernel.comm_manager.register_target(self.target_name, comm_opened) # noqa: F821\n        elif mode == \"open\":\n            # log(\"OPENING\", self.target_name)\n            self.jcomm = Comm(target_name=self.target_name)\n            self.jcomm.on_msg(self._fire_callback)\n            # self._fire_callback({\"content\": {\"data\": \"opened\"}})\n        else:\n            raise Exception(\"Passed mode must be either 'open' or 'register'!\")\n\n    def clear_send_queue(self):\n        while not self.send_queue.empty():\n            self.send_queue.get_nowait()\n            self.send_queue.task_done()\n\n    def _fire_callback(self, msg):\n        self.callback(msg[\"content\"][\"data\"])\n\n    def send(self, data):\n        self.send_queue.put_nowait(data)\n\n    async def _send_loop(self):\n        while True:\n            # log(\"SENDING_LOOP\")\n            if self.jcomm is None:\n                self.open_event.clear()\n                await self.open_event.wait()\n            data = await self.send_queue.get()\n            # log(\"SENDING_LOOP got one!\")\n            self.jcomm.send({\"data\": json.dumps(data)})\n\n    # async def _waiting_send(self, data):\n    #     #log(\"SENDING\", self.jcomm, data)\n\n    #     # await the open event if needed\n    #     if self.jcomm is None:\n    #         self.open_event.clear()\n    #         await self.open_event.wait()\n    #     #log(\"SENDING_now\", self.jcomm, data)\n    #     self.jcomm.send({\"data\": json.dumps(data)}) # we encode the JSON so iPython doesn't mess it up\n\n\n# https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook\ndef is_interactive():\n    import __main__ as main\n\n    return not hasattr(main, \"__file__\")\n\n\ndef log_softmax(array: np.ndarray, axis: int = -1) -> np.ndarray:\n    # https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.log_softmax.html\n    array_maxs: np.ndarray = np.amax(array, axis=axis, keepdims=True)\n    if array_maxs.ndim > 0:\n        array_maxs[~np.isfinite(array_maxs)] = 0\n    elif not np.isfinite(array_maxs):\n        array_maxs = np.zeros(array_maxs.shape)\n    subtract_maxs = array - array_maxs\n    exp = np.exp(subtract_maxs)\n    # suppress warnings about log of zero\n    with np.errstate(divide=\"ignore\"):\n        summed = np.sum(exp, axis=axis, keepdims=True)\n        out = np.log(summed)\n    return subtract_maxs - out\n\n\ndef softmax(array: np.ndarray, axis: int = -1) -> np.ndarray:\n    # https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.softmax.html\n    array_maxs = np.amax(array, axis=axis, keepdims=True)\n    exp_x_shifted = np.exp(array - array_maxs)\n    return exp_x_shifted / np.sum(exp_x_shifted, axis=axis, keepdims=True)\n\n\ndef pydantic_no_default_repr(obj: pydantic.BaseModel, target_fields=None):\n    if target_fields is None:\n        records = (\n            f\"{getattr(obj, name)!r}\"\n            for name, field in obj.__class__.model_fields.items()\n            if getattr(obj, name) != field.default and not field.exclude\n        )\n    else:\n        records = (\n            f\"{getattr(obj, name)!r}\"\n            for name, field in obj.__class__.model_fields.items()\n            if getattr(obj, name) != field.default and not field.exclude and name in target_fields\n        )\n    out = f\"{type(obj).__name__}:{':'.join(records)}\"\n    return out\n\n\ndef pydantic_no_default_str(obj: pydantic.BaseModel, target_fields=None):\n    if target_fields is None:\n        records = (\n            f\"{getattr(obj, name)!s}\"\n            for name, field in obj.__class__.model_fields.items()\n            if getattr(obj, name) != field.default and not field.exclude\n        )\n    else:\n        records = (\n            f\"{getattr(obj, name)!s}\"\n            for name, field in obj.__class__.model_fields.items()\n            if getattr(obj, name) != field.default and not field.exclude and name in target_fields\n        )\n    out = \"\\n\".join(records)\n    return out\n\n\ndef log_init(s: str):\n    logger.debug(f\"INIT:{s}\")\n    pass\n\n\ndef log_copy(s: str):\n    logger.debug(f\"COPY:{s}\")\n    pass\n\n\ndef log_cleanup(s: str):\n    logger.debug(f\"CLEANUP:{s}\")\n    pass\n\n\ndef to_utf8_or_bytes_string(_bytes: bytes) -> str:\n    \"\"\"\n    Converts a byte sequence to a UTF-8 string if possible. If the byte sequence\n    cannot be decoded as UTF-8, it returns the string representation of the byte sequence.\n\n    Parameters\n    ----------\n    _bytes : bytes\n        The byte sequence to be converted.\n\n    Returns\n    -------\n    str\n        The decoded UTF-8 string or the string representation of the byte sequence\n        if UTF-8 decoding fails.\n    \"\"\"\n    try:\n        return _bytes.decode(\"utf-8\")\n    except UnicodeDecodeError:\n        return str(_bytes)\n\n\ndef apply_repetition_penalty(input_ids: list[int], logits: np.ndarray, sampling_params: Optional[\"SamplingParams\"]):\n    if sampling_params is None:\n        return logits\n\n    penalty = sampling_params.get(\"repetition_penalty\", None)\n    if penalty is None or penalty <= 0:\n        return logits\n\n    # Gather the logits for the input_ids\n    # input_ids: shape (1, seq_len), scores: shape (1, vocab_size)\n    # We want to get the logits for each token in input_ids from scores\n    # For each token in input_ids, get its logit from scores\n    # This is equivalent to: score = scores[0, input_ids[0, :]]\n    input_ids = np.asarray(input_ids)\n\n    score = np.take_along_axis(logits, input_ids, axis=0)\n    # Apply repetition penalty\n    # If score < 0, multiply by penalty; else, divide by penalty\n    score_processed = np.where(score < 0, score * penalty, score / penalty)\n    # Scatter the processed scores back into the scores array\n    # For each position in input_ids, set scores[0, input_ids[0, i]] = score_processed[0, i]\n    scores_processed = logits.copy()\n    np.put_along_axis(scores_processed, input_ids, score_processed, axis=0)\n    return scores_processed\n\n\ndef apply_top_k_only(logits: np.ndarray, k: int) -> np.ndarray:\n    if k <= 0:\n        return logits\n\n    indices_to_remove = logits.argpartition(-k)[:-k]\n    logits[indices_to_remove] = -float(\"inf\")\n    return logits\n\n\ndef apply_min_p_filter(logits: np.ndarray, sampling_params: Optional[\"SamplingParams\"]) -> np.ndarray:\n    if sampling_params is None:\n        return logits\n\n    min_p = sampling_params.get(\"min_p\", None)\n    if min_p is None:\n        return logits\n\n    probs = softmax(logits, axis=-1)\n    top_probs = np.max(probs, axis=-1)\n    scaled_min_p = min_p * top_probs\n\n    indices_to_remove = probs < scaled_min_p\n    logits[indices_to_remove] = -np.inf\n    return logits\n\n\ndef apply_top_k_and_top_p_filter(logits: np.ndarray, sampling_params: Optional[\"SamplingParams\"]) -> np.ndarray:\n    if sampling_params is None:\n        return logits\n\n    top_p = sampling_params.get(\"top_p\", None)\n    top_k = sampling_params.get(\"top_k\", None)\n\n    if top_k is None and top_p is None:\n        # No filtering, return logits as is\n        return logits\n\n    if top_k is not None and top_p is None:\n        return apply_top_k_only(logits, top_k)\n\n    # try our best to sort logits one time only\n    sorted_logits = logits.argsort()\n    if top_k is not None and top_k > 0:\n        indices_to_remove = sorted_logits[:-top_k]\n        logits[indices_to_remove] = -float(\"inf\")\n\n    if top_p is not None and top_p >= 0:\n        sorted_indices = sorted_logits[::-1]\n        sorted_logits = logits[sorted_indices]\n        probs = softmax(sorted_logits)\n        cumulative_probs = np.cumsum(probs)\n        indices_to_remove = cumulative_probs > top_p\n        if np.any(indices_to_remove):\n            # +1 to keep the first token that exceeds the threshold\n            first_to_remove = np.argmax(indices_to_remove) + 1\n            # make sure we always keep at least one token\n            sorted_indices_to_remove = sorted_indices[max(1, first_to_remove) :]\n            logits[sorted_indices_to_remove] = -float(\"inf\")\n\n    return logits\n"
  },
  {
    "path": "guidance/chat.py",
    "content": "import inspect\nimport warnings\n\n\nclass ChatTemplate:\n    \"\"\"Contains template for all chat and instruct tuned models.\"\"\"\n\n    def get_role_start(self, role_name: str, **kwargs):\n        raise NotImplementedError(\"You need to use a ChatTemplate subclass that overrides the get_role_start method\")\n\n    def get_role_end(self, role_name: str | None = None):\n        raise NotImplementedError(\"You need to use a ChatTemplate subclass that overrides the get_role_start method\")\n\n\nclass ChatTemplateCache:\n    def __init__(self) -> None:\n        self._cache: dict[str, ChatTemplate] = {}\n\n    def __getitem__(self, key: str) -> ChatTemplate:\n        key_compact = key.replace(\" \", \"\")\n        return self._cache[key_compact]\n\n    def __setitem__(self, key: str, value):\n        key_compact = key.replace(\" \", \"\")\n        self._cache[key_compact] = value\n\n    def __contains__(self, key: str):\n        key_compact = key.replace(\" \", \"\")\n        return key_compact in self._cache\n\n\n# Feels weird having to instantiate this, but it's a singleton for all purposes\n# TODO [HN]: Add an alias system so we can instantiate with other simple keys (e.g. \"llama2\" instead of the full template string)\nCHAT_TEMPLATE_CACHE = ChatTemplateCache()\n\n\nclass UnsupportedRoleException(Exception):\n    def __init__(self, role_name, instance):\n        self.role_name = role_name\n        self.instance = instance\n        super().__init__(self._format_message())\n\n    def _format_message(self):\n        return f\"Role {self.role_name} is not supported by the {self.instance.__class__.__name__} chat template. \"\n\n\ndef load_template_class(chat_template=None):\n    \"\"\"Utility method to find the best chat template.\n\n    Order of precedence:\n    - If it's a chat template class, use it directly\n    - If it's a string, check the cache of popular model templates\n    - If it's a string and not in the cache, try to create a class dynamically\n    - [TODO] If it's a string and can't be created, default to ChatML and raise a warning\n    - If it's None, default to ChatML and raise a warning\n    \"\"\"\n    if inspect.isclass(chat_template) and issubclass(chat_template, ChatTemplate):\n        if chat_template is ChatTemplate:\n            raise Exception(\"You can't use the base ChatTemplate class directly. Create or use a subclass instead.\")\n        return chat_template\n\n    elif isinstance(chat_template, str):\n        # First check the cache of popular model types\n        # TODO: Expand keys of cache to include aliases for popular model types (e.g. \"llama2, phi3\")\n        # Can possibly accomplish this with an \"aliases\" dictionary that maps all aliases to the canonical key in cache\n        if chat_template in CHAT_TEMPLATE_CACHE:\n            return CHAT_TEMPLATE_CACHE[chat_template]\n        # TODO: Add logic here to try to auto-create class dynamically via _template_class_from_string method\n\n    # Only warn when a user provided a chat template that we couldn't load\n    if chat_template is not None:\n        warnings.warn(\n            f\"\"\"Chat template {chat_template} was unable to be loaded directly into guidance.\n                        Defaulting to the ChatML format which may not be optimal for the selected model. \n                        For best results, create and pass in a `guidance.ChatTemplate` subclass for your model.\"\"\",\n            stacklevel=2,\n        )\n\n    # By default, use the ChatML Template. Warnings to user will happen downstream only if they use chat roles.\n    return ChatMLTemplate\n\n\ndef _template_class_from_string(template_str):\n    \"\"\"Utility method to try to create a chat template class from a string.\"\"\"\n    # TODO: Try to build this, perhaps based on passing unit tests we create?\n    pass\n\n\n# CACHE IMPLEMENTATIONS:\n\n# --------------------------------------------------\n# @@@@ ChatML @@@@\n# --------------------------------------------------\n# Note that all grammarless models will default to this syntax, since we typically send chat formatted messages.\nchatml_template = \"{% for message in messages %}{{'<|im_start|>' + message['role'] + '\\n' + message['content'] + '<|im_end|>' + '\\n'}}{% endfor %}\"\n\n\nclass ChatMLTemplate(ChatTemplate):\n    template_str = chatml_template\n\n    def get_role_start(self, role_name):\n        return f\"<|im_start|>{role_name}\\n\"\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|im_end|>\\n\"\n\n\nCHAT_TEMPLATE_CACHE[chatml_template] = ChatMLTemplate\n\n\n# --------------------------------------------------\n# @@@@ Llama-2 @@@@\n# --------------------------------------------------\n# [05/08/24] https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/blob/main/tokenizer_config.json#L12\nllama2_template = \"{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\\\n' + system_message + '\\\\n<</SYS>>\\\\n\\\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' '  + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}\"\n\n\nclass Llama2ChatTemplate(ChatTemplate):\n    # available_roles = [\"system\", \"user\", \"assistant\"]\n    template_str = llama2_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"system\":\n            return \"[INST] <<SYS>>\\n\"\n        elif role_name == \"user\":\n            return \"<s>[INST] \"\n        elif role_name == \"assistant\":\n            return \" \"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):\n        if role_name == \"system\":\n            return \"\\n<</SYS>>\"\n        elif role_name == \"user\":\n            return \" [/INST]\"\n        elif role_name == \"assistant\":\n            return \" </s>\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n\nCHAT_TEMPLATE_CACHE[llama2_template] = Llama2ChatTemplate\n\n\n# --------------------------------------------------\n# @@@@ Llama-3 @@@@\n# --------------------------------------------------\n# [05/08/24] https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct/blob/main/tokenizer_config.json#L2053\nllama3_template = \"{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}{% endif %}\"\n\n\nclass Llama3ChatTemplate(ChatTemplate):\n    # available_roles = [\"system\", \"user\", \"assistant\"]\n    template_str = llama3_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"system\":\n            return \"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\n\"\n        elif role_name == \"user\":\n            return \"<|start_header_id|>user<|end_header_id|>\\n\\n\"\n        elif role_name == \"assistant\":\n            return \"<|start_header_id|>assistant<|end_header_id|>\\n\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|eot_id|>\"\n\n\nCHAT_TEMPLATE_CACHE[llama3_template] = Llama3ChatTemplate\n\n# --------------------------------------------------\n# @@@@ Phi-3 @@@@\n# --------------------------------------------------\n# [05/08/24] https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/blob/main/tokenizer_config.json#L119\nphi3_mini_template = \"{% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>\\n' + message['content'] + '<|end|>\\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\\n' + message['content'] + '<|end|>\\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\\n' + message['content'] + '<|end|>\\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\\n' }}{% else %}{{ eos_token }}{% endif %}\"\nphi3_mini_llamacpp_template = \"{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\\n' + message['content'] + '<|end|>' + '\\n' + '<|assistant|>' + '\\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\\n'}}{% endif %}{% endfor %}\"\n\n\nclass Phi3MiniChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\"]\n    template_str = phi3_mini_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"user\":\n            return \"<|user|>\\n\"\n        elif role_name == \"assistant\":\n            return \"<|assistant|>\\n\"\n        elif role_name == \"system\":\n            return \"<|system|>\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|end|>\\n\"\n\n\nCHAT_TEMPLATE_CACHE[phi3_mini_template] = Phi3MiniChatTemplate\nCHAT_TEMPLATE_CACHE[phi3_mini_llamacpp_template] = Phi3MiniChatTemplate\n\n# https://huggingface.co/microsoft/Phi-3-small-8k-instruct/blob/main/tokenizer_config.json\nphi3_small_template = \"{{ bos_token }}{% for message in messages %}{{'<|' + message['role'] + '|>' + '\\n' + message['content'] + '<|end|>\\n' }}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\\n' }}{% else %}{{ eos_token }}{% endif %}\"\n\n\n# https://huggingface.co/microsoft/Phi-3-medium-4k-instruct/blob/main/tokenizer_config.json#L119\nphi3_medium_template = \"{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\\n' + message['content'] + '<|end|>' + '\\n' + '<|assistant|>' + '\\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\\n'}}{% endif %}{% endfor %}\"\n\n\n# Although the templates are different, the roles are the same between medium and small (for now)\nclass Phi3SmallMediumChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\"]\n    template_str = phi3_small_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"user\":\n            return \"<|user|>\\n\"\n        elif role_name == \"assistant\":\n            return \"<|assistant|>\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|end|>\\n\"\n\n\nCHAT_TEMPLATE_CACHE[phi3_small_template] = Phi3SmallMediumChatTemplate\nCHAT_TEMPLATE_CACHE[phi3_medium_template] = Phi3SmallMediumChatTemplate\n\n# --------------------------------------------------\n# @@@@ Phi-4-mini-instruct @@@@\n# --------------------------------------------------\n# [06/16/25] https://huggingface.co/microsoft/Phi-4-mini-instruct/blob/main/tokenizer_config.json#L104\n\nphi_4_mini_template = \"{% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}\"\n\n\nclass Phi4MiniChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\", \"system\"]\n    template_str = phi_4_mini_template\n\n    def get_role_start(self, role_name):\n        return f\"<|{role_name}|>\"\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|end|>\"\n\n\nCHAT_TEMPLATE_CACHE[phi_4_mini_template] = Phi4MiniChatTemplate\n\n# --------------------------------------------------\n# @@@@ Mistral-7B-Instruct-v0.2 @@@@\n# --------------------------------------------------\n# [05/08/24] https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2/blob/main/tokenizer_config.json#L42\nmistral_7b_instruct_template = \"{%- if messages[0]['role'] == 'system' %}\\n    {%- set system_message = messages[0]['content'] %}\\n    {%- set loop_messages = messages[1:] %}\\n{%- else %}\\n    {%- set loop_messages = messages %}\\n{%- endif %}\\n\\n{{- bos_token }}\\n{%- for message in loop_messages %}\\n    {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}\\n        {{- raise_exception('After the optional system message, conversation roles must alternate user/assistant/user/assistant/...') }}\\n    {%- endif %}\\n    {%- if message['role'] == 'user' %}\\n        {%- if loop.first and system_message is defined %}\\n            {{- ' [INST] ' + system_message + '\\\\n\\\\n' + message['content'] + ' [/INST]' }}\\n        {%- else %}\\n            {{- ' [INST] ' + message['content'] + ' [/INST]' }}\\n        {%- endif %}\\n    {%- elif message['role'] == 'assistant' %}\\n        {{- ' ' + message['content'] + eos_token}}\\n    {%- else %}\\n        {{- raise_exception('Only user and assistant roles are supported, with the exception of an initial optional system message!') }}\\n    {%- endif %}\\n{%- endfor %}\\n\"\nmistral_7b_instruct_llamacpp_template = \"{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}\"\n\n\nclass Mistral7BInstructChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\"]\n    template_str = mistral_7b_instruct_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"user\":\n            return \" [INST] \"\n        elif role_name == \"assistant\":\n            return \" \"\n        elif role_name == \"system\":\n            raise ValueError(\"Please include system instructions in the first user message\")\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):\n        if role_name == \"user\":\n            return \" [/INST]\"\n        elif role_name == \"assistant\":\n            return \"</s>\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n\nCHAT_TEMPLATE_CACHE[mistral_7b_instruct_template] = Mistral7BInstructChatTemplate\nCHAT_TEMPLATE_CACHE[mistral_7b_instruct_llamacpp_template] = Mistral7BInstructChatTemplate\n\n# --------------------------------------------------\n# @@@@ Gemma-2-9b-it @@@@\n# --------------------------------------------------\n# From https://huggingface.co/google/gemma-2-9b-it/blob/main/tokenizer_config.json#L1747\ngemma2_9b_it_template = \"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\\n' + message['content'] | trim + '<end_of_turn>\\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\\n'}}{% endif %}\"\n\n\nclass Gemma29BInstructChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\"]\n    template_str = gemma2_9b_it_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"user\":\n            return \"<start_of_turn>user\\n\"\n        elif role_name == \"assistant\":\n            return \"<start_of_turn>model\\n\"\n        elif role_name == \"system\":\n            raise ValueError(\"System Role not supported\")\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):\n        if role_name == \"user\":\n            return \"<end_of_turn>\\n\"\n        elif role_name == \"assistant\":\n            return \"<end_of_turn>\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n\nCHAT_TEMPLATE_CACHE[gemma2_9b_it_template] = Gemma29BInstructChatTemplate\n\n# --------------------------------------------------\n# @@@@ Qwen2.5 @@@@\n# --------------------------------------------------\n# From https://huggingface.co/Qwen/Qwen2.5-0.5B/blob/060db6499f32faf8b98477b0a26969ef7d8b9987/tokenizer_config.json#L198\nqwen2dot5_template = \"{%- if tools %}\\n    {{- '<|im_start|>system\\\\n' }}\\n    {%- if messages[0]['role'] == 'system' %}\\n        {{- messages[0]['content'] }}\\n    {%- else %}\\n        {{- 'You are a helpful assistant.' }}\\n    {%- endif %}\\n    {{- \\\"\\\\n\\\\n# Tools\\\\n\\\\nYou may call one or more functions to assist with the user query.\\\\n\\\\nYou are provided with function signatures within <tools></tools> XML tags:\\\\n<tools>\\\" }}\\n    {%- for tool in tools %}\\n        {{- \\\"\\\\n\\\" }}\\n        {{- tool | tojson }}\\n    {%- endfor %}\\n    {{- \\\"\\\\n</tools>\\\\n\\\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\\\n<tool_call>\\\\n{\\\\\\\"name\\\\\\\": <function-name>, \\\\\\\"arguments\\\\\\\": <args-json-object>}\\\\n</tool_call><|im_end|>\\\\n\\\" }}\\n{%- else %}\\n    {%- if messages[0]['role'] == 'system' %}\\n        {{- '<|im_start|>system\\\\n' + messages[0]['content'] + '<|im_end|>\\\\n' }}\\n    {%- else %}\\n        {{- '<|im_start|>system\\\\nYou are a helpful assistant.<|im_end|>\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\\n{%- for message in messages %}\\n    {%- if (message.role == \\\"user\\\") or (message.role == \\\"system\\\" and not loop.first) or (message.role == \\\"assistant\\\" and not message.tool_calls) %}\\n        {{- '<|im_start|>' + message.role + '\\\\n' + message.content + '<|im_end|>' + '\\\\n' }}\\n    {%- elif message.role == \\\"assistant\\\" %}\\n        {{- '<|im_start|>' + message.role }}\\n        {%- if message.content %}\\n            {{- '\\\\n' + message.content }}\\n        {%- endif %}\\n        {%- for tool_call in message.tool_calls %}\\n            {%- if tool_call.function is defined %}\\n                {%- set tool_call = tool_call.function %}\\n            {%- endif %}\\n            {{- '\\\\n<tool_call>\\\\n{\\\"name\\\": \\\"' }}\\n            {{- tool_call.name }}\\n            {{- '\\\", \\\"arguments\\\": ' }}\\n            {{- tool_call.arguments | tojson }}\\n            {{- '}\\\\n</tool_call>' }}\\n        {%- endfor %}\\n        {{- '<|im_end|>\\\\n' }}\\n    {%- elif message.role == \\\"tool\\\" %}\\n        {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \\\"tool\\\") %}\\n            {{- '<|im_start|>user' }}\\n        {%- endif %}\\n        {{- '\\\\n<tool_response>\\\\n' }}\\n        {{- message.content }}\\n        {{- '\\\\n</tool_response>' }}\\n        {%- if loop.last or (messages[loop.index0 + 1].role != \\\"tool\\\") %}\\n            {{- '<|im_end|>\\\\n' }}\\n        {%- endif %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- if add_generation_prompt %}\\n    {{- '<|im_start|>assistant\\\\n' }}\\n{%- endif %}\\n\"\n\n# From https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct/blob/7ae557604adf67be50417f59c2c2f167def9a775/tokenizer_config.json#L198\nqwen2dot5_it_template = \"{%- if tools %}\\n    {{- '<|im_start|>system\\\\n' }}\\n    {%- if messages[0]['role'] == 'system' %}\\n        {{- messages[0]['content'] }}\\n    {%- else %}\\n        {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\\n    {%- endif %}\\n    {{- \\\"\\\\n\\\\n# Tools\\\\n\\\\nYou may call one or more functions to assist with the user query.\\\\n\\\\nYou are provided with function signatures within <tools></tools> XML tags:\\\\n<tools>\\\" }}\\n    {%- for tool in tools %}\\n        {{- \\\"\\\\n\\\" }}\\n        {{- tool | tojson }}\\n    {%- endfor %}\\n    {{- \\\"\\\\n</tools>\\\\n\\\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\\\n<tool_call>\\\\n{\\\\\\\"name\\\\\\\": <function-name>, \\\\\\\"arguments\\\\\\\": <args-json-object>}\\\\n</tool_call><|im_end|>\\\\n\\\" }}\\n{%- else %}\\n    {%- if messages[0]['role'] == 'system' %}\\n        {{- '<|im_start|>system\\\\n' + messages[0]['content'] + '<|im_end|>\\\\n' }}\\n    {%- else %}\\n        {{- '<|im_start|>system\\\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\\n{%- for message in messages %}\\n    {%- if (message.role == \\\"user\\\") or (message.role == \\\"system\\\" and not loop.first) or (message.role == \\\"assistant\\\" and not message.tool_calls) %}\\n        {{- '<|im_start|>' + message.role + '\\\\n' + message.content + '<|im_end|>' + '\\\\n' }}\\n    {%- elif message.role == \\\"assistant\\\" %}\\n        {{- '<|im_start|>' + message.role }}\\n        {%- if message.content %}\\n            {{- '\\\\n' + message.content }}\\n        {%- endif %}\\n        {%- for tool_call in message.tool_calls %}\\n            {%- if tool_call.function is defined %}\\n                {%- set tool_call = tool_call.function %}\\n            {%- endif %}\\n            {{- '\\\\n<tool_call>\\\\n{\\\"name\\\": \\\"' }}\\n            {{- tool_call.name }}\\n            {{- '\\\", \\\"arguments\\\": ' }}\\n            {{- tool_call.arguments | tojson }}\\n            {{- '}\\\\n</tool_call>' }}\\n        {%- endfor %}\\n        {{- '<|im_end|>\\\\n' }}\\n    {%- elif message.role == \\\"tool\\\" %}\\n        {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \\\"tool\\\") %}\\n            {{- '<|im_start|>user' }}\\n        {%- endif %}\\n        {{- '\\\\n<tool_response>\\\\n' }}\\n        {{- message.content }}\\n        {{- '\\\\n</tool_response>' }}\\n        {%- if loop.last or (messages[loop.index0 + 1].role != \\\"tool\\\") %}\\n            {{- '<|im_end|>\\\\n' }}\\n        {%- endif %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- if add_generation_prompt %}\\n    {{- '<|im_start|>assistant\\\\n' }}\\n{%- endif %}\\n\"\n\n\nclass Qwen2dot5ChatTemplate(ChatTemplate):\n    # available_roles = [\"system\", \"user\", \"assistant\"]\n    template_str = qwen2dot5_it_template\n\n    def get_role_start(self, role_name):\n        if role_name in [\"system\", \"user\", \"assistant\"]:\n            return f\"<|im_start|>{role_name}\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|im_end|>\\n\"\n\n\nCHAT_TEMPLATE_CACHE[qwen2dot5_template] = Qwen2dot5ChatTemplate\nCHAT_TEMPLATE_CACHE[qwen2dot5_it_template] = Qwen2dot5ChatTemplate\n\n\n# --------------------------------------------------\n# @@@@ Qwen3 @@@@\n# --------------------------------------------------\n# From https://huggingface.co/Qwen/Qwen3-8B/blob/main/tokenizer_config.json#L230\nqwen3_it_template = \"{%- if tools %}\\n    {{- '<|im_start|>system\\\\n' }}\\n    {%- if messages[0].role == 'system' %}\\n        {{- messages[0].content + '\\\\n\\\\n' }}\\n    {%- endif %}\\n    {{- \\\"# Tools\\\\n\\\\nYou may call one or more functions to assist with the user query.\\\\n\\\\nYou are provided with function signatures within <tools></tools> XML tags:\\\\n<tools>\\\" }}\\n    {%- for tool in tools %}\\n        {{- \\\"\\\\n\\\" }}\\n        {{- tool | tojson }}\\n    {%- endfor %}\\n    {{- \\\"\\\\n</tools>\\\\n\\\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\\\n<tool_call>\\\\n{\\\\\\\"name\\\\\\\": <function-name>, \\\\\\\"arguments\\\\\\\": <args-json-object>}\\\\n</tool_call><|im_end|>\\\\n\\\" }}\\n{%- else %}\\n    {%- if messages[0].role == 'system' %}\\n        {{- '<|im_start|>system\\\\n' + messages[0].content + '<|im_end|>\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\\n{%- for message in messages[::-1] %}\\n    {%- set index = (messages|length - 1) - loop.index0 %}\\n    {%- if ns.multi_step_tool and message.role == \\\"user\\\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\\n        {%- set ns.multi_step_tool = false %}\\n        {%- set ns.last_query_index = index %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- for message in messages %}\\n    {%- if message.content is string %}\\n        {%- set content = message.content %}\\n    {%- else %}\\n        {%- set content = '' %}\\n    {%- endif %}\\n    {%- if (message.role == \\\"user\\\") or (message.role == \\\"system\\\" and not loop.first) %}\\n        {{- '<|im_start|>' + message.role + '\\\\n' + content + '<|im_end|>' + '\\\\n' }}\\n    {%- elif message.role == \\\"assistant\\\" %}\\n        {%- set reasoning_content = '' %}\\n        {%- if message.reasoning_content is string %}\\n            {%- set reasoning_content = message.reasoning_content %}\\n        {%- else %}\\n            {%- if '</think>' in content %}\\n                {%- set reasoning_content = content.split('</think>')[0].rstrip('\\\\n').split('<think>')[-1].lstrip('\\\\n') %}\\n                {%- set content = content.split('</think>')[-1].lstrip('\\\\n') %}\\n            {%- endif %}\\n        {%- endif %}\\n        {%- if loop.index0 > ns.last_query_index %}\\n            {%- if loop.last or (not loop.last and reasoning_content) %}\\n                {{- '<|im_start|>' + message.role + '\\\\n<think>\\\\n' + reasoning_content.strip('\\\\n') + '\\\\n</think>\\\\n\\\\n' + content.lstrip('\\\\n') }}\\n            {%- else %}\\n                {{- '<|im_start|>' + message.role + '\\\\n' + content }}\\n            {%- endif %}\\n        {%- else %}\\n            {{- '<|im_start|>' + message.role + '\\\\n' + content }}\\n        {%- endif %}\\n        {%- if message.tool_calls %}\\n            {%- for tool_call in message.tool_calls %}\\n                {%- if (loop.first and content) or (not loop.first) %}\\n                    {{- '\\\\n' }}\\n                {%- endif %}\\n                {%- if tool_call.function %}\\n                    {%- set tool_call = tool_call.function %}\\n                {%- endif %}\\n                {{- '<tool_call>\\\\n{\\\"name\\\": \\\"' }}\\n                {{- tool_call.name }}\\n                {{- '\\\", \\\"arguments\\\": ' }}\\n                {%- if tool_call.arguments is string %}\\n                    {{- tool_call.arguments }}\\n                {%- else %}\\n                    {{- tool_call.arguments | tojson }}\\n                {%- endif %}\\n                {{- '}\\\\n</tool_call>' }}\\n            {%- endfor %}\\n        {%- endif %}\\n        {{- '<|im_end|>\\\\n' }}\\n    {%- elif message.role == \\\"tool\\\" %}\\n        {%- if loop.first or (messages[loop.index0 - 1].role != \\\"tool\\\") %}\\n            {{- '<|im_start|>user' }}\\n        {%- endif %}\\n        {{- '\\\\n<tool_response>\\\\n' }}\\n        {{- content }}\\n        {{- '\\\\n</tool_response>' }}\\n        {%- if loop.last or (messages[loop.index0 + 1].role != \\\"tool\\\") %}\\n            {{- '<|im_end|>\\\\n' }}\\n        {%- endif %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- if add_generation_prompt %}\\n    {{- '<|im_start|>assistant\\\\n' }}\\n    {%- if enable_thinking is defined and enable_thinking is false %}\\n        {{- '<think>\\\\n\\\\n</think>\\\\n\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\"\n# From https://huggingface.co/unsloth/Qwen3-0.6B-GGUF\nqwen3_gguf_template = \"{%- if tools %}\\n    {{- '<|im_start|>system\\\\n' }}\\n    {%- if messages[0].role == 'system' %}\\n        {{- messages[0].content + '\\\\n\\\\n' }}\\n    {%- endif %}\\n    {{- \\\"# Tools\\\\n\\\\nYou may call one or more functions to assist with the user query.\\\\n\\\\nYou are provided with function signatures within <tools></tools> XML tags:\\\\n<tools>\\\" }}\\n    {%- for tool in tools %}\\n        {{- \\\"\\\\n\\\" }}\\n        {{- tool | tojson }}\\n    {%- endfor %}\\n    {{- \\\"\\\\n</tools>\\\\n\\\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\\\n<tool_call>\\\\n{\\\\\\\"name\\\\\\\": <function-name>, \\\\\\\"arguments\\\\\\\": <args-json-object>}\\\\n</tool_call><|im_end|>\\\\n\\\" }}\\n{%- else %}\\n    {%- if messages[0].role == 'system' %}\\n        {{- '<|im_start|>system\\\\n' + messages[0].content + '<|im_end|>\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\\n{%- for forward_message in messages %}\\n    {%- set index = (messages|length - 1) - loop.index0 %}\\n    {%- set message = messages[index] %}\\n    {%- set current_content = message.content if message.content is defined and message.content is not none else '' %}\\n    {%- set tool_start = '<tool_response>' %}\\n    {%- set tool_start_length = tool_start|length %}\\n    {%- set start_of_message = current_content[:tool_start_length] %}\\n    {%- set tool_end = '</tool_response>' %}\\n    {%- set tool_end_length = tool_end|length %}\\n    {%- set start_pos = (current_content|length) - tool_end_length %}\\n    {%- if start_pos < 0 %}\\n        {%- set start_pos = 0 %}\\n    {%- endif %}\\n    {%- set end_of_message = current_content[start_pos:] %}\\n    {%- if ns.multi_step_tool and message.role == \\\"user\\\" and not(start_of_message == tool_start and end_of_message == tool_end) %}\\n        {%- set ns.multi_step_tool = false %}\\n        {%- set ns.last_query_index = index %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- for message in messages %}\\n    {%- if (message.role == \\\"user\\\") or (message.role == \\\"system\\\" and not loop.first) %}\\n        {{- '<|im_start|>' + message.role + '\\\\n' + message.content + '<|im_end|>' + '\\\\n' }}\\n    {%- elif message.role == \\\"assistant\\\" %}\\n        {%- set m_content = message.content if message.content is defined and message.content is not none else '' %}\\n        {%- set content = m_content %}\\n        {%- set reasoning_content = '' %}\\n        {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\\n            {%- set reasoning_content = message.reasoning_content %}\\n        {%- else %}\\n            {%- if '</think>' in m_content %}\\n                {%- set content = (m_content.split('</think>')|last).lstrip('\\\\n') %}\\n                {%- set reasoning_content = (m_content.split('</think>')|first).rstrip('\\\\n') %}\\n                {%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\\\\n') %}\\n            {%- endif %}\\n        {%- endif %}\\n        {%- if loop.index0 > ns.last_query_index %}\\n            {%- if loop.last or (not loop.last and (not reasoning_content.strip() == '')) %}\\n                {{- '<|im_start|>' + message.role + '\\\\n<think>\\\\n' + reasoning_content.strip('\\\\n') + '\\\\n</think>\\\\n\\\\n' + content.lstrip('\\\\n') }}\\n            {%- else %}\\n                {{- '<|im_start|>' + message.role + '\\\\n' + content }}\\n            {%- endif %}\\n        {%- else %}\\n            {{- '<|im_start|>' + message.role + '\\\\n' + content }}\\n        {%- endif %}\\n        {%- if message.tool_calls %}\\n            {%- for tool_call in message.tool_calls %}\\n                {%- if (loop.first and content) or (not loop.first) %}\\n                    {{- '\\\\n' }}\\n                {%- endif %}\\n                {%- if tool_call.function %}\\n                    {%- set tool_call = tool_call.function %}\\n                {%- endif %}\\n                {{- '<tool_call>\\\\n{\\\"name\\\": \\\"' }}\\n                {{- tool_call.name }}\\n                {{- '\\\", \\\"arguments\\\": ' }}\\n                {%- if tool_call.arguments is string %}\\n                    {{- tool_call.arguments }}\\n                {%- else %}\\n                    {{- tool_call.arguments | tojson }}\\n                {%- endif %}\\n                {{- '}\\\\n</tool_call>' }}\\n            {%- endfor %}\\n        {%- endif %}\\n        {{- '<|im_end|>\\\\n' }}\\n    {%- elif message.role == \\\"tool\\\" %}\\n        {%- if loop.first or (messages[loop.index0 - 1].role != \\\"tool\\\") %}\\n            {{- '<|im_start|>user' }}\\n        {%- endif %}\\n        {{- '\\\\n<tool_response>\\\\n' }}\\n        {{- message.content }}\\n        {{- '\\\\n</tool_response>' }}\\n        {%- if loop.last or (messages[loop.index0 + 1].role != \\\"tool\\\") %}\\n            {{- '<|im_end|>\\\\n' }}\\n        {%- endif %}\\n    {%- endif %}\\n{%- endfor %}\\n{%- if add_generation_prompt %}\\n    {{- '<|im_start|>assistant\\\\n' }}\\n    {%- if enable_thinking is defined and enable_thinking is false %}\\n        {{- '<think>\\\\n\\\\n</think>\\\\n\\\\n' }}\\n    {%- endif %}\\n{%- endif %}\"\n\n\nclass Qwen3ChatTemplate(ChatTemplate):\n    # available_roles = [\"system\", \"user\", \"assistant\"]\n    template_str = qwen2dot5_it_template\n\n    def get_role_start(self, role_name):\n        if role_name in [\"system\", \"user\", \"assistant\"]:\n            return f\"<|im_start|>{role_name}\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|im_end|>\\n\"\n\n\nCHAT_TEMPLATE_CACHE[qwen3_it_template] = Qwen3ChatTemplate\nCHAT_TEMPLATE_CACHE[qwen3_gguf_template] = Qwen3ChatTemplate\n\n# --------------------------------------------------\n# @@@@ Llama3.2 @@@@\n# --------------------------------------------------\n# TODO WIP [HN]: Llama 3.2 has the same issues as Phi-3 mini, where trim behavior is defined in the template.\n# Additionally, they use some crazy jinja trick to dynamically pull the current date (but have a fallback of July 26, 2024).\n# There's an additional problem that system roles are ALWAYS defined. Might need a refactor the entire system to handle.\n\nllama3dot2_template = '{{- bos_token }}\\n{%- if custom_tools is defined %}\\n    {%- set tools = custom_tools %}\\n{%- endif %}\\n{%- if not tools_in_user_message is defined %}\\n    {%- set tools_in_user_message = true %}\\n{%- endif %}\\n{%- if not date_string is defined %}\\n    {%- if strftime_now is defined %}\\n        {%- set date_string = strftime_now(\"%d %b %Y\") %}\\n    {%- else %}\\n        {%- set date_string = \"26 Jul 2024\" %}\\n    {%- endif %}\\n{%- endif %}\\n{%- if not tools is defined %}\\n    {%- set tools = none %}\\n{%- endif %}\\n\\n{#- This block extracts the system message, so we can slot it into the right place. #}\\n{%- if messages[0][\\'role\\'] == \\'system\\' %}\\n    {%- set system_message = messages[0][\\'content\\']|trim %}\\n    {%- set messages = messages[1:] %}\\n{%- else %}\\n    {%- set system_message = \"\" %}\\n{%- endif %}\\n\\n{#- System message #}\\n{{- \"<|start_header_id|>system<|end_header_id|>\\\\n\\\\n\" }}\\n{%- if tools is not none %}\\n    {{- \"Environment: ipython\\\\n\" }}\\n{%- endif %}\\n{{- \"Cutting Knowledge Date: December 2023\\\\n\" }}\\n{{- \"Today Date: \" + date_string + \"\\\\n\\\\n\" }}\\n{%- if tools is not none and not tools_in_user_message %}\\n    {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\\n    {{- \\'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.\\' }}\\n    {{- \"Do not use variables.\\\\n\\\\n\" }}\\n    {%- for t in tools %}\\n        {{- t | tojson(indent=4) }}\\n        {{- \"\\\\n\\\\n\" }}\\n    {%- endfor %}\\n{%- endif %}\\n{{- system_message }}\\n{{- \"<|eot_id|>\" }}\\n\\n{#- Custom tools are passed in a user message with some extra guidance #}\\n{%- if tools_in_user_message and not tools is none %}\\n    {#- Extract the first user message so we can plug it in here #}\\n    {%- if messages | length != 0 %}\\n        {%- set first_user_message = messages[0][\\'content\\']|trim %}\\n        {%- set messages = messages[1:] %}\\n    {%- else %}\\n        {{- raise_exception(\"Cannot put tools in the first user message when there\\'s no first user message!\") }}\\n{%- endif %}\\n    {{- \\'<|start_header_id|>user<|end_header_id|>\\\\n\\\\n\\' -}}\\n    {{- \"Given the following functions, please respond with a JSON for a function call \" }}\\n    {{- \"with its proper arguments that best answers the given prompt.\\\\n\\\\n\" }}\\n    {{- \\'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.\\' }}\\n    {{- \"Do not use variables.\\\\n\\\\n\" }}\\n    {%- for t in tools %}\\n        {{- t | tojson(indent=4) }}\\n        {{- \"\\\\n\\\\n\" }}\\n    {%- endfor %}\\n    {{- first_user_message + \"<|eot_id|>\"}}\\n{%- endif %}\\n\\n{%- for message in messages %}\\n    {%- if not (message.role == \\'ipython\\' or message.role == \\'tool\\' or \\'tool_calls\\' in message) %}\\n        {{- \\'<|start_header_id|>\\' + message[\\'role\\'] + \\'<|end_header_id|>\\\\n\\\\n\\'+ message[\\'content\\'] | trim + \\'<|eot_id|>\\' }}\\n    {%- elif \\'tool_calls\\' in message %}\\n        {%- if not message.tool_calls|length == 1 %}\\n            {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\\n        {%- endif %}\\n        {%- set tool_call = message.tool_calls[0].function %}\\n        {{- \\'<|start_header_id|>assistant<|end_header_id|>\\\\n\\\\n\\' -}}\\n        {{- \\'{\"name\": \"\\' + tool_call.name + \\'\", \\' }}\\n        {{- \\'\"parameters\": \\' }}\\n        {{- tool_call.arguments | tojson }}\\n        {{- \"}\" }}\\n        {{- \"<|eot_id|>\" }}\\n    {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\\n        {{- \"<|start_header_id|>ipython<|end_header_id|>\\\\n\\\\n\" }}\\n        {%- if message.content is mapping or message.content is iterable %}\\n            {{- message.content | tojson }}\\n        {%- else %}\\n            {{- message.content }}\\n        {%- endif %}\\n        {{- \"<|eot_id|>\" }}\\n    {%- endif %}\\n{%- endfor %}\\n{%- if add_generation_prompt %}\\n    {{- \\'<|start_header_id|>assistant<|end_header_id|>\\\\n\\\\n\\' }}\\n{%- endif %}\\n'\n\n\nclass Llama3dot2ChatTemplate(ChatTemplate):\n    # available_roles = [\"user\", \"assistant\"]\n    template_str = llama3dot2_template\n\n    def get_role_start(self, role_name):\n        if role_name == \"system\":\n            # TODO: Figure out how Jinja detects datetime and replace with strftime() if needed - currently using fallback\n            return \"<|start_header_id|>system<|end_header_id|>\\n\\nCutting Knowledge Date: December 2023\\nToday Date: 26 Jul 2024\"\n        elif role_name == \"user\":\n            return \"<|start_header_id|>user<|end_header_id|>\\n\\n\"\n        elif role_name == \"assistant\":\n            return \"<|start_header_id|>assistant<|end_header_id|>\\n\\n\"\n        else:\n            raise UnsupportedRoleException(role_name, self)\n\n    def get_role_end(self, role_name=None):  # noqa ARG002\n        return \"<|eot_id|>\"\n\n\nCHAT_TEMPLATE_CACHE[llama3dot2_template] = Llama3dot2ChatTemplate\n"
  },
  {
    "path": "guidance/debug.py",
    "content": "\"\"\"Debug utilities for the guidance widget.\"\"\"\n\nimport logging\n\nfrom .registry import get_renderer\nfrom .visual._renderer import AutoRenderer, JupyterWidgetRenderer\n\nlogger = logging.getLogger(__name__)\n\n\ndef enable_widget_debug() -> None:\n    \"\"\"Enable debug mode in the guidance widget.\n\n    This will start capturing all messages sent to the widget for later inspection.\n    Call dump_widget_debug() to dump the captured data to a string.\n\n    Example:\n        >>> import guidance\n        >>> guidance.enable_widget_debug()\n        >>> # ... run your guidance code ...\n        >>> guidance.dump_widget_debug()\n    \"\"\"\n    renderer = get_renderer()\n    if isinstance(renderer, JupyterWidgetRenderer):\n        renderer.enable_debug()\n    elif isinstance(renderer, AutoRenderer):\n        # Check if the auto renderer has a JupyterWidgetRenderer inside\n        if hasattr(renderer, \"_renderer\") and isinstance(renderer._renderer, JupyterWidgetRenderer):\n            renderer._renderer.enable_debug()\n        else:\n            logger.warning(f\"Auto renderer contains {type(renderer._renderer)} instead of JupyterWidgetRenderer\")\n    else:\n        logger.warning(f\"Debug mode only available with Jupyter widget renderer, got {type(renderer)}\")\n\n\ndef dump_widget_debug() -> str | None:\n    \"\"\"Get captured debug data as a JSON string.\n\n    Returns the captured widget messages and state as a JSON string,\n    or None if no debug data is available.\n\n    Example:\n        >>> import guidance\n        >>> guidance.enable_widget_debug()\n        >>> # ... run your guidance code ...\n        >>> debug_data = guidance.dump_widget_debug()\n        >>> print(debug_data)  # inspect in notebook\n    \"\"\"\n    renderer = get_renderer()\n    if isinstance(renderer, JupyterWidgetRenderer):\n        return renderer.get_debug_data()\n    elif isinstance(renderer, AutoRenderer):\n        # Check if the auto renderer has a JupyterWidgetRenderer inside\n        if hasattr(renderer, \"_renderer\") and isinstance(renderer._renderer, JupyterWidgetRenderer):\n            return renderer._renderer.get_debug_data()\n        else:\n            logger.warning(f\"Auto renderer contains {type(renderer._renderer)} instead of JupyterWidgetRenderer\")\n            return None\n    else:\n        logger.warning(f\"Debug dump only available with Jupyter widget renderer, got {type(renderer)}\")\n        return None\n\n\ndef clear_widget_debug() -> None:\n    \"\"\"Clear captured widget debug messages.\n\n    Useful for starting fresh between different test runs.\n\n    Example:\n        >>> import guidance\n        >>> guidance.enable_widget_debug()\n        >>> # ... run some guidance code ...\n        >>> guidance.clear_widget_debug()  # clear before next test\n        >>> # ... run different guidance code ...\n        >>> debug_data = guidance.dump_widget_debug()\n    \"\"\"\n    renderer = get_renderer()\n    if isinstance(renderer, JupyterWidgetRenderer):\n        renderer.clear_debug_data()\n    elif isinstance(renderer, AutoRenderer):\n        # Check if the auto renderer has a JupyterWidgetRenderer inside\n        if hasattr(renderer, \"_renderer\") and isinstance(renderer._renderer, JupyterWidgetRenderer):\n            renderer._renderer.clear_debug_data()\n        else:\n            logger.warning(f\"Auto renderer contains {type(renderer._renderer)} instead of JupyterWidgetRenderer\")\n    else:\n        logger.warning(f\"Clear debug only available with Jupyter widget renderer, got {type(renderer)}\")\n\n\ndef widget_debug_info() -> None:\n    \"\"\"Print debug information about the current widget renderer setup.\n\n    This function displays Python-side version info and requests version info\n    from the JavaScript widget if available.\n    \"\"\"\n    import platform\n    import sys\n\n    from .visual._environment import Environment\n\n    renderer = get_renderer()\n    env = Environment()\n\n    print(f\"Renderer type: {type(renderer)}\")\n    print(f\"Environment is_notebook(): {env.is_notebook()}\")\n    print(f\"Environment is_terminal(): {env.is_terminal()}\")\n    print(f\"Python version: {sys.version.split()[0]}\")\n    print(f\"Platform: {platform.system()} {platform.release()}\")\n\n    # Check stitch installation (Python side)\n    try:\n        import stitch\n\n        version = getattr(stitch, \"__version__\", \"unknown\")\n        print(f\"Stitch (Python): {version}\")\n    except ImportError:\n        print(\"Stitch (Python): Not installed\")\n\n    # Check guidance version\n    try:\n        import guidance\n\n        guidance_version = getattr(guidance, \"__version__\", \"unknown\")\n        print(f\"Guidance version: {guidance_version}\")\n    except ImportError:\n        guidance_version = \"unknown\"\n        print(\"Guidance version: unknown\")\n\n    # Try to get widget version info if we have a JupyterWidgetRenderer\n    widget_renderer = None\n    if isinstance(renderer, JupyterWidgetRenderer):\n        widget_renderer = renderer\n        print(\"Widget debug mode should work!\")\n    elif isinstance(renderer, AutoRenderer):\n        print(f\"AutoRenderer inner type: {type(renderer._renderer)}\")\n        if hasattr(renderer, \"_renderer\") and isinstance(renderer._renderer, JupyterWidgetRenderer):\n            widget_renderer = renderer._renderer\n            print(\"Widget debug mode should work!\")\n        else:\n            print(\"Widget debug mode not available - inner renderer is not JupyterWidgetRenderer\")\n    else:\n        print(\"Widget debug mode not available - not using widget renderer\")\n"
  },
  {
    "path": "guidance/library/__init__.py",
    "content": "# import functions that can be called directly\n# core grammar functions\nfrom .._grammar import select, special_token, string, token_limit, with_temperature\nfrom ._audio import audio, gen_audio\n\n# context blocks\nfrom ._block import block\nfrom ._capture import capture\nfrom ._ebnf import gbnf_to_lark, lark\nfrom ._gen import gen, regex\nfrom ._image import gen_image, image\nfrom ._json import json\nfrom ._optional import optional\nfrom ._role import assistant, role, system, user\n\n# stateless library functions\nfrom ._sequences import at_most_n_repeats, exactly_n_repeats, one_or_more, sequence, zero_or_more\nfrom ._substring import substring\nfrom ._video import gen_video, video\n\n__all__ = [\n    \"assistant\",\n    \"at_most_n_repeats\",\n    \"audio\",\n    \"block\",\n    \"capture\",\n    \"exactly_n_repeats\",\n    \"gbnf_to_lark\",\n    \"gen\",\n    \"gen_audio\",\n    \"gen_image\",\n    \"gen_video\",\n    \"image\",\n    \"json\",\n    \"lark\",\n    \"one_or_more\",\n    \"optional\",\n    \"regex\",\n    \"role\",\n    \"select\",\n    \"sequence\",\n    \"special_token\",\n    \"string\",\n    \"substring\",\n    \"system\",\n    \"token_limit\",\n    \"user\",\n    \"video\",\n    \"with_temperature\",\n    \"zero_or_more\",\n]\n"
  },
  {
    "path": "guidance/library/_audio.py",
    "content": "import base64\nimport pathlib\n\nfrom .._ast import AudioBlob, GenAudio\nfrom .._guidance import guidance\nfrom .._utils import bytes_from\n\n\n@guidance\ndef audio(lm, src: str | pathlib.Path | bytes, allow_local: bool = True):\n    bytes_data = bytes_from(src, allow_local=allow_local)\n    base64_bytes = base64.b64encode(bytes_data)\n    lm += AudioBlob(data=base64_bytes)\n    return lm\n\n\n@guidance\ndef gen_audio(lm, **kwargs):\n    return lm + GenAudio(kwargs=kwargs)\n"
  },
  {
    "path": "guidance/library/_block.py",
    "content": "from contextlib import contextmanager\n\nfrom .._ast import ASTNode, Function\nfrom .._guidance import _in_stateless_context\nfrom ..models._base._model import _active_blocks\n\n\nclass Block:\n    def __init__(self, name: str | None, opener: str | Function | ASTNode, closer: str | Function | ASTNode):\n        self.name = name\n        self.opener = opener\n        self.closer = closer\n\n\n@contextmanager\ndef block(name=None, opener=None, closer=None):\n    if _in_stateless_context.get():\n        raise RuntimeError(\"Cannot use roles or other blocks when stateless=True\")\n    current_blocks = _active_blocks.get()\n    new_block = Block(name=name, opener=opener, closer=closer)\n    token = _active_blocks.set(current_blocks + (new_block,))\n    try:\n        yield\n    finally:\n        _active_blocks.reset(token)\n"
  },
  {
    "path": "guidance/library/_capture.py",
    "content": "from .._grammar import GrammarNode\nfrom .._grammar import capture as grammar_capture\nfrom .._guidance import guidance\nfrom ._block import block\n\n\n@guidance(stateless=lambda *args, **kwargs: isinstance(args[0], GrammarNode))\ndef capture(lm, value, name):\n    if isinstance(value, GrammarNode):\n        return lm + grammar_capture(value, name)\n    else:\n        with block(name):\n            lm += value\n        return lm\n"
  },
  {
    "path": "guidance/library/_ebnf.py",
    "content": "from llguidance.gbnf_to_lark import gbnf_to_lark as _gbnf_to_lark\n\nfrom .._ast import GrammarNode, LarkNode, RuleNode\nfrom .._grammar import capture, token_limit, with_temperature\n\n\ndef lark(\n    lark_grammar: str,\n    *,\n    name: str | None = None,\n    temperature: float | None = None,\n    max_tokens: int | None = None,\n) -> GrammarNode:\n    \"\"\"\n    Builds a guidance grammar from (a variant of) the EBNF syntax used by the Lark parsing toolkit.\n\n    See documentation at https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md for more\n    details.\n    \"\"\"\n    node = RuleNode(name=name or \"lark\", value=LarkNode(lark_grammar=lark_grammar))\n    if temperature is not None:\n        node = with_temperature(node, temperature)\n    if max_tokens is not None:\n        node = token_limit(node, max_tokens)\n    if name is not None:\n        node = capture(node, name)\n\n    return node\n\n\ndef gbnf_to_lark(gbnf_grammar: str) -> str:\n    \"\"\"\n    Converts a GBNF (llama.cpp) grammar to Lark(-like) syntax. This is a best-effort\n    conversion and may not work for all grammars. We recommend using this function\n    as a starting point and then manually editing the resulting Lark grammar to suit\n    your needs.\n\n    See documentation at https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md\n    for more information on the output syntax's semantics.\n    \"\"\"\n    return _gbnf_to_lark(gbnf_grammar)\n"
  },
  {
    "path": "guidance/library/_gen.py",
    "content": "import logging\nfrom typing import Literal\n\nfrom .._ast import ToolCallNode\nfrom .._grammar import capture, quote_regex\nfrom .._grammar import gen as grammar_gen\nfrom .._grammar import regex as regex_node\nfrom .._guidance import guidance\n\nlogger = logging.getLogger(__name__)\n\n\ndef gen(\n    name=None,\n    *,\n    max_tokens=None,\n    list_append=False,\n    regex=None,\n    tools=None,\n    hide_tool_call=False,\n    stop: str | list[str] | None = None,\n    stop_regex: str | list[str] | None = None,\n    suffix: str | None = None,\n    n=1,\n    temperature=None,\n    top_p=1.0,\n    save_stop_text: bool | str = False,\n    tool_choice: Literal[\"auto\", \"required\"] = \"auto\",\n):\n    \"\"\"Generate a set of tokens until a given stop criteria has been met.\n\n    This function is a useful utility that can allow you to specify most grammars used by typical\n    LM generation programs. It also has the added ability to interleave generation with tool calls.\n\n        >>> lm += gen(\"my_generation\", max_tokens=10)\n        >>> print(lm[\"my_generation\"])\n        some text from the LLM\n\n    Parameters\n    ----------\n\n        name : str or None\n            If this is not None then the the results of the generation will be saved as a variable on\n            the Model object (so you can access the result as `lm[\"var_name\"]`).\n\n        max_tokens : int\n            The maximum number of generation tokens we should use. Note that this limit is not exact when\n            regular expression pattern constraints are present, but guidance does attempt to end the generation\n            as soon as possible while keeping the regex constraints satisfied.\n\n        list_append : bool\n            If this is True then the results saved to `lm[name]` will not be written directly but rather appended\n            to a list (if no list with the current name is present one will be created). This is useful for\n            building lists inside python loops.\n\n        regex : str or None\n            This is a regular expression that will be used to constrain the generation. The model is only allowed\n            to generate tokens that match this regular expression. Note that for variable length expressions the\n            model is free to continue the expression after a complete match, but generation will terminate as soon\n            as the model generates anything that does not match the pattern (this ending behavior may change a bit we\n            update guidance to maintain the grammar parsing state between calls).\n\n        stop : str or list or None\n            The stop string (or list of strings) we should use for terminating this generation segment.\n\n        stop_regex : str or list or None\n            The stop regular expression (or list of regular expressions) we should use for terminating this generation segment.\n\n        save_stop_text : bool or str\n            If True then this saves the captured stop text or regex into a variable of the name `str(name) + \"_stop_text\"`. If\n            a string is given then the captured stop text is saved under that name.\n\n        temperature : float\n            The temperature to use during this generation call. Note that when parsing ambiguous grammars that include\n            multiple conflicting temperatures (for example from multiple possible `gen` calls inside a `select`) the highest\n            temperature of all options is used by the model (since we only want to run the model once, not once for every\n            possible parse path).\n\n        top_p : float\n            TODO! Will control the models top_p generation parameter, but has been yet been implemented beyond top_p=1.0.\n\n        n : int\n            TODO! Will control the number of parallel generation calls made during gen.\n\n        tools : Tool or list or None\n            A list of `guidance.Tool` or Python functions (which will be converted to `guidance.Tool`).\n            When using `tools` you must specify `max_tokens` and cannot use `regex`.\n\n        hide_tool_call : bool\n            Controls if we should hide the text generated by the model to trigger a tool call. You may want to hide the tool\n            call from the model's context if you plan to change its format after the call is made.\n    \"\"\"\n    if hide_tool_call:\n        raise ValueError(\"`hide_tool_call` is deprecated\")\n    if tools:\n        if stop:\n            raise ValueError(\"Cannot use `stop` with `tools`\")\n        if stop_regex:\n            raise ValueError(\"Cannot use `stop_regex` with `tools`\")\n        if suffix:\n            raise ValueError(\"Cannot use `suffix` with `tools`\")\n        if temperature is not None:\n            raise NotImplementedError(\"`temperature` is not supported with `tools` yet\")\n        if max_tokens is not None:\n            raise NotImplementedError(\"`max_tokens` is not supported with `tools` yet\")\n        if name is not None:\n            raise NotImplementedError(\"`name` is not supported with `tools` yet\")\n\n        @guidance(stateless=False, dedent=False)\n        def tool_gen(lm):\n            return lm + ToolCallNode.from_tools(\n                tools=tools,\n                tool_choice=tool_choice,\n                parallel_tool_calls=False,  # TODO: support parallel tool calls\n                plaintext_regex=regex,\n            )\n\n        return tool_gen()\n\n    assert n == 1, \"We still need to add support for n>1! Consider putting your gen call in a loop for now.\"\n    assert top_p == 1, \"Please use `model.with_sampling_params` to set top_p.\"\n\n    logger.debug(f'start gen(name=\"{name}\")')\n\n    if stop is not None and stop_regex is not None:\n        raise ValueError(\"Cannot use both stop and stop_regex\")\n    if isinstance(stop, list):\n        stop_regex = [quote_regex(s) for s in stop]\n        stop = None\n    if isinstance(stop_regex, list):\n        stop_regex = \"|\".join(list(stop_regex))\n\n    if save_stop_text is False:\n        save_stop_name = None\n    elif save_stop_text is True:\n        # TODO: \"None_stop_text\" -- is that really what we want?\n        save_stop_name = str(name) + \"_stop_text\"\n    else:\n        save_stop_name = save_stop_text\n\n    return grammar_gen(\n        regex=regex,\n        stop_regex=stop_regex,\n        stop=stop,\n        suffix=suffix,\n        stop_capture=save_stop_name,\n        name=name,\n        list_append=list_append,\n        temperature=temperature,\n        max_tokens=max_tokens,\n    )\n\n\n@guidance(stateless=True)\ndef regex(lm, pattern, *, name=None):\n    node = regex_node(pattern)\n    if name:\n        node = capture(node, name)\n    return lm + node\n"
  },
  {
    "path": "guidance/library/_image.py",
    "content": "import base64\nimport importlib.resources\nimport pathlib\nimport re\n\nfrom .._ast import ImageBlob, ImageUrl\nfrom .._guidance import guidance\nfrom .._utils import bytes_from\nfrom ..trace._trace import ImageOutput\n\n\n@guidance\ndef image(lm, src: str | pathlib.Path | bytes, allow_local: bool = True):\n    if isinstance(src, str) and re.match(r\"^(?!file://)[^:/]+://\", src):\n        lm += ImageUrl(url=src)\n    else:\n        bytes_data = bytes_from(src, allow_local=allow_local)\n        base64_bytes = base64.b64encode(bytes_data)\n        lm += ImageBlob(data=base64_bytes)\n    return lm\n\n\n@guidance\ndef gen_image(lm):\n    # TODO(nopdive): Mock for testing. Remove all of this code later.\n    with importlib.resources.files(\"guidance\").joinpath(\"resources/sample_image.png\").open(\"rb\") as f:\n        bytes_data = f.read()\n    base64_bytes = base64.b64encode(bytes_data)\n    lm += ImageOutput(value=base64_bytes, is_input=False)\n    return lm\n"
  },
  {
    "path": "guidance/library/_json.py",
    "content": "from json import loads as json_loads\nfrom typing import Any, Mapping, TypeAlias\n\nimport pydantic\n\nfrom .._ast import JsonNode, LLGJsonCompileOptions, RuleNode\nfrom .._grammar import capture, token_limit, with_temperature\nfrom ._pydantic import pydantic_to_json_schema\n\nJSONSchema: TypeAlias = bool | Mapping[str, Any]\n\n\ndef json(\n    name: str | None = None,\n    *,\n    schema: None | str | JSONSchema | type[pydantic.BaseModel] | pydantic.TypeAdapter[Any] = None,\n    temperature: float | None = None,\n    max_tokens: int | None = None,\n    separators: tuple[str, str] | None = None,\n    whitespace_flexible: bool = False,\n    whitespace_pattern: str | None = None,\n    lenient: bool = False,\n):\n    \"\"\"Generate valid JSON according to the supplied JSON schema or `pydantic` model.\n\n    Not all parts of `JSON schema <https://json-schema.org/>`_ are supported. Indeed some parts\n    (such as bounds on numbers) cannot really be supported in the context of LLM generation.\n\n    Using a JSON schema:\n\n        >>> schema = ''{ \"type\": \"object\", \"properties\": { \"a\" : {\"type\": \"integer\"} } }'\n        >>> schema_obj = json.loads(schema)\n        >>> lm += json(name=\"generated_object\", schema=schema_obj)\n        >>> print(json.loads(lm[\"generated_object\"]))\n        { 'a' : 2 }\n\n    Using a ``pydantic.BaseModel``:\n\n        >>> class Schema(BaseModel):\n        ...     b: bool\n        >>> lm += json(name=\"generated_object\", schema=Schema)\n        >>> print(json.loads(lm[\"generated_object\"]))\n        { 'b' : False }\n\n    Using a ``pydantic.TypeAdapter``:\n\n        >>> schema = TypeAdapter(list[int])\n        >>> lm += json(name=\"generated_object\", schema=schema)\n        >>> print(json.loads(lm[\"generated_object\"]))\n        [1, 2, 3]\n\n    Parameters\n    ----------\n\n    name : str or None\n        If this is not None then the the results of the generation will be saved as a variable on\n        the Model object (so you can access the result as ``lm[\"var_name\"]``).\n\n    schema : Union[None, Mapping[str, Any], Type[pydantic.BaseModel], pydantic.TypeAdapter]\n        One of:\n            - None, in which case any valid JSON will be generated\n            - A string representing a JSON schema which will be parsed using ``json.loads()``\n            - A JSON schema object. This is a JSON schema string which has been passed to ``json.loads()``\n            - A subclass of ``pydantic.BaseModel``\n            - An instance of ``pydantic.TypeAdapter``\n    \"\"\"\n    if schema is False:\n        raise ValueError(\"Unsatisfiable schema: schema is false\")\n    elif schema is True:\n        # Any valid JSON is acceptable\n        schema = {}\n    elif isinstance(schema, pydantic.TypeAdapter) or (\n        isinstance(schema, type) and issubclass(schema, pydantic.BaseModel)\n    ):\n        schema = pydantic_to_json_schema(schema)\n    elif isinstance(schema, str):\n        from_str = json_loads(schema)\n        if not isinstance(from_str, dict):\n            raise ValueError(\"JSON schema string must be a JSON object (i.e. a dictionary)\")\n        schema = from_str\n\n    if whitespace_pattern is not None:\n        whitespace_flexible = True\n\n    if separators is None:\n        if whitespace_flexible or whitespace_pattern:\n            separators = (\",\", \":\")\n        else:\n            separators = (\", \", \": \")\n\n    if len(separators) != 2:\n        raise ValueError(\"separators must be a tuple of (item_separator, key_separator)\")\n    item_separator, key_separator = separators\n\n    llg_options = LLGJsonCompileOptions(\n        whitespace_flexible=whitespace_flexible,\n        whitespace_pattern=whitespace_pattern,\n        item_separator=item_separator,\n        key_separator=key_separator,\n        coerce_one_of=True,\n        lenient=lenient,\n    )\n\n    if isinstance(schema, Mapping):\n        schema = dict(schema)\n    elif schema is not None:\n        raise TypeError(\n            f\"Invalid schema type: {type(schema)}. Expected None, a boolean, a JSON schema object, a pydantic model, or a pydantic TypeAdapter.\"\n        )\n\n    node = JsonNode(\n        schema=schema,\n        llg_options=llg_options,\n    )\n\n    VALIDATE = True\n    if VALIDATE:\n        # TODO: decide whether or not to keep this -- it lets us double check that llguidance can handle the schema which isn't necessarily\n        # what we want, as llguidance may or may not be the backend we are using. That being said, it's sort of nice to get an exception when\n        # you call `json` instead of waiting for generation to fail.\n        node._llguidance_validate()\n\n    rule = RuleNode(\n        name=name or \"json\",\n        value=node,\n    )\n\n    if temperature is not None:\n        rule = with_temperature(rule, temperature)\n    if max_tokens is not None:\n        rule = token_limit(rule, max_tokens)\n    if name is not None:\n        rule = capture(rule, name)\n    return rule\n"
  },
  {
    "path": "guidance/library/_optional.py",
    "content": "from .._grammar import repeat\nfrom .._guidance import guidance\n\n\n@guidance(stateless=True)\ndef optional(lm, value):\n    return lm + repeat(value, 0, 1)\n"
  },
  {
    "path": "guidance/library/_pydantic.py",
    "content": "import inspect\nfrom typing import Any, Union\n\nimport pydantic\n\n\nclass GenerateJsonSchemaSafe(pydantic.json_schema.GenerateJsonSchema):\n    \"\"\"\n    Subclass pydantic's GenerateJsonSchema to catch pydantic schemas that will not\n    translate properly to json schemas used for generation.\n\n    In particular, JSON schemas do not offer a way to specify \"key type\",\n    so we need to raise an exception if users attempt to specify non-string\n    keys through pydantic. Otherwise, they may get unexpected output from\n    model generation.\n    \"\"\"\n\n    def generate_inner(self, schema):\n        if schema[\"type\"] == \"dict\":\n            key_type = schema[\"keys_schema\"][\"type\"]\n            if key_type != \"str\":\n                raise TypeError(f\"JSON does not support non-string keys, got type {key_type}\")\n        return super().generate_inner(schema)\n\n\ndef pydantic_to_json_schema(schema: Union[type[\"pydantic.BaseModel\"], \"pydantic.TypeAdapter[Any]\"]) -> dict[str, Any]:\n    if inspect.isclass(schema) and issubclass(schema, pydantic.BaseModel):\n        return schema.model_json_schema(schema_generator=GenerateJsonSchemaSafe)\n    if isinstance(schema, pydantic.TypeAdapter):\n        return schema.json_schema(schema_generator=GenerateJsonSchemaSafe)\n    raise TypeError(f\"Cannot generate json schema from type {type(schema)}\")\n"
  },
  {
    "path": "guidance/library/_role.py",
    "content": "from contextlib import AbstractContextManager\n\nfrom .._ast import RoleEnd, RoleStart\nfrom ._block import block\n\n\n# TODO HN: Add a docstring to better describe arbitrary role functions\ndef role(role: str) -> AbstractContextManager:\n    return block(\n        name=None,\n        opener=RoleStart(role),\n        closer=RoleEnd(role),\n    )\n\n\ndef system() -> AbstractContextManager:\n    \"\"\"Indicate the 'system' prompt\n\n    A convention has grown up around 'chat' APIs that\n    prompts are split into three parts: system, user\n    and assistant.\n    This indicates the start of a 'system' block, which\n    provides background information to the LLM.\n\n        >>> with system():\n        >>>     lm += \"A system prompt\"\n\n    \"\"\"\n    return role(\"system\")\n\n\ndef user() -> AbstractContextManager:\n    \"\"\"Indicate the 'user' prompt\n\n    A convention has grown up around 'chat' APIs that\n    prompts are split into three parts: system, user\n    and assistant.\n    This indicates the start of a 'user' block, which\n    provides input to the LLM from the user.\n\n        >>> with user():\n        >>>     lm += \"What the user said\"\n\n    \"\"\"\n    return role(\"user\")\n\n\ndef assistant() -> AbstractContextManager:\n    \"\"\"Indicate the 'assistant' prompt\n\n    A convention has grown up around 'chat' APIs that\n    prompts are split into three parts: system, user\n    and assistant.\n    This indicates the start of an 'assistant' block, which\n    marks LLM response (or where the LLM will generate\n    the next response).\n\n        >>> with assistant():\n        >>>     lm += gen(name=\"model_output\", max_tokens=20)\n\n    \"\"\"\n    return role(\"assistant\")\n"
  },
  {
    "path": "guidance/library/_sequences.py",
    "content": "from .._grammar import repeat\nfrom .._guidance import guidance\n\n\n@guidance(stateless=True)\ndef exactly_n_repeats(model, value, n_repeats: int):\n    return model + repeat(value, min=n_repeats, max=n_repeats)\n\n\n@guidance(stateless=True)\ndef at_most_n_repeats(model, value, n_repeats: int):\n    return model + repeat(value, min=0, max=n_repeats)\n\n\n@guidance(stateless=True)\ndef sequence(model, value, min_length: int = 0, max_length: int | None = None):\n    # Just an alias for repeat for now -- TODO: remove?\n    return model + repeat(value, min=min_length, max=max_length)\n\n\n@guidance(stateless=True)\ndef one_or_more(model, value):\n    return model + repeat(value, min=1)\n\n\n@guidance(stateless=True)\ndef zero_or_more(model, value):\n    return model + repeat(value, min=0)\n"
  },
  {
    "path": "guidance/library/_subgrammar.py",
    "content": "from .._ast import GrammarNode, RuleNode\nfrom .._grammar import regex, subgrammar\n\n__all__ = [\"as_regular_grammar\", \"lexeme\", \"regex\", \"subgrammar\"]\n\n\ndef as_regular_grammar(node: GrammarNode, lexeme=False):\n    # TODO: Remove this assertion-only check?\n    if isinstance(node, RuleNode):\n        rule = node\n    else:\n        rule = RuleNode(\"dummy\", node)\n    assert rule.is_allowed_in_lark_terminal\n    return node\n\n\ndef lexeme(body_regex: str, json_string: bool = False):\n    if json_string:\n        raise NotImplementedError(\"JSON strings are not supported\")\n    return regex(body_regex)\n"
  },
  {
    "path": "guidance/library/_substring.py",
    "content": "import re\nfrom typing import Callable, Iterable, Literal\n\nfrom .._ast import RuleNode, SubstringNode\n\n\ndef chunk_on_word(text: str) -> list[str]:\n    return re.findall(r\"(\\s+|\\w+|[^\\s\\w]+)\", text)\n\n\ndef substring(\n    target_string: str,\n    *,\n    chunk: Literal[\"word\", \"character\"] | Callable[[str], Iterable[str]] = \"word\",\n    name: str | None = None,\n) -> RuleNode:\n    chunks: Iterable[str]\n    if chunk == \"word\":\n        chunks = chunk_on_word(target_string)\n    elif chunk == \"character\":\n        chunks = tuple(target_string)\n    elif callable(chunk):\n        chunks = chunk(target_string)\n        if \"\".join(chunks) != target_string:\n            raise ValueError(\n                \"chunk_on function must return a sequence of strings that can be joined to form the target string\"\n            )\n    else:\n        raise ValueError(f\"Invalid `chunk` value: {chunk!r}. Expected 'word', 'character', or a function.\")\n\n    return RuleNode(\n        name=name or \"substring\",\n        value=SubstringNode(tuple(chunks)),\n        capture=name,\n    )\n"
  },
  {
    "path": "guidance/library/_video.py",
    "content": "import base64\nimport importlib.resources\nimport pathlib\n\nfrom .._guidance import guidance\nfrom .._utils import bytes_from\n\n# from ..trace._trace import VideoInput\nfrom ..trace._trace import VideoOutput\n\n\n@guidance\ndef video(lm, src: str | pathlib.Path | bytes, allow_local: bool = True):\n    # TODO(nopdive): Mock for testing. Remove all of this code later.\n    bytes_data = bytes_from(src, allow_local=allow_local)\n    base64_bytes = base64.b64encode(bytes_data)\n    lm += VideoOutput(value=base64_bytes, is_input=True)\n    # lm += VideoInput(value=base64_string)\n    return lm\n\n\n@guidance\ndef gen_video(lm):\n    # TODO(nopdive): Mock for testing. Remove all of this code later.\n    with importlib.resources.files(\"guidance\").joinpath(\"resources/sample_video.png\").open(\"rb\") as f:\n        bytes_data = f.read()\n    base64_bytes = base64.b64encode(bytes_data)\n    lm += VideoOutput(value=base64_bytes, is_input=False)\n    return lm\n"
  },
  {
    "path": "guidance/metrics/__init__.py",
    "content": "\"\"\"Metrics that arise from both language models and its execution environment.\"\"\"\n\nfrom ._metrics import Monitor, PeriodicMetricsGenerator, emit_usage\n\n__all__ = [\n    \"Monitor\",\n    \"PeriodicMetricsGenerator\",\n    \"emit_usage\",\n]\n"
  },
  {
    "path": "guidance/metrics/_metrics.py",
    "content": "import asyncio\nimport logging\nimport time\nfrom asyncio import CancelledError\nfrom enum import Enum\nfrom typing import Any, Sequence\n\nimport psutil\n\nfrom .._schema import TokenUsage\nfrom .._topics import METRICS_TOPIC\nfrom ..visual import MetricMessage\n\nMISSING_VALUE = 0\n\nlogger = logging.getLogger(__name__)\n\n\nclass PeriodicMetricsGenerator:\n    def __init__(self, monitor: \"Monitor\", sleep_sec=0.5):\n        self._monitor = monitor\n        self._sleep_sec = sleep_sec\n        self._task = None\n        self._cancelled = False\n        self._is_paused = False\n\n    def start(self):\n        from ..registry import get_bg_async\n\n        bg = get_bg_async()\n        self._task = bg.run_async_coroutine(bg.async_task(self._emit())).result()\n\n    def stop(self):\n        if self._task is not None:\n            self._cancelled = True\n            self._task.cancel()\n\n    def pause(self):\n        \"\"\"\n        Pauses the model by setting the internal _is_paused flag to True.\n\n        This method can be used to temporarily halt the model's operations.\n        \"\"\"\n        self._is_paused = True\n\n    def resume(self):\n        \"\"\"\n        Resume the model's operation by setting the paused state to False.\n\n        This method changes the internal state of the model to indicate that it is no longer paused.\n        \"\"\"\n        self._is_paused = False\n\n    async def _emit(self):\n        import asyncio\n\n        from ..registry import get_exchange\n\n        while not self._cancelled:\n            try:\n                await asyncio.sleep(self._sleep_sec)\n\n                cpu_percent = self._monitor.get_metric(MonitoringMetric.CPU_USAGE)\n                used_ram = self._monitor.get_metric(MonitoringMetric.MEM_USAGE)\n                gpu_percent = self._monitor.get_metric(MonitoringMetric.GPU_USAGE)\n                gpu_used_vram = self._monitor.get_metric(MonitoringMetric.GPU_USED_MEM)\n\n                if gpu_percent:\n                    gpu_percent = max(gpu_percent)\n                else:\n                    gpu_percent = MISSING_VALUE\n\n                if gpu_used_vram:\n                    gpu_used_vram = max(gpu_used_vram)\n                else:\n                    gpu_used_vram = MISSING_VALUE\n\n                if not cpu_percent:\n                    cpu_percent = MISSING_VALUE\n\n                if not used_ram:\n                    used_ram = MISSING_VALUE\n\n                if not self._is_paused:\n                    exchange = get_exchange()\n                    exchange.publish(MetricMessage(name=\"cpu\", value=cpu_percent), topic=METRICS_TOPIC)\n                    exchange.publish(MetricMessage(name=\"ram\", value=used_ram), topic=METRICS_TOPIC)\n                    exchange.publish(MetricMessage(name=\"gpu\", value=gpu_percent), topic=METRICS_TOPIC)\n                    exchange.publish(MetricMessage(name=\"vram\", value=gpu_used_vram), topic=METRICS_TOPIC)\n            except CancelledError:\n                logger.debug(\"METRICGEN:canceling\")\n                break\n            except Exception as e:  # noqa BLE001\n                logger.debug(f\"METRICGEN: {repr(e)}\", exc_info=True)\n                break\n\n        logger.debug(\"METRICGEN:exiting\")\n\n\nclass MonitoringMetric(str, Enum):\n    CPU_USAGE = \"cpu_usage\"\n    MEM_USAGE = \"mem_usage\"\n    GPU_USAGE = \"gpu_usage\"\n    GPU_USED_MEM = \"gpu_used_mem\"\n    GPU_TOTAL_MEM = \"gpu_total_mem\"\n\n\nclass Monitor:\n    \"\"\"Monitoring service to collect necessary metrics for visualization\"\"\"\n\n    def __init__(self, interval_ms: int = 1000, **kwargs):\n        self.max_size = kwargs.get(\"max_size\", 100)\n        self.stop_flag = False\n        self.task = None\n        self.interval_ms = interval_ms\n\n        # Initialize metrics storage\n        self.metrics_dict = {\n            MonitoringMetric.CPU_USAGE: [],\n            MonitoringMetric.MEM_USAGE: [],\n            MonitoringMetric.GPU_USAGE: [],\n            MonitoringMetric.GPU_USED_MEM: [],\n            MonitoringMetric.GPU_TOTAL_MEM: [],\n        }\n\n    async def _monitor_fn(self):\n        to_collect_gpu_stats = False\n        has_gpustat = False\n        try:\n            import gpustat\n\n            has_gpustat = True\n        except ImportError:\n            logger.warning(\"gpustat is not installed, run `pip install gpustat` to collect GPU stats.\")\n\n        if has_gpustat:\n            try:\n                gpu_stats = gpustat.GPUStatCollection.new_query()\n                if len(gpu_stats) > 0:\n                    to_collect_gpu_stats = True\n            except Exception as e:  # noqa BLE001\n                logger.warning(f\"Non-Nvidia GPU monitoring is not supported in this version. {e}\", exc_info=True)\n\n        while not self.stop_flag:\n            try:\n                t0 = time.time()\n\n                cpu_per_core_percent = psutil.cpu_percent(interval=None, percpu=True)\n                average_cpu_percent = sum(cpu_per_core_percent) / len(cpu_per_core_percent)\n                average_cpu_utilization = average_cpu_percent / 100.0\n                memory_usage = psutil.virtual_memory()\n                memory_usage_gb = memory_usage.used / (1024**3)\n\n                self.metrics_dict[MonitoringMetric.CPU_USAGE].append(average_cpu_utilization)\n                self.metrics_dict[MonitoringMetric.MEM_USAGE].append(memory_usage_gb)\n                if to_collect_gpu_stats:\n                    gpu_stats = gpustat.GPUStatCollection.new_query()\n\n                    usage = [gpu.utilization / 100.0 for gpu in gpu_stats.gpus]\n                    mem_usage = [gpu.memory_used for gpu in gpu_stats.gpus]\n                    mem_total = [gpu.memory_total for gpu in gpu_stats.gpus]\n\n                    self.metrics_dict[MonitoringMetric.GPU_USAGE].append(usage)\n                    self.metrics_dict[MonitoringMetric.GPU_USED_MEM].append(mem_usage)\n                    self.metrics_dict[MonitoringMetric.GPU_TOTAL_MEM].append(mem_total)\n\n                # Trim lists to max_size\n                for metrics in self.metrics_dict.values():\n                    if len(metrics) > self.max_size:\n                        metrics = metrics[-self.max_size :]\n\n                lat = time.time() - t0\n                sleep_time = self.interval_ms / 1000.0 - lat\n                if sleep_time > 0:\n                    await asyncio.sleep(sleep_time)\n\n            except Exception as e:\n                logger.error(f\"Caught {e}\", exc_info=True)\n                await asyncio.sleep(1)  # Wait a bit before retrying on error\n\n    def start(self):\n        from ..registry import get_bg_async\n\n        bg = get_bg_async()\n        self.stop_flag = False\n        self.task = bg.run_async_coroutine(bg.async_task(self._monitor_fn())).result()\n        logger.debug(\"MONITOR:start\")\n\n    def stop(self):\n        self.stop_flag = True\n        if self.task:\n            self.task.cancel()\n            self.task = None\n        for metrics in self.metrics_dict.values():\n            metrics.clear()\n        logger.debug(\"MONITOR:stop\")\n\n    def reset(self):\n        self.stop()\n        self.start()\n        logger.debug(\"MONITOR:reset\")\n\n    def get_metrics(\n        self,\n        metrics: Sequence[MonitoringMetric] = (),\n    ) -> dict[MonitoringMetric, Any]:\n        if not metrics:\n            metrics = MonitoringMetric.__members__.values()\n        result = {}\n        for metric in metrics:\n            if metric in MonitoringMetric.__members__.values():\n                result[metric] = self.metrics_dict[metric][-1] if len(self.metrics_dict[metric]) > 0 else None\n            else:\n                raise ValueError(f\"Unknown monitoring metric: {metric}\")\n        return result\n\n    def get_metric(self, metric: MonitoringMetric) -> Any:\n        return self.get_metrics([metric])[metric]\n\n\ndef emit_usage(usage: TokenUsage) -> None:\n    from ..registry import get_exchange\n\n    exchange = get_exchange()\n\n    exchange.publish(\n        MetricMessage(\n            name=\"token reduction\",\n            value=(usage.token_savings or 0) * 100,  # display as percentage\n        ),\n        topic=METRICS_TOPIC,\n    )\n\n    exchange.publish(MetricMessage(name=\"consumed\", value=usage.forward_passes), topic=METRICS_TOPIC)\n\n    exchange.publish(MetricMessage(name=\"avg latency\", value=usage.avg_latency_ms), topic=METRICS_TOPIC)\n"
  },
  {
    "path": "guidance/models/__init__.py",
    "content": "from . import experimental\nfrom ._azureai import create_azure_aifoundry_model, create_azure_openai_model\nfrom ._base import Model\nfrom ._llama_cpp import LlamaCpp\nfrom ._mock import Mock\nfrom ._onnxruntime import OnnxRuntimeGenAI\nfrom ._openai import OpenAI\nfrom ._transformers import Transformers\n\n__all__ = [\n    \"LlamaCpp\",\n    \"Mock\",\n    \"Model\",\n    \"OnnxRuntimeGenAI\",\n    \"OpenAI\",\n    \"Transformers\",\n    \"create_azure_aifoundry_model\",\n    \"create_azure_openai_model\",\n    \"experimental\",\n]\n"
  },
  {
    "path": "guidance/models/_azureai.py",
    "content": "import logging\nfrom typing import TYPE_CHECKING, Any, Callable, ContextManager, Iterator, Optional, Union, cast\n\nfrom guidance._schema import SamplingParams\n\nfrom .._ast import (\n    JsonNode,\n)\nfrom ..trace import OutputAttr\nfrom ._base import Model\nfrom ._openai_base import (\n    BaseOpenAIClientWrapper,\n    BaseOpenAIInterpreter,\n    OpenAIAudioMixin,\n    OpenAIClientWrapper,\n    OpenAIImageMixin,\n    OpenAIJSONMixin,\n    OpenAIRegexMixin,\n    OpenAIRuleMixin,\n)\n\nif TYPE_CHECKING:\n    import azure.ai.inference\n    from azure.core.credentials import AzureKeyCredential, TokenCredential\n    from openai.types.chat import ChatCompletionChunk\n\nlogger = logging.getLogger(__name__)\n\n\nclass AzureOpenAIInterpreter(OpenAIRuleMixin, OpenAIJSONMixin, OpenAIRegexMixin, BaseOpenAIInterpreter):\n    \"\"\"A basic class for interacting with Azure OpenAI.\"\"\"\n\n    def __init__(\n        self,\n        *,\n        azure_endpoint: str,\n        azure_deployment: str,\n        model_name: str,\n        api_version: str | None = None,\n        api_key: str | None = None,\n        azure_ad_token: str | None = None,\n        azure_ad_token_provider: Callable[[], str] | None = None,\n        reasoning_effort: str | None = None,\n        **kwargs,\n    ):\n        try:\n            import openai\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the openai package version >= 1 using `pip install openai -U` in order to use guidance.models.OpenAI!\"\n            ) from ie\n        client = openai.AzureOpenAI(\n            azure_endpoint=azure_endpoint,\n            azure_deployment=azure_deployment,\n            api_version=api_version,\n            api_key=api_key,\n            azure_ad_token=azure_ad_token,\n            azure_ad_token_provider=azure_ad_token_provider,\n            **kwargs,\n        )\n        super().__init__(model=model_name, client=OpenAIClientWrapper(client), reasoning_effort=reasoning_effort)\n\n\nclass AzureOpenAIAudioInterpreter(OpenAIAudioMixin, AzureOpenAIInterpreter):\n    \"\"\"Class to add audio capabilities to an Azure OpenAI model\"\"\"\n\n    pass\n\n\nclass AzureOpenAIImageInterpreter(OpenAIImageMixin, AzureOpenAIInterpreter):\n    \"\"\"Class to add image capabilities to an Azure OpenAI model\"\"\"\n\n    pass\n\n\ndef create_azure_openai_model(\n    azure_endpoint: str,\n    azure_deployment: str,\n    echo: bool = True,\n    *,\n    model_name: str,\n    api_version: str | None = None,\n    api_key: str | None = None,\n    azure_ad_token: str | None = None,\n    azure_ad_token_provider: Callable[[], str] | None = None,\n    has_audio_support: bool = False,\n    has_image_support: bool = False,\n    sampling_params: SamplingParams | None = None,\n    reasoning_effort: str | None = None,\n    **kwargs,\n) -> Model:\n    \"\"\"Create a Model capable of interacting with an Azure AI OpenAI deployment\n\n    Parameters\n    ----------\n    azure_endpoint : str\n        The endpoint which holds the OpenAI model deployment. It will probably be\n        https://<AZURE OPENAI RESOURCE NAME>.openai.azure.com/\"\n    azure_deployment : str\n        The Azure deployment name to use for the model. The Azure AI portal will\n        default this to being the model_name, but it can be different\n    model_name : str\n        The name of the Azure OpenAI model to use (e.g. gpt-4o-mini).\n    api_version : str | None\n        The API version to use for the Azure OpenAI service.\n    api_key : str | None\n        The API key to use for the Azure OpenAI service.\n    azure_ad_token : str | None\n        The Azure AD token to use for authentication.\n    azure_ad_token_provider : Callable[[], str] | None\n        A callable that returns an Azure AD token for authentication.\n    echo : bool\n        If true the final result of creating this model state will be displayed (as HTML in a notebook).\n    has_audio_support : bool\n        Indicates if the deployed model has support for audio. This factory attempts\n        to work this out from the model_name, but this can be used to force the addition\n        of audio support to the returned Model.\n    has_image_support : bool\n        Indicates if the deployed model has support for images. This factory attempts\n        to work this out from the model_name, but this can be used to force the addition\n        of image support to the returned Model.\n    **kwargs :\n        All extra keyword arguments are passed directly to the `openai.OpenAI` constructor. Commonly used argument\n        names include `base_url` and `organization`\n    \"\"\"\n    if has_audio_support and has_image_support:\n        raise ValueError(\"No known models have both audio and image support\")\n\n    interpreter_cls: type[AzureOpenAIInterpreter]\n    if (model_name and \"audio-preview\" in model_name) or has_audio_support:\n        interpreter_cls = AzureOpenAIAudioInterpreter\n    elif (model_name and (model_name.startswith(\"gpt-4o\") or model_name.startswith(\"o1\"))) or has_image_support:\n        interpreter_cls = AzureOpenAIImageInterpreter\n    else:\n        interpreter_cls = AzureOpenAIInterpreter\n\n    interpreter = interpreter_cls(\n        azure_endpoint=azure_endpoint,\n        model_name=model_name,\n        azure_deployment=azure_deployment,\n        api_version=api_version,\n        api_key=api_key,\n        azure_ad_token=azure_ad_token,\n        azure_ad_token_provider=azure_ad_token_provider,\n        reasoning_effort=reasoning_effort,\n        **kwargs,\n    )\n\n    model = Model(\n        interpreter=interpreter,\n        echo=echo,\n        sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n    )\n\n    return model\n\n\nclass AzureAIClientWrapper(BaseOpenAIClientWrapper):\n    def __init__(self, client: \"azure.ai.inference.ChatCompletionsClient\"):\n        self.client = client\n\n    def streaming_chat_completions(\n        self,\n        model: str,\n        messages: list[dict[str, Any]],\n        logprobs: bool,\n        **kwargs,\n    ) -> ContextManager[Iterator[\"ChatCompletionChunk\"]]:\n        request = self.client.complete(\n            body={\n                \"model\": model,\n                \"messages\": messages,\n                \"logprobs\": logprobs,\n                \"stream\": True,\n                **kwargs,\n            },\n            headers={\n                \"extra-parameters\": \"pass-through\",\n            },\n        )\n        # It's at least... \"mostly\" compliant with the OpenAI API?\n        return cast(\n            ContextManager[Iterator[\"ChatCompletionChunk\"]],\n            request,\n        )\n\n\nclass AzureInferenceInterpreter(OpenAIRuleMixin, OpenAIJSONMixin, OpenAIRegexMixin, BaseOpenAIInterpreter):\n    def __init__(\n        self,\n        *,\n        endpoint: str,\n        credential: Union[\"AzureKeyCredential\", \"TokenCredential\"],\n        model_name: str,\n        reasoning_effort: str | None = None,\n    ):\n        try:\n            import azure.ai.inference\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the azure-ai-inference package  using `pip install azure-ai-inference` in order to use guidance.models.AzureInference!\"\n            ) from ie\n        client = azure.ai.inference.ChatCompletionsClient(\n            endpoint=endpoint,\n            credential=credential,\n        )\n        super().__init__(model=model_name, client=AzureAIClientWrapper(client), reasoning_effort=reasoning_effort)\n\n    def json(self, node: JsonNode, **kwargs) -> Iterator[OutputAttr]:\n        return self._run(\n            json_schema={\n                \"name\": \"json_schema\",  # TODO?\n                \"schema\": node.schema,\n                \"strict\": True,\n            },\n            **kwargs,\n        )\n\n\ndef create_azure_aifoundry_model(\n    azure_endpoint: str,\n    echo: bool = True,\n    *,\n    model_name: str,\n    api_key: str | None = None,\n    token_credential: Optional[\"TokenCredential\"] = None,\n    sampling_params: SamplingParams | None = None,\n    reasoning_effort: str | None = None,\n) -> Model:\n    \"\"\"Create a Model capable of interacting with an Azure AI OpenAI deployment\n\n    Parameters\n    ----------\n    azure_endpoint : str\n        The endpoint which holds the OpenAI model deployment. It can be obtained\n        from the AI Foundry portal, and will look something like\n        \"https://<DEPLOYMENT_NAME>.<AZURE REGION>.models.ai.azure.com\"\n    echo : bool\n        If true the final result of creating this model state will be displayed (as HTML in a notebook).\n    model_name : str\n        The actual name of the deployed model\n    api_key : str\n        One of the authentication options. This can be obtained from the AI Foundry portal\n    token_credential :\n        The other authentication option. An Azure Token Credential\n    \"\"\"\n    try:\n        from azure.core.credentials import AzureKeyCredential, TokenCredential\n    except ImportError as ie:\n        raise Exception(\n            \"Please install the azure-core package using `pip install -U azure-core` in order to use guidance.models.AzureAI!\"\n        ) from ie\n\n    credential: AzureKeyCredential | TokenCredential | None = None\n    if api_key and token_credential:\n        raise ValueError(\"Specify either api_key or token_credential\")\n    elif api_key:\n        credential = AzureKeyCredential(api_key)\n    elif token_credential:\n        credential = token_credential\n    else:\n        raise ValueError(\"Must specify either api_key or token_credential\")\n\n    interpreter = AzureInferenceInterpreter(\n        endpoint=azure_endpoint,\n        credential=credential,\n        model_name=model_name,\n        reasoning_effort=reasoning_effort,\n    )\n\n    result = Model(\n        interpreter=interpreter,\n        echo=echo,\n        sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n    )\n    return result\n"
  },
  {
    "path": "guidance/models/_base/__init__.py",
    "content": "from ._interpreter import Interpreter\nfrom ._model import Model\nfrom ._state import State\n\n__all__ = [\n    \"ASTNode\",\n    \"ContentChunk\",\n    \"Interpreter\",\n    \"Message\",\n    \"MessageChunk\",\n    \"Model\",\n    \"State\",\n    \"role\",\n]\n"
  },
  {
    "path": "guidance/models/_base/_interpreter.py",
    "content": "import base64\nfrom typing import Generic, Iterator, TypeVar\n\nfrom ..._ast import (\n    ASTNode,\n    AudioBlob,\n    GenAudio,\n    GrammarNode,\n    ImageBlob,\n    ImageUrl,\n    JoinNode,\n    JsonNode,\n    LarkNode,\n    LiteralNode,\n    RegexNode,\n    RepeatNode,\n    RoleEnd,\n    RoleStart,\n    RuleNode,\n    SelectNode,\n    SubgrammarNode,\n    SubstringNode,\n    ToolCallNode,\n)\nfrom ..._utils import bytes_from\nfrom ...trace import OutputAttr\nfrom ._state import State\n\nS = TypeVar(\"S\", bound=State)\n\n\nclass Interpreter(Generic[S]):\n    def __init__(self, state: S):\n        self.state = state\n\n    def run(self, node: ASTNode, **kwargs) -> Iterator[OutputAttr]:\n        yield from node.simplify()._run(self, **kwargs)\n\n    def _role_start(self, node: RoleStart, **kwargs) -> Iterator[OutputAttr]:\n        if self.state.active_role is not None:\n            raise ValueError(f\"Cannot open role {node.role!r}: {self.state.active_role!r} is already open.\")\n        return self.role_start(node, **kwargs)\n\n    def role_start(self, node: RoleStart, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def _role_end(self, node: RoleEnd, **kwargs) -> Iterator[OutputAttr]:\n        if self.state.active_role is None:\n            raise ValueError(\"Cannot close role without active role\")\n        if self.state.active_role != node.role:\n            raise ValueError(f\"Cannot close role {node.role!r}: {self.state.active_role!r} is open.\")\n        return self.role_end(node, **kwargs)\n\n    def role_end(self, node: RoleEnd, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def text(self, node: LiteralNode, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def image_blob(self, node: ImageBlob, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def image_url(self, node: ImageUrl, **kwargs) -> Iterator[OutputAttr]:\n        image_bytes = bytes_from(node.url, allow_local=False)\n        return self.image_blob(ImageBlob(data=base64.b64encode(image_bytes)), **kwargs)\n\n    def grammar(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def regex(self, node: RegexNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def select(self, node: SelectNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def join(self, node: JoinNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def repeat(self, node: RepeatNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def substring(self, node: SubstringNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def rule(self, node: RuleNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def subgrammar(self, node: SubgrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def json(self, node: JsonNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def lark(self, node: LarkNode, **kwargs) -> Iterator[OutputAttr]:\n        return self.grammar(node, **kwargs)\n\n    def audio_blob(self, node: AudioBlob, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def gen_audio(self, node: GenAudio, **kwargs) -> Iterator[OutputAttr]:  # noqa ARG002\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n    def tool_call(self, node: ToolCallNode, **kwargs) -> Iterator[OutputAttr]:\n        raise UnsupportedNodeError(interpreter=self, node=node)\n\n\nclass UnsupportedNodeError(ValueError):\n    def __init__(self, interpreter: Interpreter, node: ASTNode):\n        super().__init__(f\"{interpreter} does not support {node!r} of type {type(node)}\")\n        self.interpreter = interpreter\n        self.node = node\n"
  },
  {
    "path": "guidance/models/_base/_model.py",
    "content": "# TODO(nopdive): This module requires a memory review.\n\nimport queue\nimport threading\nfrom contextvars import ContextVar, copy_context\nfrom copy import deepcopy\nfrom typing import TYPE_CHECKING, Any, Iterator, TypeVar, Union\n\nfrom typing_extensions import Self\n\nfrom ..._ast import (\n    ASTNode,\n    Function,\n    GenAudio,\n    ImageBlob,\n    ImageUrl,\n    LiteralNode,\n    RoleEnd,\n    RoleStart,\n    _parse_tags,\n)\nfrom ..._schema import SamplingParams, StepConfig, TokenUsage\nfrom ...trace import (\n    ImageInput,\n    LiteralInput,\n    NodeAttr,\n    RoleCloserInput,\n    RoleOpenerInput,\n    StatelessGuidanceInput,\n    TraceNode,\n)\nfrom ...trace._trace import AudioInput\nfrom ...visual import TraceMessage\nfrom ._interpreter import Interpreter\nfrom ._state import State\n\nif TYPE_CHECKING:\n    from ...library._block import Block\n\n_active_blocks: ContextVar[tuple[\"Block\", ...]] = ContextVar(\"active_blocks\", default=())\n_event_queues: ContextVar[tuple[queue.Queue[\"Model\"], ...]] = ContextVar(\"event_queues\", default=())\n_id_counter: int = 0\n\n\ndef _gen_id():\n    global _id_counter\n\n    _id = _id_counter\n    _id_counter += 1\n\n    return _id\n\n\nS = TypeVar(\"S\", bound=State)\nD = TypeVar(\"D\", bound=Any)\n\n\nclass Model:\n    def __init__(\n        self,\n        interpreter: Interpreter[S],\n        sampling_params: SamplingParams,\n        echo: bool = True,\n    ) -> None:\n        self.echo = echo\n        if self.echo:  # NOTE(nopdive): User requests renderer, lazy instantiate.\n            from ...registry import get_renderer\n\n            _ = get_renderer()\n\n        self._interpreter = interpreter\n        self._active_blocks: dict[Block, int] = {}\n        self.sampling_params: SamplingParams = sampling_params\n\n        self._parent: \"Model\" | None = None\n        self._parent_id: int | None = None\n        self._id: int = _gen_id()\n        self._trace_nodes: set[TraceNode] = set()\n        self._update_trace_node(self._id, self._parent_id, None, False)\n\n    def _update_trace_node(\n        self, identifier: int, parent_id: int | None, node_attr: NodeAttr | None = None, echo=False\n    ) -> None:\n        from ..._topics import TRACE_TOPIC\n        from ...registry import get_exchange, get_trace_handler\n\n        trace_handler = get_trace_handler()\n        trace_node = trace_handler.update_node(identifier, parent_id, node_attr)\n        self._trace_nodes.add(trace_node)\n        if echo:\n            get_exchange().publish(\n                TraceMessage(\n                    trace_id=identifier,\n                    parent_trace_id=parent_id,\n                    node_attr=node_attr,\n                ),\n                topic=TRACE_TOPIC,\n            )\n\n    def __add__(self, other: str | Function | ASTNode) -> Self:\n        self = self.copy()\n        self = self._apply_blocks()\n        if isinstance(other, str):\n            if other == \"\":\n                return self\n            other = _parse_tags(other)\n        if isinstance(other, Function):\n            return other(self)\n        if isinstance(other, ASTNode):\n            self = self._apply_node(other)\n            self = self._update_open_block_captures()\n            return self\n        return NotImplemented\n\n    def _apply_node(self, node: ASTNode) -> Self:\n        # self = self.copy()\n\n        # Input side of trace handler.\n        # TODO: StatefulGuidanceInput up in __add__?\n        if isinstance(node, RoleStart):\n            self._update_trace_node(self._id, self._parent_id, RoleOpenerInput(name=node.role), self.echo)\n        elif isinstance(node, RoleEnd):\n            self._update_trace_node(self._id, self._parent_id, RoleCloserInput(name=node.role), self.echo)\n        elif isinstance(node, LiteralNode):\n            self._update_trace_node(self._id, self._parent_id, LiteralInput(value=node.value), self.echo)\n        elif isinstance(node, ImageBlob):\n            self._update_trace_node(self._id, self._parent_id, ImageInput(value=node.data), self.echo)\n        elif isinstance(node, ImageUrl):\n            # TODO -- let's avoid downloading it here\n            pass\n        elif isinstance(node, GenAudio):\n            self._update_trace_node(\n                self._id, self._parent_id, AudioInput(value=b\"\"), self.echo\n            )  # TODO -- what goes here?\n        else:\n            self._update_trace_node(self._id, self._parent_id, StatelessGuidanceInput(value=node), self.echo)\n\n        # NOTE: passing a copy of the sampling parameters to avoid modifying the original\n        for i, output_attr in enumerate(self._interpreter.run(node, sampling_params=self.sampling_params.copy())):\n            if i != 0:\n                # On the first iteration, we already have a fresh trace node\n                # TODO: should be allowed to associate multiple output_attrs with a single input node?\n                # TODO: put this responsibility on the client in the case that it breaks a single input\n                # node into multiple input nodes to be handled sequentially?\n                self._parent_id = self._id\n                self._id = _gen_id()\n            self._update_trace_node(self._id, self._parent_id, output_attr, self.echo)\n            # Stream current model state\n            self._send_to_event_queue()\n        return self\n\n    def _send_to_event_queue(self) -> None:\n        \"\"\"For streaming\"\"\"\n        for event_queue in _event_queues.get():\n            event_queue.put(self.copy())\n\n    def stream(self) -> \"ModelStream\":\n        \"\"\"Return a new model stream object that delays execution until it is iterated over.\"\"\"\n        return ModelStream(self)\n\n    def _apply_blocks(self) -> Self:\n        # self = self.copy()\n        global_active_blocks = _active_blocks.get()\n        for block, start_index in list(reversed(self._active_blocks.items())):\n            # Close blocks that are not globally active anymore\n            if block not in global_active_blocks:\n                self._active_blocks.pop(block)\n                if block.closer is not None:\n                    closer = block.closer\n                    if isinstance(closer, str):\n                        closer = _parse_tags(closer)\n                    if isinstance(closer, Function):\n                        raise NotImplementedError(\"Stateful block opener/closer functions are not yet supported\")\n                    self = self._apply_node(closer)\n            # Update capture regardless of whether or not it's been closed\n            if block.name is not None:\n                self = self.set(block.name, str(self)[start_index:])\n        for block in global_active_blocks:\n            # Open blocks that are not yet locally active\n            if block not in self._active_blocks:\n                # Set start_index to the current length\n                self._active_blocks[block] = len(self)\n                if block.opener is not None:\n                    opener = block.opener\n                    if isinstance(opener, str):\n                        opener = _parse_tags(opener)\n                    if isinstance(opener, Function):\n                        raise NotImplementedError(\"Stateful block opener/closer functions are not yet supported\")\n                    self = self._apply_node(opener)\n        return self\n\n    def _update_open_block_captures(self) -> Self:\n        # self = self.copy()\n        for block, start_index in self._active_blocks.items():\n            if block.name is not None:\n                self = self.set(block.name, str(self)[start_index:])\n        return self\n\n    def copy(self) -> Self:\n        obj = object.__new__(self.__class__)\n        obj.__dict__.update(self.__dict__)\n\n        obj._interpreter = deepcopy(self._interpreter)\n        obj._active_blocks = {**self._active_blocks}\n        obj._id = _gen_id()\n        obj._parent_id = self._id\n        obj._trace_nodes = set()\n        obj._parent = self\n        obj._update_trace_node(obj._id, obj._parent_id, None)\n        return obj\n\n    def __str__(self) -> str:\n        return str(self._interpreter.state)\n\n    def __len__(self):\n        return len(str(self))\n\n    def __setitem__(self, key, value):\n        raise Exception(\n            \"Model objects are immutable so you can't use __setitem__! Consider using the .set(key, value) method instead to create a new updated model object.\"\n        )\n\n    def __getitem__(self, key: str) -> Any:\n        try:\n            captures = self._interpreter.state.captures[key]\n        except KeyError as ke:\n            raise KeyError(f\"Model does not contain the variable '{key}'\") from ke\n        if isinstance(captures, list):\n            return [c[\"value\"] for c in captures]\n        else:\n            return captures[\"value\"]\n\n    def __contains__(self, key: str) -> bool:\n        return key in self._interpreter.state.captures\n\n    def get(self, key: str, default: D | None = None) -> str | list[str] | None | D:\n        \"\"\"Return the value of a variable, or a default value if the variable is not present.\n\n        Parameters\n        ----------\n        key : str\n            The name of the variable.\n        default : Any\n            The value to return if the variable is not current set.\n        \"\"\"\n        try:\n            return self[key]\n        except KeyError:\n            return default\n\n    def set(self, key: str, value: str | list[str]) -> Self:\n        \"\"\"Return a new model with the given variable value set.\n\n        Parameters\n        ----------\n        key : str\n            The name of the variable to be set.\n        value : str\n            The value to set the variable to.\n        \"\"\"\n        self = self.copy()\n        if isinstance(value, list):\n            self._interpreter.state.captures[key] = [{\"value\": v, \"log_prob\": None} for v in value]\n        else:\n            self._interpreter.state.captures[key] = {\"value\": value, \"log_prob\": None}\n        return self\n\n    def remove(self, key: str) -> Self:\n        \"\"\"Return a new model with the given variable deleted.\n\n        Parameters\n        ----------\n        key : str\n            The variable name to remove.\n        \"\"\"\n        self = self.copy()\n        self._interpreter.state.captures.pop(key)\n        return self\n\n    def log_prob(self, key: str, default: D | None = None) -> float | list[float | None] | None | D:\n        \"\"\"Return the log probability of a variable, or a default value if the variable is not present.\n\n        Parameters\n        ----------\n        key : str\n            The name of the variable.\n        default : Any\n            The value to return if the variable is not current set.\n        \"\"\"\n        try:\n            captures = self._interpreter.state.captures[key]\n        except KeyError:\n            return default\n        if isinstance(captures, list):\n            return [c[\"log_prob\"] for c in captures]\n        else:\n            return captures[\"log_prob\"]\n\n    def with_sampling_params(self, sampling_params: SamplingParams) -> Self:\n        \"\"\"Return a new model with the given sampling parameters set.\"\"\"\n        self = self.copy()\n        self.sampling_params = sampling_params\n        return self\n\n    def with_step_config(self, step_config: StepConfig) -> Self:\n        \"\"\"Return a new model with step interjection configured (engine-backed models only).\"\"\"\n        self = self.copy()\n        # Only EngineInterpreter has step_config; guard for other interpreter types\n        if hasattr(self._interpreter, \"step_config\"):\n            self._interpreter.step_config = step_config\n        else:\n            raise NotImplementedError(\"Step interjection is only supported for engine-backed models.\")\n        return self\n\n    def __getattribute__(self, name):\n        if name == \"engine\":\n            # For legacy model.engine access (mostly for tests...)\n            return self._interpreter.engine\n        return super().__getattribute__(name)\n\n    def _get_usage(self) -> TokenUsage:\n        \"\"\"Get the token usage for this model.\"\"\"\n        # TODO(hudson): make this public API once we stabilize the data structure\n        return self._interpreter.state.get_usage()\n\n    def _reset_usage(self) -> None:\n        self._interpreter.state.reset_usage()\n\n\nclass ModelStream:\n    def __init__(\n        self,\n        model: Model,\n        grammar: Union[\"ModelStream\", str, ASTNode, Function, None] = None,\n        timeout=5,\n    ) -> None:\n        \"\"\"Create a model stream object that delays execution until it is iterated over.\"\"\"\n        if model.echo:\n            model = model.copy()\n            model.echo = False  # turn off display echoing\n        self.model = model\n        self.grammar = grammar\n        self.timeout = timeout\n\n    def __add__(self, grammar: str | ASTNode) -> Self:\n        \"\"\"Extend this delayed chain of execution with another grammar append.\"\"\"\n        if self.grammar is None:\n            return ModelStream(self.model, grammar)\n        else:\n            return ModelStream(self.model, self.grammar + grammar)\n\n    def _inner_run(self, model):\n        \"\"\"This runs the model stream without iterating, and is only using internally by __iter__.\"\"\"\n        if isinstance(self.grammar, ModelStream):\n            model = self.grammar._inner_run(model)\n        elif self.grammar is None:\n            model = self.model + \"\"\n        else:\n            model = self.model + self.grammar\n\n    def __iter__(self) -> Iterator[Model]:\n        \"\"\"Starts a thread to execute the model and grammar, yielding events as they occur.\"\"\"\n\n        events = queue.Queue()\n        event_queues = _event_queues.get() + (events,)\n        token = _event_queues.set(event_queues)\n\n        # Define the target function for the thread\n        def target(ctx):\n            _event_queues.set(ctx[_event_queues])\n            try:\n                self._inner_run(self.model)\n                events.put(None)  # mark that we are done\n            except BaseException as ex:  # noqa: BLE001\n                events.put(ex)\n\n        # Start the thread\n        thread = threading.Thread(target=target, args=(copy_context(),))\n        thread.start()\n\n        # Yield events from the queue as they become available\n        while True:\n            try:\n                # Wait for an event with a timeout to allow for thread termination\n                event = events.get(timeout=self.timeout)\n                if event is None:\n                    break\n                elif isinstance(event, BaseException):\n                    raise event\n                yield event\n            except queue.Empty:\n                # Check if the thread is still alive\n                if not thread.is_alive():\n                    break\n\n        # Ensure the thread has completed\n        thread.join()\n\n        # Reset the event queues context variable\n        _event_queues.reset(token)\n"
  },
  {
    "path": "guidance/models/_base/_state.py",
    "content": "from abc import ABC, abstractmethod\nfrom typing import TypedDict\n\nfrom ..._schema import TokenUsage\nfrom ...metrics import emit_usage\nfrom ...trace import CaptureOutput\n\n\nclass CaptureVar(TypedDict):\n    value: str\n    log_prob: float | None\n\n\nclass State(ABC):\n    def __init__(self, token_usage: TokenUsage | None = None) -> None:\n        self.captures: dict[str, CaptureVar | list[CaptureVar]] = {}\n        self.active_role: str | None = None\n        self._token_usage: TokenUsage = token_usage or TokenUsage()\n\n    def add_usage(self, usage: TokenUsage) -> None:\n        \"\"\"Add token usage to the current state.\"\"\"\n        self._token_usage += usage\n        # TODO: need to do this conditionally? Or is this essentially zero-cost?\n        emit_usage(self._token_usage)\n\n    def get_usage(self) -> TokenUsage:\n        \"\"\"Get the current token usage.\"\"\"\n        return self._token_usage\n\n    def reset_usage(self) -> None:\n        \"\"\"Reset the current token usage.\"\"\"\n        self._token_usage = TokenUsage()\n\n    @abstractmethod\n    def __str__(self) -> str:\n        pass\n\n    def apply_capture(\n        self, name: str, value: str | None, log_prob: float | None, is_append: bool = False\n    ) -> CaptureOutput:\n        if value is None:\n            # A \"reset\" signal\n            self.captures.pop(name)\n        else:\n            var = CaptureVar(value=value, log_prob=log_prob)\n            if is_append:\n                vars = self.captures.get(name, [])\n                if not isinstance(vars, list):\n                    vars = [vars]\n                vars.append(var)\n                self.captures[name] = vars\n            else:\n                self.captures[name] = var\n\n        return CaptureOutput(\n            name=name,\n            value=value,\n            log_probs=log_prob or float(\"nan\"),\n            is_append=is_append,\n        )\n"
  },
  {
    "path": "guidance/models/_byte_tokenizer.py",
    "content": "import numpy as np\n\nfrom ._engine import Tokenizer\nfrom ._engine._tokenizer import TokenizerWrappable\n\n\nclass ByteTokenizer(Tokenizer):\n    def __init__(self, chat_template=None):\n        # directly map integer values to byte strings\n        all_bytes = [bytes([i]) for i in range(256)]\n        bos = b\"<s>\"\n        tokens = np.array(all_bytes + [bos], dtype=\"object\")\n        ll_tokenizer = TokenizerWrappable(\n            eos_token_id=256,\n            bos_token_id=256,\n            tokens=tokens,\n            special_token_ids=[],\n            # ENCODE MUST BE OVERRIDDEN\n            encode_callable=self.encode,\n        ).as_ll_tokenizer()\n\n        super().__init__(\n            ll_tokenizer=ll_tokenizer,\n            chat_template=chat_template,\n            bos_token_id=256,\n        )\n\n    def encode(self, byte_string: bytes, *, parse_special: bool = True) -> list[int]:\n        \"\"\"Returns a list of tokens that represent the given byte string.\"\"\"\n        if isinstance(byte_string, str):\n            byte_string = byte_string.encode(\"utf8\")\n        i = 0\n        result = []\n        while i < len(byte_string):\n            if parse_special and byte_string[i : i + 3] == b\"<s>\":\n                result.append(256)\n                i += 3  # Skip the next two characters as part of '<s>'\n            else:\n                result.append(byte_string[i])\n                i += 1\n        return result\n"
  },
  {
    "path": "guidance/models/_engine/__init__.py",
    "content": "from ._tokenizer import Tokenizer  # isort:skip\nfrom ._engine import Engine, LogitsOutput\nfrom ._interpreter import EngineInterpreter, Llama3VisionInterpreter, Phi3VisionInterpreter\nfrom ._state import EngineState\n\n__all__ = [\n    \"Engine\",\n    \"EngineInterpreter\",\n    \"EngineState\",\n    \"Llama3VisionInterpreter\",\n    \"LogitsOutput\",\n    \"Phi3VisionInterpreter\",\n    \"Tokenizer\",\n]\n"
  },
  {
    "path": "guidance/models/_engine/_engine.py",
    "content": "# TODO(nopdive): This module requires a memory review.\n\nimport logging\nimport time\nfrom abc import ABC, abstractmethod\nfrom typing import Any, Generator, TypedDict\n\nimport numpy as np\nfrom jinja2 import BaseLoader, Environment\nfrom numpy.typing import NDArray\n\nfrom ..._parser import TokenParser\nfrom ..._schema import (\n    EngineResponse,\n    GenToken,\n    GenTokenExtra,\n    SamplingParams,\n    StepConfig,\n    StepContext,\n    StepFeedback,\n    TokenUsage,\n)\nfrom ..._utils import apply_min_p_filter, apply_repetition_penalty, apply_top_k_and_top_p_filter, log_init, softmax\nfrom ._state import EngineState\nfrom ._tokenizer import Tokenizer\n\nlogger = logging.getLogger(__name__)\n\n_TEMPERATURE_EPSILON = 1e-5\n\n\nclass LogitsOutput(TypedDict):\n    logits: NDArray\n    n_tokens: int\n    n_cached: int\n\n\nclass Engine(ABC):\n    \"\"\"The engine owns the inference computation and is used/created by the Model class.\n\n    Engine objects represent the expensive parts of inference. While Model objects are cheap and do not\n    need to know about the tokenizer or the model parameters, Engine objects know about both. Many\n    Model objects can reference a single Engine object. Engine objects can also be hidden behind a\n    Server so a single server can serve many clients' model objects through a single Engine object.\n    \"\"\"\n\n    def __init__(\n        self,\n        tokenizer: Tokenizer,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        enable_token_probabilities=False,\n        enable_top_k=False,\n        top_k: int = 5,\n    ):\n        from ...registry import get_monitor\n\n        self.tokenizer = tokenizer\n        self._enable_backtrack = enable_backtrack\n        self._enable_ff_tokens = enable_ff_tokens\n        self._enable_monitoring = enable_monitoring\n        self._enable_token_probabilities = enable_token_probabilities\n        self._enable_top_k = enable_top_k\n        self._top_k = top_k\n\n        if enable_top_k and not enable_token_probabilities:\n            raise ValueError(\"enable_top_k requires enable_token_probabilities to be True.\")\n\n        if self._enable_monitoring:\n            # Idempotent start\n            _ = get_monitor()\n\n        log_init(f\"engine({id(self)})\")\n\n    # These need to be properties because once an Engine is started, you can't change their behavior.\n    @property\n    def enable_backtrack(self):\n        return self._enable_backtrack\n\n    @property\n    def enable_ff_tokens(self):\n        return self._enable_ff_tokens\n\n    @property\n    def enable_monitoring(self):\n        return self._enable_monitoring\n\n    def get_chat_template(\n        self,\n    ):  # TODO [HN]: Add more logic here...should we instantiate class here? do we even need to?\n        return self.tokenizer.chat_template()  # Instantiate the class before returning to client for now\n\n    def __call__(\n        self,\n        state: EngineState,\n        grammar: str,\n        ensure_bos_token: bool = True,\n        sampling_params: SamplingParams | None = None,\n        step_config: StepConfig | None = None,\n    ) -> Generator[EngineResponse, None, TokenUsage]:\n        \"\"\"Main entry point for the inference-parser loop. Yields EngineCallResponse objects as\n        the parser advances through the grammar.\n\n        Parameters\n        ----------\n        state: EngineState\n            The current state of the engine, including the prompt.\n        grammar: Function\n            Grammar (RawFunction or GrammarFunction) used to extend the prompt.\n        ensure_bos_token: bool\n            Ensures that the prompt ends with the BOS token.\n        sampling_params: Optional[SamplingParams]\n            Additional sampling parameters to apply to the logits.\n        \"\"\"\n        t0 = time.monotonic()\n\n        # TODO: Pass these to get_logits\n        # images = state.images\n        # audio = state.audio\n        # videos = state.videos\n\n        tokens = self.tokenizer.encode(state.prompt.encode(\"utf-8\"))\n\n        parser = TokenParser(\n            grammar,\n            tokenizer=self.tokenizer,\n            enable_backtrack=self.enable_backtrack,\n            enable_ff_tokens=self.enable_ff_tokens,\n        )\n\n        last_temperature = 1.0\n        issued_token: GenToken | None = None\n        usage = TokenUsage(round_trips=1, ff_tokens=0)\n\n        step_every_k: int | None = None\n        step_stop_strings: set[str] = set()\n        step_callback = None\n        if step_config is not None:\n            step_every_k = step_config.get(\"step_every_k\")  # type: ignore[assignment]\n            step_stop_strings = set(step_config.get(\"step_stop_tokens\", set()))  # type: ignore[assignment]\n            step_callback = step_config.get(\"callback\")  # type: ignore[assignment]\n            step_counter = 0\n\n        step_tokens_buffer: list[int] = []\n        all_generated_tokens: list[int] = []\n        all_text_bytes = bytearray()\n\n        while not parser.done():\n            t1 = time.monotonic()\n            recode = False\n            has_injection_backtrack = False  # Track if this response has injection backtrack\n\n            if issued_token is None:\n                prefix_tokens, backtrack, ff_tokens, mask_fut = parser.process_prompt(\n                    prompt_tokens=tokens,\n                    ensure_bos_token=ensure_bos_token,\n                )\n                if prefix_tokens:\n                    tokens = prefix_tokens + tokens\n                    recode = True\n            else:\n                backtrack, ff_tokens, mask_fut = parser.advance(token_id=issued_token.token_id)\n\n            if backtrack:\n                backtracked_bytes = self.tokenizer.decode(tokens[-backtrack:])\n                tokens = tokens[:-backtrack]\n            else:\n                backtracked_bytes = b\"\"\n            tokens += ff_tokens\n\n            if recode:\n                # Only necessary when we add a prefix (bos token), which can only happen once\n                # per loop. Needs to happen after adding ff_tokens to maintain associativity of\n                # (model + prompt) + grammar == model + (prompt + grammar)\n                tokens = self.tokenizer.recode(tokens)\n\n            if issued_token is not None:\n                if backtrack or ff_tokens[:1] != [issued_token.token_id]:\n                    issued_token.is_backtracked = True\n                else:\n                    # Remove the issued token from ff_tokens\n                    ff_tokens = ff_tokens[1:]\n                # Note: only need to update usage in this branch (issued_token is not None), as these ff_tokens\n                # will otherwise just be counted as \"input_tokens\" when we call get_logits below\n                usage.ff_tokens += len(ff_tokens)\n\n            t2 = time.monotonic()\n            parser_lat_ms = (t2 - t1) * 1000\n\n            if parser.has_pending_stop() and (\n                # There are no ff_tokens\n                not ff_tokens\n                # Monitoring is disabled\n                or not self._enable_token_probabilities\n            ):\n                # We can skip the logits computation because it would only be used to enrich\n                # the fast-forwarded tokens with probabilities for the sake of monitoring\n                logits = None\n            else:\n                logits_output = self.get_logits(\n                    token_ids=tokens, include_all_uncached_tokens=self._enable_token_probabilities\n                )\n                logits = logits_output[\"logits\"]\n                usage.input_tokens += logits_output[\"n_tokens\"]\n                usage.cached_input_tokens += logits_output[\"n_cached\"]\n                if logits_output[\"n_tokens\"] > logits_output[\"n_cached\"]:\n                    usage.forward_passes += 1\n                else:\n                    usage.cached_output_tokens += 1\n\n            t3 = time.monotonic()\n            logits_lat_ms = (t3 - t2) * 1000\n\n            # Important: don't wait on this future until after getting the logits;\n            # this allows the mask to be built concurrently with model inference\n            mask, ll_response, mask_compute_ms = mask_fut.result()\n            # Mask time is the time it took to advance the parser plus the total time spent computing mask\n            usage.mask_times_ms.append(parser_lat_ms + mask_compute_ms)\n            if usage.ttfm_ms == 0:\n                usage.ttfm_ms = (time.monotonic() - t0) * 1000\n            # Mask overhead time is the time it took to advance the parser plus the total time spent waiting\n            # on the mask future (i.e. time spent computing mask LESS the portion of that time parallelized with logits)\n            t4 = time.monotonic()\n            usage.mask_overheads_ms.append(parser_lat_ms + (t4 - t3) * 1000)\n\n            legacy_engine_response = ll_response.progress.to_engine_call_response()\n\n            ff_probs: NDArray | None = None\n            if logits is not None and self._enable_token_probabilities:\n                # Exclude the \"next token\" logits\n                # Note: may not have logits for all ff tokens if some prefix of them hit cache\n                # Note: may have some extra here if something caused us to miss cache\n                ff_logits = logits[-len(ff_tokens) - 1 : -1, :]\n                # Avoid mutation of the original logits\n                ff_logits = ff_logits.copy()\n\n                if ff_logits.shape[0] > 0:\n                    ff_logits_list: list[NDArray] = []\n                    for i in range(ff_logits.shape[0]):\n                        ff_logits_list.append(\n                            apply_temp_and_sampling_params(\n                                ff_logits[i, :],\n                                tokens[: len(tokens) - ff_logits.shape[0] + i],\n                                last_temperature,\n                                sampling_params,\n                            )\n                        )\n                    ff_logits = np.stack(ff_logits_list, axis=0)\n                    ff_probs = softmax(ff_logits)\n\n            # Note: ff_lat_ms includes parser_lat_ms (t2 - t1)\n            ff_lat_ms = (time.monotonic() - t1) * 1000\n            if not ll_response.stop:\n                # If we're not stopping, the logit latency will go into the next generated token\n                ff_lat_ms -= logits_lat_ms\n\n            gen_tokens: list[GenTokenExtra] = []\n            if issued_token is not None:\n                gen_tokens.append(issued_token)\n\n            for i, token_id in enumerate(ff_tokens):\n                prob = float(\"nan\")\n                top_k: list[GenToken] = []\n                if ff_probs is not None:\n                    prob_ix = i + (ff_probs.shape[0] - len(ff_tokens))\n                    if prob_ix >= 0:\n                        prob = float(ff_probs[prob_ix, token_id])\n                        top_k_ixs = get_top_k(ff_probs[prob_ix], self._top_k if self._enable_top_k else 0)\n                        if token_id not in top_k_ixs:\n                            top_k_ixs.append(token_id)\n                        for top_k_token_id in top_k_ixs:\n                            top_k.append(\n                                GenToken(\n                                    token_id=top_k_token_id,\n                                    prob=float(ff_probs[prob_ix, top_k_token_id]),\n                                    bytes=self.tokenizer.decode([top_k_token_id]),\n                                    latency_ms=ff_lat_ms / len(ff_tokens),\n                                    is_input=issued_token is None,\n                                    is_force_forwarded=issued_token is not None,\n                                    is_masked=top_k_token_id != token_id,\n                                )\n                            )\n                gen_tokens.append(\n                    GenTokenExtra(\n                        token_id=token_id,\n                        bytes=self.tokenizer.decode([token_id]),\n                        prob=prob,\n                        latency_ms=ff_lat_ms / len(ff_tokens),\n                        is_input=issued_token is None,\n                        is_force_forwarded=issued_token is not None,\n                        is_masked=False,\n                        top_k=top_k,\n                    )\n                )\n\n            new_bytes_acc = bytearray(legacy_engine_response.new_bytes)\n            captures_acc = dict(legacy_engine_response.capture_groups)\n            cap_log_probs_acc = dict(legacy_engine_response.capture_group_log_probs)\n\n            new_token_ids_this_iter = [t.token_id for t in gen_tokens]\n            step_tokens_buffer.extend(new_token_ids_this_iter)\n            all_generated_tokens.extend(new_token_ids_this_iter)\n            all_text_bytes += legacy_engine_response.new_bytes\n\n            boundary_hit = False\n            boundary_type = None  # Track whether it's \"every_k\" or \"stop_string\"\n            matched_stop_string = None\n            if new_token_ids_this_iter:\n                if step_every_k is not None and step_every_k > 0:\n                    if len(step_tokens_buffer) >= step_every_k:\n                        boundary_hit = True\n                        boundary_type = \"every_k\"\n                if step_stop_strings and not boundary_hit:\n                    # Check if the accumulated text ends with any stop string\n                    accumulated_text = bytes(all_text_bytes).decode(\"utf-8\", errors=\"ignore\")\n                    for stop_string in step_stop_strings:\n                        if accumulated_text.endswith(stop_string):\n                            boundary_hit = True\n                            boundary_type = \"stop_string\"\n                            matched_stop_string = stop_string\n                            break\n\n            if boundary_hit and step_callback is not None:\n                ctx: StepContext = {\n                    \"last_step_text\": self.tokenizer.decode(step_tokens_buffer).decode(\"utf-8\", errors=\"ignore\"),\n                    \"last_step_tokens\": list(step_tokens_buffer),\n                    \"all_text\": bytes(all_text_bytes).decode(\"utf-8\", errors=\"ignore\"),\n                    \"all_tokens\": list(all_generated_tokens),\n                    \"captures\": dict(captures_acc),\n                    \"step_counter\": step_counter,\n                }\n                feedback: StepFeedback | None = step_callback(ctx)  # type: ignore[misc]\n                step_counter = ctx[\"step_counter\"]\n                if feedback:\n                    inj_bytes: bytes | None = None\n                    if \"injected_bytes\" in feedback and feedback[\"injected_bytes\"]:\n                        inj_bytes = feedback[\"injected_bytes\"]\n                    elif \"injected_text\" in feedback and feedback[\"injected_text\"]:\n                        inj_bytes = feedback[\"injected_text\"].encode(\"utf-8\")\n                    if inj_bytes:\n                        # Only rollback for stop_string case\n                        backtrack_token_ids = []\n                        if boundary_type == \"stop_string\" and matched_stop_string:\n                            # Calculate how many tokens to backtrack based on the matched stop string\n                            # We need to find which recent tokens form the stop string\n                            stop_string_bytes = matched_stop_string.encode(\"utf-8\")\n\n                            # Search backwards through recent tokens to find which ones form the stop string\n                            accumulated_bytes = b\"\"\n                            for i in range(len(all_generated_tokens) - 1, -1, -1):\n                                token_id = all_generated_tokens[i]\n                                token_bytes = self.tokenizer.decode([token_id])\n                                accumulated_bytes = token_bytes + accumulated_bytes\n                                backtrack_token_ids.insert(0, token_id)\n\n                                # Check if we've accumulated enough to match the stop string\n                                accumulated_text = accumulated_bytes.decode(\"utf-8\", errors=\"ignore\")\n                                if stop_string_bytes.decode(\"utf-8\", errors=\"ignore\") in accumulated_text:\n                                    # We've found all tokens that contribute to the stop string\n                                    break\n\n                                # Safety: don't go back more than 20 tokens\n                                if len(backtrack_token_ids) >= 20:\n                                    break\n\n                            backtrack_bytes_to_remove = (\n                                self.tokenizer.decode(backtrack_token_ids) if backtrack_token_ids else b\"\"\n                            )\n\n                            # Remove the tokens from model context\n                            if len(tokens) >= len(backtrack_token_ids):\n                                tokens = tokens[: -len(backtrack_token_ids)]\n\n                            # Determine which backtrack tokens are in the current response vs previous\n                            # Tokens in current response are in new_bytes_acc and gen_tokens\n                            current_response_token_count = 0\n                            temp_bytes = bytes(new_bytes_acc)\n                            for i in range(len(backtrack_token_ids) - 1, -1, -1):\n                                token_bytes = self.tokenizer.decode([backtrack_token_ids[i]])\n                                if temp_bytes.endswith(token_bytes):\n                                    current_response_token_count += 1\n                                    temp_bytes = temp_bytes[: -len(token_bytes)]\n                                else:\n                                    break\n\n                            previous_response_token_count = len(backtrack_token_ids) - current_response_token_count\n\n                            # Remove tokens from current response\n                            if current_response_token_count > 0:\n                                # Remove from new_bytes_acc\n                                for i in range(\n                                    len(backtrack_token_ids) - 1,\n                                    len(backtrack_token_ids) - 1 - current_response_token_count,\n                                    -1,\n                                ):\n                                    token_bytes = self.tokenizer.decode([backtrack_token_ids[i]])\n                                    if new_bytes_acc.endswith(token_bytes):\n                                        new_bytes_acc = new_bytes_acc[: -len(token_bytes)]\n                                # Remove from gen_tokens\n                                if len(gen_tokens) >= current_response_token_count:\n                                    gen_tokens = gen_tokens[:-current_response_token_count]\n\n                            # Backtrack bytes are only from previous responses\n                            backtrack_bytes_from_previous = (\n                                self.tokenizer.decode(backtrack_token_ids[:previous_response_token_count])\n                                if previous_response_token_count > 0\n                                else b\"\"\n                            )\n\n                            # Remove from tracking buffers (for future context)\n                            if len(step_tokens_buffer) >= len(backtrack_token_ids):\n                                step_tokens_buffer = step_tokens_buffer[: -len(backtrack_token_ids)]\n                            if len(all_generated_tokens) >= len(backtrack_token_ids):\n                                all_generated_tokens = all_generated_tokens[: -len(backtrack_token_ids)]\n                            if backtrack_bytes_to_remove and all_text_bytes.endswith(backtrack_bytes_to_remove):\n                                all_text_bytes = all_text_bytes[: -len(backtrack_bytes_to_remove)]\n\n                            # Add injection backtrack to any existing parser backtrack\n                            # For injection: only backtrack what's in previous responses\n                            backtracked_bytes = backtrack_bytes_from_previous + backtracked_bytes\n                            backtrack = previous_response_token_count + backtrack\n                            backtracked_bytes = backtrack_bytes_from_previous + backtracked_bytes\n                            backtrack = previous_response_token_count + backtrack\n\n                            # Set flag to indicate this is an injection backtrack\n                            has_injection_backtrack = True\n\n                        # Inject tokens (applies to both every_k and stop_string cases)\n                        inj_token_ids = self.tokenizer.encode(inj_bytes)\n                        for inj_token_id in inj_token_ids:\n                            backtrack2, ff_tokens2, mask_fut2 = parser.advance(token_id=inj_token_id)\n                            if backtrack2:\n                                tokens[:] = tokens[:-backtrack2]\n                            # Add the injected token to the model's context\n                            tokens.append(inj_token_id)\n                            tokens += ff_tokens2\n                            mask2, ll_response2, _ = mask_fut2.result()\n                            legacy2 = ll_response2.progress.to_engine_call_response()\n                            # DON'T add injected tokens to current response - they'll appear in next iteration\n                            for k, v in legacy2.capture_groups.items():\n                                captures_acc[k] = v\n                            for k, v in legacy2.capture_group_log_probs.items():\n                                cap_log_probs_acc[k] = v\n\n                            usage.ff_tokens += len(ff_tokens2)\n                            step_tokens_buffer.append(inj_token_id)\n                            step_tokens_buffer.extend(ff_tokens2)\n                            all_generated_tokens.append(inj_token_id)\n                            all_generated_tokens.extend(ff_tokens2)\n                            all_text_bytes += legacy2.new_bytes\n\n                        # Add injected tokens to the CURRENT response\n                        inj_bytes_acc = bytearray()\n                        for inj_token_id in inj_token_ids:\n                            gen_tokens.append(\n                                GenTokenExtra(\n                                    token_id=inj_token_id,\n                                    bytes=self.tokenizer.decode([inj_token_id]),\n                                    prob=float(\"nan\"),\n                                    latency_ms=0.0,\n                                    is_generated=False,\n                                    is_force_forwarded=True,\n                                    is_input=False,\n                                    is_backtracked=False,\n                                    is_masked=False,\n                                    top_k=[],\n                                )\n                            )\n                            inj_bytes_acc += self.tokenizer.decode([inj_token_id])\n\n                        new_bytes_acc += inj_bytes_acc\n\n                        # Set flag to indicate this is an injection backtrack\n                        if boundary_type == \"stop_string\" and matched_stop_string:\n                            has_injection_backtrack = True\n\n                step_tokens_buffer = []\n\n            engine_response = EngineResponse(\n                new_bytes=bytes(new_bytes_acc),\n                backtrack_bytes=backtracked_bytes,\n                capture_groups=captures_acc,\n                capture_group_log_probs=cap_log_probs_acc,\n                backtrack=backtrack,\n                tokens=gen_tokens,\n                injection_backtrack=has_injection_backtrack,\n            )\n\n            yield engine_response\n\n            if ll_response.stop:\n                assert mask is None\n                # May raise an exception if the parser is in an bad state!\n                parser.cleanup()\n                # Ensure we break AFTER yielding the final response\n                break\n\n            # Help the type checker: assert that everything we need to get the next token is not None\n            assert logits is not None\n            assert mask is not None\n            assert ll_response.temperature is not None\n\n            can_finish_early = parser.is_accepting() and self.tokenizer.eos_token_id is not None\n\n            if can_finish_early:\n                # Type checker needs some help\n                assert self.tokenizer.eos_token_id is not None\n                # Should be equivalent to parser.is_accepting()\n                assert mask[self.tokenizer.eos_token_id]\n                # Whenever we are in an accepting state, we will allow the model to generate whatever it wants\n                # but we will treat any \"illegal\" tokens as EOS, allowing the model to finish gracefully.\n                # Hence, mask must be None\n                mask_for_sampling = None\n            else:\n                mask_for_sampling = mask\n\n            issued_token = self.get_next_token_with_top_k(\n                logits=logits[-1, :],\n                logits_lat_ms=logits_lat_ms,\n                token_ids=tokens,\n                mask=mask_for_sampling,\n                temperature=ll_response.temperature,\n                k=self._top_k if self._enable_top_k else 0,\n                compute_unmasked_probs=self._enable_token_probabilities,\n                sampling_params=sampling_params,\n            )\n            last_temperature = ll_response.temperature\n\n            if can_finish_early and not mask[issued_token.token_id]:\n                # Type checker needs some help\n                assert self.tokenizer.eos_token_id is not None\n                issued_token.token_id = self.tokenizer.eos_token_id\n                issued_token.bytes = self.tokenizer.decode([self.tokenizer.eos_token_id])\n\n            if usage.ttft_ms == 0:\n                usage.ttft_ms += (time.monotonic() - t0) * 1000\n\n        usage.total_latency_ms += (time.monotonic() - t0) * 1000\n        return usage\n\n    def get_next_token_with_top_k(\n        self,\n        logits: NDArray,\n        logits_lat_ms: float,\n        token_ids: list[int],\n        mask: bytes | None,\n        temperature: float,\n        k: int,\n        compute_unmasked_probs: bool,\n        sampling_params: SamplingParams | None,\n    ) -> GenTokenExtra:\n        \"\"\"Get the next token and associated top-k tokens from the engine.\n\n        Parameters\n        -------\n        logits : Optional[NDArray]\n            The logits for the current token ids in the sequence.\n            If None, the model will call get_logits to get the logits.\n        logits_lat_ms: Optional[float]\n            The time taken to compute the logits.\n            If logits is None, the model will call get_logits to measure the time.\n        token_ids : list[int]\n            The current token ids in the sequence.\n        mask : Optional[bytes]\n            The mask to apply to the logits.\n        temperature : float\n            The temperature to apply to the logits.\n        k : int\n            The number of top-k tokens to return.\n        force_return_unmasked_probs: bool\n            If True, the top-k unmasked probabilities will be returned.\n        sampling_params : Optional[SamplingParams]\n            Additional sampling parameters to apply to the logits.\n\n        Returns\n        -------\n        EngineOutput\n            The output from the model.\n        \"\"\"\n        t0 = time.monotonic()\n\n        if k > 0 and not compute_unmasked_probs:\n            raise ValueError(\"If k > 0, compute_unmasked_probs must be True to get the top-k tokens.\")\n\n        probs: NDArray | None = None\n        top_k: list[int] = []\n        if compute_unmasked_probs or mask is None:\n            # NOTE: we clone logits here to avoid modifying the original logits twice\n            filtered_logits = apply_temp_and_sampling_params(\n                np.array(logits, copy=True), token_ids, temperature, sampling_params\n            )\n            probs = softmax(filtered_logits)\n            # Get the top-k tokens from the unmasked logits\n            top_k = get_top_k(probs, k)\n\n        masked_probs: NDArray | None = None\n        if mask is not None:\n            np_mask = np.frombuffer(mask, dtype=np.uint8)\n            masked_logits = np.where(np_mask != 0, logits, -np.inf)\n            # TODO: if temp is 0, we only need to apply the params that affect argmax, e.g. repetition penalty\n            filtered_masked_logits = apply_temp_and_sampling_params(\n                masked_logits, token_ids, temperature, sampling_params\n            )\n            masked_probs = softmax(filtered_masked_logits)\n\n        if temperature < _TEMPERATURE_EPSILON:\n            # Greedy sampling\n            if mask is None:\n                assert probs is not None, \"Probs should not be None when mask is None\"\n                if len(top_k) == 0:\n                    issued_token = np.argmax(probs)\n                else:\n                    # If we have top_k, we can just return the first one\n                    issued_token = top_k[0]\n            else:\n                assert masked_probs is not None, \"Masked probabilities should not be None when mask is provided\"\n                issued_token = np.argmax(masked_probs)\n        else:\n            # We need to sample from the probabilities\n            if mask is None:\n                assert probs is not None, \"Probs should not be None when mask is None\"\n                issued_token = np.random.choice(len(probs), p=probs)\n            else:\n                assert masked_probs is not None, \"Masked probabilities should not be None when mask is provided\"\n                issued_token = np.random.choice(len(masked_probs), p=masked_probs)\n\n        if issued_token not in top_k:\n            # This ensures that the issued token is always included in the top-k tokens\n            # Note: needs to be added to the end in order to maintain sorted order\n            top_k.append(issued_token)\n\n        issued_token_bytes = self.tokenizer.decode([issued_token])\n        top_k_token_bytes = [self.tokenizer.decode([token_id]) for token_id in top_k]\n\n        sampling_lat_ms = (time.monotonic() - t0) * 1000\n\n        top_k_tokens = [\n            GenToken(\n                token_id=token_id,\n                prob=float(\"nan\") if probs is None else float(probs[token_id]),\n                bytes=token_bytes,\n                latency_ms=logits_lat_ms + sampling_lat_ms,\n                is_generated=True,\n                is_masked=mask is not None and bool(mask[token_id] == 0),\n            )\n            for token_id, token_bytes in zip(top_k, top_k_token_bytes, strict=True)\n        ]\n\n        return GenTokenExtra(\n            token_id=issued_token,\n            prob=float(\"nan\") if probs is None else float(probs[issued_token]),\n            bytes=issued_token_bytes,\n            latency_ms=logits_lat_ms + sampling_lat_ms,\n            is_generated=True,\n            top_k=top_k_tokens,\n        )\n\n    def chat_completion_streaming(\n        self, messages: dict[str, str], grammar: str, tools: list[dict[str, Any]] | None = None\n    ) -> Generator[tuple[bytes, dict[str, str]], None, None]:\n        \"\"\"Generate a single streaming chat completion, constrained by a Lark grammar.\n\n        This function provides low level access to Guidance, similar to calling an Azure OpenAI endpoint\n        with a Lark grammar.\n        It is very much experimental in nature, and the API is subject to change.\n        \"\"\"\n        # Get the tokens which might be needed by the chat template\n        tokens = {\n            \"eos_token\": self.tokenizer.eos_token.decode(\"utf-8\"),\n            \"bos_token\": self.tokenizer.bos_token.decode(\"utf-8\"),\n        }\n\n        # Render the messages\n        chat_template = self.get_chat_template().template_str\n        rtemplate = Environment(loader=BaseLoader).from_string(chat_template)\n        rendered_prompt = rtemplate.render(add_generation_prompt=True, messages=messages, tools=tools, **tokens)\n\n        # Load into a State object\n        state = EngineState()\n        state.prompt = rendered_prompt\n\n        for nxt in self(state, grammar):\n            nxt_tokens = [x.token_id for x in nxt.tokens]\n            nxt_bytes = self.tokenizer.decode(nxt_tokens)\n            nxt_captures = {}\n            for k, v in nxt.capture_groups.items():\n                nxt_captures[k] = v.decode(\"utf-8\")\n            yield nxt_bytes, nxt_captures\n\n    def chat_completion(\n        self, messages: dict[str, str], grammar: str, tools: list[dict[str, Any]] | None = None\n    ) -> tuple[str, dict[str, str]]:\n        \"\"\"Generate a single chat completion, constrained by a Lark grammar.\n\n        This function provides low level access to Guidance, similar to calling an Azure OpenAI endpoint\n        with a Lark grammar.\n        It is very much experimental in nature, and the API is subject to change.\n        \"\"\"\n\n        full_response = bytearray()\n        captures: dict[str, str] = {}\n        for nxt_bytes, nxt_captures in self.chat_completion_streaming(messages, grammar, tools):\n            full_response += nxt_bytes\n            captures.update(nxt_captures)\n\n        return full_response.decode(\"utf-8\"), captures\n\n    @abstractmethod\n    def get_logits(self, token_ids: list[int], include_all_uncached_tokens: bool = False) -> LogitsOutput:\n        \"\"\"\n        Get the logits for the given token ids.\n        If include_all_uncached_tokens is True:\n            logits for all uncached tokens will be returned, i.e.\n            the return value's shape will be `(len(tokens)-num_cached, vocab_size)`.\n        If include_all_uncached_tokens is False:\n            logits for the last token will be returned, i.e.\n            the return value's shape will be `(1, vocab_size)`.\n        \"\"\"\n        pass\n\n\ndef get_top_k(_probs: NDArray, _k: int = 5) -> list[int]:\n    if _k <= 0:\n        return []\n    top_k_indices = _probs.argpartition(-_k)[-_k:].tolist()\n    # Sort by probability in descending order, as above argpartition\n    # does not guarantee order. Sorting the smaller array is faster.\n    return sorted(top_k_indices, key=lambda idx: _probs[idx], reverse=True)\n\n\ndef apply_temp_and_sampling_params(\n    logits: NDArray,\n    token_ids: list[int],\n    temperature: float,\n    sampling_params: SamplingParams | None,\n) -> NDArray:\n    \"\"\"Apply the sampling parameters to the logits.\"\"\"\n    if sampling_params is None:\n        return logits\n    logits = apply_repetition_penalty(token_ids, logits, sampling_params)\n    if temperature >= _TEMPERATURE_EPSILON:\n        # https://github.com/vllm-project/vllm/blob/e17a4d3bf9cffe32ec308a5979790732818e4919/vllm/sampling_params.py#L355\n        # follow vllm sampling strategy for low sampling temperature\n        logits = logits / temperature\n        logits = apply_min_p_filter(logits, sampling_params)\n        logits = apply_top_k_and_top_p_filter(logits, sampling_params)\n    return logits\n"
  },
  {
    "path": "guidance/models/_engine/_interpreter.py",
    "content": "import re\nfrom base64 import b64decode, b64encode\nfrom copy import deepcopy\nfrom io import BytesIO\nfrom typing import Iterator\n\nfrom ..._ast import GrammarNode, ImageBlob, JoinNode, LiteralNode, RoleEnd, RoleStart, SpecialToken, ToolCallNode\nfrom ..._schema import GenTokenExtra, StepConfig, TokenUsage\nfrom ..._utils import to_utf8_or_bytes_string\nfrom ...trace import Backtrack, ImageOutput, OutputAttr, Token, TokenOutput\nfrom .._base import Interpreter\nfrom ._engine import Engine, Tokenizer\nfrom ._state import EngineState\n\n\nclass EngineInterpreter(Interpreter[EngineState]):\n    def __init__(self, engine: Engine):\n        super().__init__(state=EngineState())\n        self.engine = engine\n        self.chat_template = self.engine.get_chat_template()\n        self.step_config: StepConfig | None = None\n\n    def __deepcopy__(self, memo):\n        \"\"\"Custom deepcopy to ensure engine is not copied.\"\"\"\n        cls = self.__class__\n        result = cls.__new__(cls)\n        memo[id(self)] = result\n        for k, v in self.__dict__.items():\n            if k == \"engine\":\n                # Don't copy the engine\n                setattr(result, k, v)\n            else:\n                setattr(result, k, deepcopy(v, memo))\n        return result\n\n    def get_role_start(self, role: str) -> str:\n        if self.chat_template is None:\n            raise ValueError(\"Cannot use roles without a chat template\")\n        return self.chat_template.get_role_start(role)\n\n    def get_role_end(self, role: str) -> str:\n        if self.chat_template is None:\n            raise ValueError(\"Cannot use roles without a chat template\")\n        return self.chat_template.get_role_end(role)\n\n    def role_start(self, node: RoleStart, **kwargs) -> Iterator[OutputAttr]:\n        self.state.active_role = node.role\n        text = self.get_role_start(node.role)\n        # TODO: it's probably somewhat wasteful to trigger engine calls here,\n        # so we can maybe add this as \"pending text\" to the state instead,\n        # accumulating it until the next engine call..?\n        yield from self.run(text_to_grammar(self.engine.tokenizer, text))\n\n    def role_end(self, node: RoleEnd, **kwargs) -> Iterator[OutputAttr]:\n        self.state.active_role = None\n        text = self.get_role_end(node.role)\n        # TODO: it's probably somewhat wasteful to trigger engine calls here,\n        # so we can maybe add this as \"pending text\" to the state instead,\n        # accumulating it until the next engine call..?\n        yield from self.run(text_to_grammar(self.engine.tokenizer, text))\n\n    def text(self, node: LiteralNode, **kwargs) -> Iterator[OutputAttr]:\n        yield from self.grammar(node, **kwargs)\n\n    def grammar(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        engine_gen = self.engine(\n            state=self.state,\n            grammar=node.ll_grammar(),\n            ensure_bos_token=True,\n            sampling_params=kwargs.pop(\"sampling_params\", None),\n            step_config=self.step_config,\n        )\n\n        delayed_bytes = b\"\"\n        while True:\n            try:\n                chunk = next(engine_gen)\n            except StopIteration as e:\n                if not isinstance(e.value, TokenUsage):\n                    raise e\n                self.state.add_usage(e.value)\n                break\n\n            new_bytes = recode_special_tokens(self.engine.tokenizer, chunk.new_bytes)\n            new_text, delayed_bytes = partial_decode(delayed_bytes + new_bytes)\n\n            # Check if this is an injection backtrack (should happen before adding text)\n            if chunk.injection_backtrack and chunk.backtrack:\n                # Remove backtracked text from the prompt BEFORE adding new text\n                backtrack_text = chunk.backtrack_bytes.decode(\"utf-8\", errors=\"ignore\")\n                if self.state.prompt.endswith(backtrack_text):\n                    self.state.prompt = self.state.prompt[: -len(backtrack_text)]\n                yield Backtrack(\n                    n_tokens=chunk.backtrack,\n                    bytes=b64encode(chunk.backtrack_bytes),\n                )\n                # Now add new text after backtrack\n                self.state.prompt += new_text\n            else:\n                # Normal flow: add text first, then backtrack\n                self.state.prompt += new_text\n\n                if chunk.backtrack:\n                    yield Backtrack(\n                        n_tokens=chunk.backtrack,\n                        bytes=b64encode(chunk.backtrack_bytes),\n                    )\n\n            for token in chunk.tokens:\n                if isinstance(token, GenTokenExtra):\n                    top_k = [\n                        Token(\n                            token=to_utf8_or_bytes_string(t.bytes),\n                            bytes=b64encode(t.bytes),\n                            prob=t.prob,\n                            masked=t.is_masked,\n                        )\n                        for t in token.top_k\n                    ]\n                else:\n                    top_k = None\n\n                token_value = to_utf8_or_bytes_string(token.bytes)\n                yield TokenOutput(\n                    value=token_value,\n                    token=Token(token=token_value, bytes=b64encode(token.bytes), prob=token.prob),\n                    latency_ms=token.latency_ms,\n                    is_input=token.is_input,\n                    is_generated=token.is_generated,\n                    is_force_forwarded=token.is_force_forwarded,\n                    top_k=top_k,\n                )\n                if token.is_backtracked:\n                    yield Backtrack(\n                        n_tokens=1,\n                        bytes=b64encode(token.bytes),\n                    )\n\n            for name in chunk.capture_groups.keys():\n                values = chunk.capture_groups[name]\n                log_probs = chunk.capture_group_log_probs[name]\n                if isinstance(values, list):\n                    assert isinstance(log_probs, list)\n                    assert len(values) == len(log_probs)\n                    for value, log_prob in zip(values, log_probs, strict=True):\n                        yield self.state.apply_capture(name, value.decode(\"utf-8\"), log_prob=log_prob, is_append=True)\n                else:\n                    assert isinstance(log_probs, float)\n                    yield self.state.apply_capture(name, values.decode(\"utf-8\"), log_prob=log_probs, is_append=False)\n\n        if delayed_bytes:\n            raise RuntimeError(\"Shouldn't have any delayed bytes left...\")\n\n    def tool_call(self, node: ToolCallNode, **kwargs) -> Iterator[OutputAttr]:\n        raise NotImplementedError(\"Tool calling is (temporarily) not supported with local models.\")\n\n\nclass Llama3VisionInterpreter(EngineInterpreter):\n    def image_blob(self, node: ImageBlob, **kwargs) -> Iterator[OutputAttr]:\n        try:\n            import PIL.Image\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the Pillow package `pip install Pillow` in order to use images with Llama3!\"\n            ) from ie\n\n        image_bytes = b64decode(node.data)\n        pil_image = PIL.Image.open(BytesIO(image_bytes))\n        self.state.images.append(pil_image)\n        self.state.prompt += \"<|image|>\"\n\n        yield ImageOutput(value=node.data, is_input=True)\n\n\nclass Phi3VisionInterpreter(EngineInterpreter):\n    def image_blob(self, node: ImageBlob, **kwargs) -> Iterator[OutputAttr]:\n        try:\n            import PIL.Image\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the Pillow package `pip install Pillow` in order to use images with Llama3!\"\n            ) from ie\n\n        image_bytes = b64decode(node.data)\n        pil_image = PIL.Image.open(BytesIO(image_bytes))\n\n        if pil_image in self.state.images:\n            ix = self.state.images.index(pil_image) + 1\n        else:\n            self.state.images.append(pil_image)\n            ix = len(self.state.images)\n        self.state.prompt += f\"<|image_{ix}|>\"\n\n        yield ImageOutput(value=node.data, is_input=True)\n\n\ndef partial_decode(data: bytes) -> tuple[str, bytes]:\n    try:\n        return (data.decode(\"utf-8\"), b\"\")\n    except UnicodeDecodeError as e:\n        valid_part = data[: e.start].decode(\"utf-8\")\n        delayed_part = data[e.start :]\n    return (valid_part, delayed_part)\n\n\nLLG_SPECIAL_TOKEN_PAT = re.compile(rb\"\\xff\\[([0-9]+)\\]\")\n\n\ndef recode_special_tokens(tokenizer: Tokenizer, data: bytes) -> bytes:\n    \"\"\"Recode a byte string with special tokens in llguidance format to their actual byte representation.\"\"\"\n    return LLG_SPECIAL_TOKEN_PAT.sub(lambda m: tokenizer.decode([int(m.group(1).decode(\"utf-8\"))]), data)\n\n\ndef text_to_grammar(tokenizer: Tokenizer, text: str) -> GrammarNode:\n    \"\"\"\n    Convert a text string into a GrammarNode that can be used in the grammar.\n    This is useful for converting static text into a grammar node that can be processed by the engine.\n    \"\"\"\n    grammar_bits: list[GrammarNode] = []\n    delayed_bytes = b\"\"\n    for token_id in tokenizer.encode(text.encode(\"utf-8\"), parse_special=True):\n        if tokenizer.is_special_token(token_id):\n            assert not delayed_bytes, \"Should not have any delayed bytes when encountering a special token\"\n            grammar_bits.append(SpecialToken(id=token_id))\n        else:\n            new_bytes = tokenizer.decode([token_id])\n            new_text, delayed_bytes = partial_decode(delayed_bytes + new_bytes)\n            if new_text:\n                grammar_bits.append(LiteralNode(new_text))\n    assert not delayed_bytes, \"Should not have any delayed bytes left after processing the text\"\n    if len(grammar_bits) == 1:\n        return grammar_bits[0]\n    return JoinNode(tuple(grammar_bits))\n"
  },
  {
    "path": "guidance/models/_engine/_state.py",
    "content": "from typing import Any\n\nfrom ..._schema import TokenUsage\nfrom .._base import State\n\n\nclass EngineState(State):\n    def __init__(self) -> None:\n        # Initialize with zero token usage rather than default None\n        # since engine can fast-forward tokens\n        super().__init__(token_usage=TokenUsage(ff_tokens=0))\n        self.prompt: str = \"\"\n        self.images: list[Any] = []\n        self.audio: list[Any] = []\n        self.videos: list[Any] = []\n\n    def __str__(self) -> str:\n        return self.prompt\n"
  },
  {
    "path": "guidance/models/_engine/_tokenizer.py",
    "content": "from dataclasses import dataclass\nfrom functools import cached_property\nfrom typing import Any, Callable, Sequence\n\nimport llguidance\n\nfrom ...chat import ChatTemplate, load_template_class\n\n\n@dataclass\nclass TokenizerWrappable:\n    eos_token_id: int\n    bos_token_id: int | None\n    tokens: list[bytes]\n    special_token_ids: list[int]\n    encode_callable: Callable[[bytes], list[int]]\n\n    def __call__(self, byte_string: bytes) -> list[int]:\n        return self.encode_callable(byte_string)\n\n    def as_ll_tokenizer(self) -> \"llguidance.LLTokenizer\":\n        \"\"\"Returns an LLTokenizer that can be used by llguidance.\"\"\"\n        return llguidance.LLTokenizer(llguidance.TokenizerWrapper(self))\n\n\nclass Tokenizer:\n    \"\"\"This is the standardized tokenizer interface used by guidance models.\n\n    This class should be subclassed by specific implementations and then used as the\n    tokenizer in the corresponding Engine subclass.\n    \"\"\"\n\n    def __init__(\n        self,\n        ll_tokenizer: llguidance.LLTokenizer,\n        chat_template: str | ChatTemplate | None,\n        bos_token_id: int | None = None,\n    ):\n        self._ll_tokenizer = ll_tokenizer\n        # This method supports None, a huggingface style jinja2_template_str, or a ChatTemplate subclass\n        # Defaults to ChatML if nothing is found\n        self._chat_template = load_template_class(chat_template)\n        self._bos_token_id = bos_token_id\n\n    def is_special_token(self, token_id: int) -> bool:\n        \"\"\"Returns True if the given token ID is a special token.\"\"\"\n        return self._ll_tokenizer.is_special_token(token_id)\n\n    @property\n    def bos_token_id(self) -> int | None:\n        # Currently, lltokenizer does not have a bos_token attribute,\n        # so we have to store our own if we want to use it\n        return self._bos_token_id\n\n    @property\n    def eos_token_id(self) -> int:\n        return self._ll_tokenizer.eos_token\n\n    @cached_property\n    def bos_token(self) -> bytes | None:\n        if self.bos_token_id is None:\n            return None\n        return self.decode([self.bos_token_id])\n\n    @cached_property\n    def eos_token(self) -> bytes:\n        return self.decode([self.eos_token_id])\n\n    @property\n    def chat_template(self) -> Any | None:\n        return self._chat_template\n\n    def __call__(self, byte_string: bytes):\n        return self.encode(byte_string)\n\n    def encode(self, byte_string: bytes, *, parse_special: bool = True) -> list[int]:\n        \"\"\"Returns a list of tokens that represent the given byte string.\"\"\"\n        return self._ll_tokenizer.tokenize_bytes(byte_string, parse_special=parse_special)\n\n    def decode(self, tokens: Sequence[int]) -> bytes:\n        \"\"\"Returns the bytes represented by the given list of tokens.\"\"\"\n        return self._ll_tokenizer.decode_bytes(list(tokens))\n\n    def recode(self, tokens: Sequence[int]) -> list[int]:\n        \"\"\"Redoes a tokenization.\n\n        Encoding a string into tokens does not distribute over concatenation.\n        That is, in general, `encode(A)+encode(B) != encode(A+B)` (although it\n        it may in some cases).\n        An LLM will generate token-by-token, but it is possible (even likely) that\n        when the generation is considered as a whole, a better tokenization may\n        be possible.\n        This method takes in a sequence of tokens, and returns an 'improved' sequence.\n        \"\"\"\n\n        # This is the notional behavior\n        # It may need to be overridden in particular cases because\n        # we are dealing with LLM ecosystems in the real world\n        return self.encode(self.decode(tokens))\n"
  },
  {
    "path": "guidance/models/_llama_cpp.py",
    "content": "import atexit\nimport logging\nimport operator\nimport os\nimport sys\nfrom itertools import takewhile\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nimport numpy as np\n\nfrom .._schema import SamplingParams\nfrom .._utils import normalize_notebook_stdout_stderr\nfrom ..chat import ChatTemplate\nfrom ._base import Model\nfrom ._engine import Engine, EngineInterpreter, LogitsOutput, Tokenizer\n\ntry:\n    import llama_cpp\n\n    is_llama_cpp = True\nexcept ModuleNotFoundError:\n    is_llama_cpp = False\nelse:\n    import llguidance.llamacpp\n\nif TYPE_CHECKING:\n    from llama_cpp.llama import Llama\n\nlogger = logging.getLogger(__name__)\n\nshutdown_none = True\n\n\ndef set_shutdown_flag():\n    global shutdown_none\n    # python can set anything to None at shutdown, so use None\n    shutdown_none = None\n\n\natexit.register(set_shutdown_flag)\n\n\nclass _LlamaBatchContext:\n    def __init__(self, n_batch, n_ctx):\n        self._llama_batch_free = llama_cpp.llama_batch_free\n        self.batch = llama_cpp.llama_batch_init(n_batch, 0, n_ctx)\n        if self.batch is None:\n            raise Exception(\"call to llama_cpp.llama_batch_init returned NULL.\")\n\n    def __del__(self):\n        if shutdown_none is not None:\n            llama_batch_free = getattr(self, \"_llama_batch_free\", None)\n            batch = getattr(self, \"batch\", None)\n            if batch is not None and llama_batch_free is not None:\n                self._llama_batch_free = None\n                self.batch = None\n                llama_batch_free(batch)\n\n\nclass LlamaCppTokenizer(Tokenizer):\n    def __init__(self, model_obj: \"Llama\", chat_template: str | ChatTemplate | None = None):\n        self._model_obj = model_obj\n\n        vocab = llama_cpp.llama_model_get_vocab(model_obj.model)\n        if vocab is None:\n            raise Exception(\"call to llama_cpp.llama_model_get_vocab returned NULL.\")\n        ll_tokenizer = llguidance.llamacpp.lltokenizer_from_vocab(vocab)\n\n        # Chat Template logic\n        if chat_template is None:\n            if hasattr(self._model_obj, \"metadata\") and \"tokenizer.chat_template\" in self._model_obj.metadata:\n                chat_template = self._model_obj.metadata[\"tokenizer.chat_template\"]\n\n        super().__init__(ll_tokenizer=ll_tokenizer, chat_template=chat_template, bos_token_id=model_obj.token_bos())\n\n\nclass LlamaCppEngine(Engine):\n    \"\"\"The core class that runs inference using llama.cpp.\"\"\"\n\n    def __init__(\n        self,\n        model,\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        enable_token_probabilities=False,\n        enable_top_k=False,\n        top_k: int = 5,\n        **kwargs,\n    ):\n        if not is_llama_cpp:\n            raise Exception(\n                \"Please install llama-cpp-python with `pip install llama-cpp-python` in order to use guidance.models.LlamaCpp!\"\n            )\n\n        if isinstance(model, Path):\n            model = str(model)\n        if model is None or isinstance(model, str) and len(model.strip()) == 0:\n            model = os.environ.get(\"LLAMA_CPP_MODEL\", \"\")\n            if len(model.strip()) == 0:\n                try:\n                    with open(os.path.expanduser(\"~/.llama_cpp_model\"), \"r\") as file:\n                        model = file.read().replace(\"\\n\", \"\")\n                except FileNotFoundError:\n                    pass\n                except PermissionError:\n                    pass\n                if len(model.strip()) == 0:\n                    raise ValueError(\n                        \"If model is None then a model file must be specified in either the LLAMA_CPP_MODEL environment variable or in the ~/.llama_cpp_model file.\"\n                    )\n\n        if isinstance(model, str):\n            self.model = model\n            if \"verbose\" not in kwargs:\n                kwargs[\"verbose\"] = False\n\n            # patch over https://github.com/abetlen/llama-cpp-python/issues/729\n            try:\n                sys.stdout.fileno()\n            except:  # noqa BLE001\n                logger.warning(\n                    \"Cannot use verbose=True in this context (probably CoLab). See https://github.com/abetlen/llama-cpp-python/issues/729\",\n                    exc_info=True,\n                )\n                kwargs[\"verbose\"] = True  # llama-cpp-python can't hide output in this case\n\n            with normalize_notebook_stdout_stderr():\n                self.model_obj = llama_cpp.Llama(model_path=model, logits_all=True, **kwargs)\n        elif isinstance(model, llama_cpp.Llama):\n            self.model = model.__class__.__name__\n            self.model_obj = model\n        else:\n            raise TypeError(\"model must be None, a file path string, or a llama_cpp.Llama object.\")\n\n        self._context = _LlamaBatchContext(self.model_obj.n_batch, self.model_obj.n_ctx())\n        self._n_vocab = self.model_obj.n_vocab()\n        self._cached_token_ids = []\n        self._cached_logits = None\n\n        super().__init__(\n            LlamaCppTokenizer(self.model_obj, chat_template=chat_template),\n            enable_backtrack=enable_backtrack,\n            enable_ff_tokens=enable_ff_tokens,\n            enable_monitoring=enable_monitoring,\n            enable_token_probabilities=enable_token_probabilities,\n            enable_top_k=enable_top_k,\n            top_k=top_k,\n        )\n\n    def get_logits(self, token_ids: list[int], include_all_uncached_tokens: bool = False) -> LogitsOutput:\n        \"\"\"Computes the logits for the given token state.\n\n        This overrides a method from the LocalEngine class that is used to get\n        inference results from the model.\n        \"\"\"\n\n        if len(token_ids) == 0:\n            raise ValueError(\"token_ids must contain some tokens.\")\n\n        # make sure we don't run off the end of the model's context\n        if self.model_obj.n_ctx() <= len(token_ids):\n            raise Exception(\n                f\"Attempted to use a context length of {len(token_ids)} tokens, but this LlamaCpp model is only configured to support up to {self.model_obj.n_ctx()}!\"\n            )\n\n        # check what we have already cached\n        num_cached = sum(takewhile(operator.truth, map(operator.eq, token_ids, self._cached_token_ids)))\n        if num_cached == len(token_ids):\n            if num_cached == len(self._cached_token_ids):\n                # last token input is the same as the last cached token, so return the last cached logits\n                return {\n                    \"logits\": self._cached_logits,\n                    \"n_tokens\": len(token_ids),\n                    \"n_cached\": num_cached,\n                }\n            # we need to pass at least one new token\n            num_cached = num_cached - 1\n\n        # clear obsolete parts of kv cache\n        kv = llama_cpp.llama_get_memory(self.model_obj.ctx)\n        llama_cpp.llama_memory_seq_rm(kv, -1, num_cached, -1)\n\n        # eval the model\n        logits_for_each_batch: list[np.ndarray] = []\n        n_batch = self.model_obj.n_batch\n        batch = self._context.batch\n        for i in range(num_cached, len(token_ids), n_batch):\n            n_tokens = min(i + n_batch, len(token_ids)) - i\n            batch.n_tokens = n_tokens\n            for j in range(n_tokens):\n                batch.token[j] = token_ids[i + j]\n                batch.pos[j] = i + j\n                batch.seq_id[j][0] = 0\n                batch.n_seq_id[j] = 1\n                batch.logits[j] = True\n\n            ret = llama_cpp.llama_decode(self.model_obj.ctx, batch)\n            if ret != 0:\n                raise Exception(f\"Call to llama_cpp.llama_decode returned {ret}.\")\n\n            # get the logits for *this* batch\n            llama_logits = llama_cpp.llama_get_logits(self.model_obj.ctx)\n            logits_for_this_batch = np.ctypeslib.as_array(\n                llama_logits,\n                shape=(n_tokens, self._n_vocab),\n            ).copy()\n            logits_for_each_batch.append(logits_for_this_batch)\n\n        # If our cached logits are valid, we can include them when we include_all_uncached_tokens\n        # this lets us give logits FOR the first uncached token, not just the logits that follow it,\n        last_cache_included = False\n        if self._cached_logits is not None and num_cached == len(self._cached_token_ids):\n            logits_for_each_batch = [self._cached_logits] + logits_for_each_batch\n            last_cache_included = True\n\n        # save the results\n        self._cached_token_ids = token_ids.copy()\n        self._cached_logits = logits_for_each_batch[-1][[-1], :]\n\n        if include_all_uncached_tokens:\n            logits = np.concatenate(logits_for_each_batch, axis=0)\n            if last_cache_included:\n                assert logits.shape[0] == len(token_ids) - num_cached + 1\n            else:\n                assert logits.shape[0] == len(token_ids) - num_cached\n        else:\n            logits = self._cached_logits\n\n        return {\n            \"logits\": logits,\n            \"n_tokens\": len(token_ids),\n            \"n_cached\": num_cached,\n        }\n\n\nclass LlamaCpp(Model):\n    def __init__(\n        self,\n        model=None,\n        echo=True,\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        sampling_params: SamplingParams | None = None,\n        **llama_cpp_kwargs,\n    ):\n        \"\"\"Build a new LlamaCpp model object that represents a model in a given state.\"\"\"\n\n        engine = LlamaCppEngine(\n            model,\n            chat_template=chat_template,\n            enable_backtrack=enable_backtrack,\n            enable_ff_tokens=enable_ff_tokens,\n            enable_monitoring=enable_monitoring,\n            enable_token_probabilities=echo,\n            enable_top_k=echo,\n            **llama_cpp_kwargs,\n        )\n        interpreter = EngineInterpreter(engine)\n        super().__init__(\n            interpreter=interpreter,\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/_mock.py",
    "content": "import logging\nfrom typing import Sequence\n\nimport numpy as np\n\nfrom .._schema import GenTokenExtra, SamplingParams\nfrom ._base import Model\nfrom ._engine import Engine, EngineInterpreter, LogitsOutput, Tokenizer\nfrom ._engine._tokenizer import TokenizerWrappable\n\nlogger = logging.getLogger(__name__)\n\n\nclass MockTokenizer(Tokenizer):\n    def __init__(self, tokens: Sequence[bytes], special_token_ids: list[int] | None = None):\n        self.tokens = tokens\n        self.byte_trie = ByteTrie(self.tokens, np.arange(len(self.tokens)))\n\n        ll_tokenizer = TokenizerWrappable(\n            eos_token_id=0,\n            bos_token_id=0,\n            tokens=tokens,\n            special_token_ids=[0],\n            # ENCODE MUST BE OVERRIDDEN\n            encode_callable=self.encode,\n        ).as_ll_tokenizer()\n\n        super().__init__(\n            ll_tokenizer=ll_tokenizer,\n            chat_template=None,\n            bos_token_id=0,\n        )\n\n    def encode(self, byte_string: bytes, *, parse_special: bool = True) -> list[int]:\n        \"\"\"Simple greedy tokenizer\n        TODO: could be a method on ByteTrie if we want to reuse it\n        \"\"\"\n        if not parse_special:\n            raise ValueError(\"parse_special=False is not supported in MockTokenizer\")\n        pos = 0\n        tokens = []\n        while pos < len(byte_string):\n            current_node = self.byte_trie\n            last_match = None\n            match_pos = pos\n\n            while match_pos < len(byte_string) and current_node.has_child(byte_string[match_pos : match_pos + 1]):\n                current_node = current_node.child(byte_string[match_pos : match_pos + 1])\n                if current_node.value >= 0:\n                    last_match = (current_node.value, match_pos + 1)\n                match_pos += 1\n\n            if last_match is not None:\n                tokens.append(last_match[0])\n                pos = last_match[1]\n            else:\n                raise ValueError(f\"Could not find a match for byte {byte_string[pos]} at position {pos}\")\n\n        return tokens\n\n    def recode(self, tokens: Sequence[int]) -> list[int]:\n        # Make a no-op for now\n        return list(tokens)\n\n\nclass MockEngine(Engine):\n    def __init__(self, tokenizer, byte_patterns, force):\n        super().__init__(tokenizer)\n\n        self._valid_mask = np.zeros(len(tokenizer.tokens))\n        for i, t in enumerate(tokenizer.tokens):\n            try:\n                t.decode(\"utf8\")\n                self._valid_mask[i] = 1.0\n            except:\n                pass\n        self.force = force\n        self.called_temperatures = []\n\n        # allow a single byte pattern to be passed\n        if isinstance(byte_patterns, (bytes, str)):\n            byte_patterns = [byte_patterns]\n\n        # allow for strings to be passed\n        for i, pattern in enumerate(byte_patterns):\n            if isinstance(pattern, str):\n                byte_patterns[i] = pattern.encode(\"utf8\")\n\n        self.byte_patterns = byte_patterns\n\n        # seed the random number generator\n        self._rand_generator = np.random.default_rng(seed=42)\n\n    def get_next_token_with_top_k(\n        self,\n        logits: np.ndarray | None,\n        logits_lat_ms: float | None,\n        token_ids: list[int],\n        mask: bytes | None,\n        temperature: float,\n        k: int,\n        compute_unmasked_probs: bool,\n        sampling_params: SamplingParams | None,\n    ) -> GenTokenExtra:\n        self.called_temperatures.append(temperature)\n        return super().get_next_token_with_top_k(\n            logits=logits,\n            logits_lat_ms=logits_lat_ms,\n            token_ids=token_ids,\n            mask=mask,\n            temperature=temperature,\n            k=k,\n            compute_unmasked_probs=compute_unmasked_probs,\n            sampling_params=sampling_params,\n        )\n\n    def get_logits(self, token_ids: list[int], include_all_uncached_tokens: bool = False) -> LogitsOutput:\n        \"\"\"Pretends to compute the logits for the given token state.\"\"\"\n        if len(token_ids) == 0:\n            raise ValueError(\"token_ids must not be empty\")\n\n        # build the byte strings\n        byte_string = b\"\".join(self.tokenizer.tokens[i] for i in token_ids)\n\n        # if we are forcing the bytes patterns then don't allow other tokens\n        if self.force:\n            logits = np.ones(len(self.tokenizer.tokens)) * -np.inf\n\n        # otherwise we randomly generate valid unicode bytes\n        else:\n            logits = self._rand_generator.standard_normal(len(self.tokenizer.tokens)) * self._valid_mask\n\n        # if we have a pattern that matches then force the next token\n        bias = 100.0\n        if self.byte_patterns is not None:\n            for p in self.byte_patterns:\n                if p.startswith(byte_string) and len(p) > len(byte_string):\n                    for i in self._get_next_tokens(p[len(byte_string) :]):\n                        logits[i] += bias\n                        bias /= 2  # if we have multiple matches then they apply with decreasing bias\n\n        return {\n            \"logits\": logits.reshape(1, -1),\n            \"n_tokens\": len(token_ids),\n            # TODO: add caching support and report this number accurately?\n            # This might help mock some tests that make assertions about caching.\n            \"n_cached\": 0,\n        }\n\n    def _get_next_tokens(self, byte_string):\n        special_tokens = [\n            (self.tokenizer.bos_token_id, self.tokenizer.bos_token),\n            (self.tokenizer.eos_token_id, self.tokenizer.eos_token),\n        ]\n        for i, t in special_tokens:\n            # if the byte string starts with a special token then make sure we don't yield any other tokens\n            if byte_string.startswith(t):\n                yield i\n                return\n        for i, t in enumerate(self.tokenizer.tokens):\n            if byte_string.startswith(t):\n                yield i\n\n\nclass Mock(Model):\n    def __init__(\n        self,\n        byte_patterns=None,\n        sampling_params: SamplingParams | None = None,\n        echo=False,\n        force=False,\n        **kwargs,\n    ):\n        \"\"\"Build a new Mock model object that represents a model in a given state.\"\"\"\n        if byte_patterns is None:\n            byte_patterns = []\n        # Our tokens are all bytes and all lowercase letter pairs\n        all_lc_pairs = [bytes([i, j]) for i in range(ord(\"a\"), ord(\"z\")) for j in range(ord(\"a\"), ord(\"z\"))]\n        all_bytes = [bytes([i]) for i in range(256)]\n        tokens = [b\"<s>\"] + all_lc_pairs + all_bytes\n\n        tokenizer = MockTokenizer(tokens, special_token_ids=[0])\n        engine = MockEngine(tokenizer, byte_patterns, force)\n\n        super().__init__(\n            interpreter=EngineInterpreter(engine),\n            echo=echo,\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n        )\n\n\nclass ByteTrie:\n    \"\"\"A python implementation mirroring the C++ ByteTrie class.\"\"\"\n\n    def __init__(self, byte_strings=None, values=None, parent=None):\n        self._parent = parent\n        self.match_version = -1\n        self.match = False\n        self.partial_match = False\n        self.prob = 0\n        self.value = -1\n        self.children = {}\n\n        if byte_strings is not None:\n            if values is None:\n                for s in byte_strings:\n                    self.insert(s, 0)\n            else:\n                for i, s in enumerate(byte_strings):\n                    self.insert(s, values[i])\n\n    def keys(self):\n        return self.children.keys()\n\n    def has_child(self, byte):\n        return byte in self.children\n\n    def child(self, byte):\n        return self.children[byte]\n\n    def parent(self):\n        return self._parent\n\n    def size(self):\n        return len(self.children)\n\n    def __len__(self):\n        return self.size()\n\n    def insert(self, s, value, pos=0):\n        if len(s) <= pos:\n            if self.value < 0:\n                self.value = value\n        else:\n            first_byte = s[pos : pos + 1]\n            if first_byte not in self.children:\n                self.children[first_byte] = ByteTrie(parent=self)\n            self.children[first_byte].insert(s, value, pos + 1)\n\n    def compute_probs(self, probs):\n        self.prob = 0.0\n\n        if self.value != -1:\n            self.prob += probs[self.value]\n\n        if self.children:\n            for k in self.children:\n                child = self.children[k]\n                child.compute_probs(probs)\n                self.prob += child.prob\n"
  },
  {
    "path": "guidance/models/_onnxruntime.py",
    "content": "import operator\nfrom itertools import takewhile\nfrom typing import TYPE_CHECKING, Union\n\ntry:\n    from ._transformers import TransformersTokenizer\n\n    has_transformers = True\nexcept ModuleNotFoundError:\n    has_transformers = False\n\nfrom guidance._schema import SamplingParams\n\nfrom ._base import Model\nfrom ._engine import Engine, EngineInterpreter, LogitsOutput\n\nif TYPE_CHECKING:\n    from transformers import PreTrainedTokenizer, PreTrainedTokenizerFast\n\ntry:\n    import onnxruntime_genai as og\n\n    has_onnxrt_genai = True\nexcept ModuleNotFoundError:\n    has_onnxrt_genai = False\n\n\nclass OnnxRuntimeGenAIEngine(Engine):\n    \"\"\"The core class that runs inference using onnxruntime-genai.\"\"\"\n\n    def __init__(\n        self,\n        model: str,\n        tokenizer: Union[\"PreTrainedTokenizer\", \"PreTrainedTokenizerFast\", None] = None,\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        enable_token_probabilities=False,\n        enable_top_k=False,\n        top_k: int = 5,\n        **kwargs,\n    ):\n        if not has_onnxrt_genai:\n            raise Exception(\n                \"Please install onnxruntime-genai with `pip install --pre onnxruntime-genai` in order to use guidance.models.OnnxRuntimeGenAI!\"\n            )\n\n        if not has_transformers:\n            raise Exception(\n                \"Please install transformers with `pip install transformers` in order to use guidance.models.Transformers!\"\n            )\n\n        self.config = og.Config(model)\n        self.config.clear_providers()\n        if \"execution_provider\" in kwargs:\n            self.config.append_provider(kwargs[\"execution_provider\"])\n\n        self.model = og.Model(self.config)\n        self.tokenizer = og.Tokenizer(self.model)\n\n        self.search_options = {\"batch_size\": 1}\n        self.params = og.GeneratorParams(self.model)\n        self.params.set_search_options(**self.search_options)\n\n        transformers_tokenizer = (\n            TransformersTokenizer(\n                hf_tokenizer=tokenizer,\n                chat_template=chat_template,\n            )\n            if tokenizer is not None\n            else TransformersTokenizer.from_pretrained(model, chat_template)\n        )\n\n        self._cached_token_ids = []\n        self._cached_logits = None\n\n        self.generator = None\n\n        super().__init__(\n            transformers_tokenizer,\n            enable_backtrack=enable_backtrack,\n            enable_ff_tokens=enable_ff_tokens,\n            enable_monitoring=enable_monitoring,\n            enable_token_probabilities=enable_token_probabilities,\n            enable_top_k=enable_top_k,\n            top_k=top_k,\n        )\n\n    def get_logits(self, token_ids: list[int], include_all_uncached_tokens: bool = False) -> LogitsOutput:\n        \"\"\"Computes the logits for the given token state.\n\n        This overrides a method from the LocalEngine class that is used to get\n        inference results from the model.\n        \"\"\"\n\n        assert not include_all_uncached_tokens, \"include_all_uncached_tokens is not supported in OnnxRuntime-GenAi\"\n\n        if len(token_ids) == 0:\n            raise ValueError(\"token_ids must contain some tokens.\")\n\n        new_token_ids = []\n        num_cached = sum(takewhile(operator.truth, map(operator.eq, token_ids, self._cached_token_ids)))\n\n        if self.generator is None:\n            self.generator = og.Generator(self.model, self.params)\n\n        if num_cached == 0:\n            self._cached_token_ids.clear()\n            self.generator.rewind_to(0)\n            new_token_ids.extend(token_ids)\n        elif num_cached == len(token_ids) and num_cached == len(self._cached_token_ids):\n            # last token input is the same as the last cached token, so return the last cached logits\n            return {\n                \"logits\": self._cached_logits,\n                \"n_tokens\": len(token_ids),\n                \"n_cached\": num_cached,\n            }\n        else:\n            if num_cached == len(token_ids):\n                num_cached -= 1\n                new_token_ids.append(token_ids[-1])\n            else:\n                extra_token_ids = len(token_ids) - num_cached\n                new_token_ids.extend(token_ids[-extra_token_ids:])\n\n            self.generator.rewind_to(num_cached)\n            self._cached_token_ids = self._cached_token_ids[:num_cached]\n\n        if len(new_token_ids) > 0:\n            self.generator.append_tokens(new_token_ids)\n\n        logits = self.generator.get_logits()[0]\n\n        # Need to add special truncating logic here for weird models that have a different output size than tokenizer vocab\n        logits = logits[:, : self.tokenizer._vocab_size]\n\n        self._cached_logits = logits\n        self._cached_token_ids.extend(new_token_ids)\n\n        return {\n            \"logits\": logits,\n            \"n_tokens\": len(token_ids),\n            \"n_cached\": num_cached,\n        }\n\n\nclass OnnxRuntimeGenAI(Model):\n    def __init__(\n        self,\n        model: str,\n        transformers_tokenizer: Union[\"PreTrainedTokenizer\", \"PreTrainedTokenizerFast\", None] = None,\n        echo=True,\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        sampling_params: SamplingParams | None = None,\n        **kwargs,\n    ):\n        engine = OnnxRuntimeGenAIEngine(\n            model=model,\n            tokenizer=transformers_tokenizer,\n            chat_template=chat_template,\n            enable_backtrack=enable_backtrack,\n            enable_ff_tokens=enable_ff_tokens,\n            enable_monitoring=enable_monitoring,\n            sampling_params=sampling_params,\n            **kwargs,\n        )\n        super().__init__(\n            interpreter=EngineInterpreter(engine),\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/_openai.py",
    "content": "from guidance._schema import SamplingParams\n\nfrom ._base import Model\nfrom ._openai_base import (\n    BaseOpenAIInterpreter,\n    OpenAIAudioMixin,\n    OpenAIClientWrapper,\n    OpenAIImageMixin,\n    OpenAIJSONMixin,\n    OpenAIRegexMixin,\n    OpenAIRuleMixin,\n)\n\n\nclass OpenAIInterpreter(OpenAIRuleMixin, OpenAIJSONMixin, OpenAIRegexMixin, BaseOpenAIInterpreter):\n    def __init__(\n        self,\n        model: str,\n        api_key: str | None = None,\n        reasoning_effort: str | None = None,\n        **kwargs,\n    ):\n        try:\n            import openai\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the openai package version >= 1 using `pip install openai -U` in order to use guidance.models.OpenAI!\"\n            ) from ie\n\n        client = openai.OpenAI(api_key=api_key, **kwargs)\n        super().__init__(model=model, client=OpenAIClientWrapper(client), reasoning_effort=reasoning_effort)\n\n\nclass OpenAI(Model):\n    def __init__(\n        self,\n        model: str,\n        sampling_params: SamplingParams | None = None,\n        echo: bool = True,\n        *,\n        api_key: str | None = None,\n        reasoning_effort: str | None = None,\n        **kwargs,\n    ):\n        \"\"\"Build a new OpenAI model object that represents a model in a given state.\n\n        Parameters\n        ----------\n        model : str\n            The name of the OpenAI model to use (e.g. gpt-4o-mini).\n        echo : bool\n            If true the final result of creating this model state will be displayed (as HTML in a notebook).\n        api_key : None or str\n            The OpenAI API key to use for remote requests, passed directly to the `openai.OpenAI` constructor.\n\n        **kwargs :\n            All extra keyword arguments are passed directly to the `openai.OpenAI` constructor. Commonly used argument\n            names include `base_url` and `organization`\n        \"\"\"\n\n        if \"audio-preview\" in model:\n            interpreter_cls = type(\"OpenAIAudioInterpreter\", (OpenAIAudioMixin, OpenAIInterpreter), {})\n        elif model.startswith(\"gpt-4o\") or model.startswith(\"o1\"):\n            interpreter_cls = type(\"OpenAIImageInterpreter\", (OpenAIImageMixin, OpenAIInterpreter), {})\n        else:\n            interpreter_cls = OpenAIInterpreter\n\n        super().__init__(\n            interpreter=interpreter_cls(model, api_key=api_key, reasoning_effort=reasoning_effort, **kwargs),\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/_openai_base.py",
    "content": "import base64\nimport json\nimport time\nimport wave\nfrom abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom io import BytesIO\nfrom typing import TYPE_CHECKING, Any, ContextManager, Iterator, Literal, TypeAlias, cast\n\nfrom pydantic import BaseModel, Discriminator, Field, TypeAdapter\nfrom typing_extensions import Annotated, assert_never\n\nfrom .._ast import (\n    ASTNode,\n    AudioBlob,\n    GenAudio,\n    ImageBlob,\n    ImageUrl,\n    JsonNode,\n    LiteralNode,\n    RegexNode,\n    RoleEnd,\n    RoleStart,\n    RuleNode,\n    ToolCallNode,\n)\nfrom .._schema import TokenUsage\nfrom .._tools import Tool\nfrom .._utils import bytes_from\nfrom ..trace import AudioOutput, ImageOutput, OutputAttr, TextOutput, Token, TokenOutput\nfrom ._base import Interpreter, State\n\nif TYPE_CHECKING:\n    import openai\n    from openai.types.chat import ChatCompletionChunk\n\n\ndef get_role_start(role: str) -> str:\n    # ChatML is as good as anything\n    return \"<|im_start|>\" + role + \"\\n\"\n\n\ndef get_role_end(role: str) -> str:\n    # ChatML is as good as anything\n    return \"\\n<|im_end|>\\n\"\n\n\nclass AssistantAudio(BaseModel):\n    id: str\n    expires_at: int = Field(exclude=True)\n    data: str = Field(exclude=True)\n    transcript: str = Field(exclude=True)\n\n\nclass AssistantAudioMessage(BaseModel):\n    role: Literal[\"assistant\"]\n    audio: AssistantAudio\n\n\nclass TextContent(BaseModel):\n    type: Literal[\"text\"]\n    text: str\n\n\nclass InputAudio(BaseModel):\n    data: str\n    format: str\n\n\nclass AudioContent(BaseModel):\n    type: Literal[\"input_audio\"]\n    input_audio: InputAudio\n\n\nclass ImageUrlContentInner(BaseModel):\n    url: str\n\n\nclass ImageUrlContent(BaseModel):\n    type: Literal[\"image_url\"]\n    image_url: ImageUrlContentInner\n\n\nContent: TypeAlias = Annotated[TextContent | AudioContent | ImageUrlContent, Discriminator(\"type\")]\n\n\nclass ContentMessage(BaseModel):\n    role: Literal[\"system\", \"user\", \"assistant\"]\n    content: list[Content]\n\n\nclass Function(BaseModel):\n    name: str\n    arguments: str\n\n\nclass Custom(BaseModel):\n    name: str\n    input: str\n\n\nclass FunctionCall(BaseModel):\n    id: str\n    type: Literal[\"function\"] = \"function\"\n    function: Function\n\n\nclass CustomCall(BaseModel):\n    id: str\n    type: Literal[\"custom\"] = \"custom\"\n    custom: Custom\n\n\nToolCall = Annotated[FunctionCall | CustomCall, Discriminator(\"type\")]\n\n\nclass ToolCallMessage(BaseModel):\n    role: Literal[\"assistant\"] = \"assistant\"\n    tool_calls: list[ToolCall]\n\n\nclass ToolCallResult(BaseModel):\n    role: Literal[\"tool\"] = \"tool\"\n    tool_call_id: str\n    content: str\n\n\nMessage: TypeAlias = ContentMessage | AssistantAudioMessage | ToolCallMessage | ToolCallResult\n\n\nclass OpenAIState(State):\n    def __init__(self) -> None:\n        super().__init__()\n        self.messages: list[Message] = []\n        self.content: list[Content] = []\n        self.audio: AssistantAudio | None = None\n\n    def apply_text(self, text: str) -> None:\n        if len(self.content) > 0 and isinstance(self.content[-1], TextContent):\n            self.content[-1].text += text\n        else:\n            self.content.append(TextContent(type=\"text\", text=text))\n\n    def get_active_message(self) -> Message | None:\n        if self.active_role is None:\n            return None\n        if self.active_role not in [\"system\", \"user\", \"assistant\"]:\n            raise ValueError(f\"Invalid active role: {self.active_role}\")\n        active_role = cast(Literal[\"system\", \"user\", \"assistant\"], self.active_role)\n\n        if self.content and self.audio:\n            raise ValueError(\"Cannot have both content and audio\")\n        if self.audio:\n            if active_role != \"assistant\":\n                raise ValueError(\"Audio messages can only be sent by the assistant\")\n            return AssistantAudioMessage(\n                role=active_role,\n                audio=self.audio,\n            )\n        elif self.content:\n            return ContentMessage(\n                role=active_role,\n                content=self.content,\n            )\n        else:\n            return None\n\n    def __str__(self) -> str:\n        messages = self.messages\n        active_message = self.get_active_message()\n        if active_message is not None:\n            messages = messages + [active_message]\n        s = \"\"\n        for i, message in enumerate(messages):\n            s += get_role_start(message.role)\n            if isinstance(message, AssistantAudioMessage):\n                s += \"[AUDIO]\"\n            elif isinstance(message, ContentMessage):\n                for content in message.content:\n                    if isinstance(content, TextContent):\n                        s += content.text\n                    elif isinstance(content, ImageUrlContent):\n                        s += \"[IMAGE]\"  # Arbitrary stringification\n                    elif isinstance(content, AudioContent):\n                        s += \"[AUDIO]\"  # transcript?\n                    else:\n                        if TYPE_CHECKING:\n                            assert_never(content)\n                        raise TypeError(f\"Unknown content type: {content}\")\n            elif isinstance(message, ToolCallMessage):\n                for tool_call in message.tool_calls:\n                    if isinstance(tool_call, CustomCall):\n                        s += f\"<tool={tool_call.custom.name}>\"\n                        s += tool_call.custom.input\n                    elif isinstance(tool_call, FunctionCall):\n                        s += f\"<tool={tool_call.function.name}>\"\n                        s += tool_call.function.arguments\n                    else:\n                        raise TypeError(f\"Unknown tool call type: {tool_call}\")\n                    s += \"</tool>\"\n            elif isinstance(message, ToolCallResult):\n                s += f\"\\n<tool_result={message.tool_call_id}>\"\n                s += message.content\n                s += \"</tool_result>\"\n            else:\n                if TYPE_CHECKING:\n                    assert_never(message)\n                raise TypeError(f\"Unknown message type: {message}\")\n            if active_message is None or i != len(messages) - 1:\n                # For the sake of consistency, don't add role end for the active message\n                s += get_role_end(message.role)\n        return s\n\n\nclass BaseOpenAIClientWrapper(ABC):\n    @abstractmethod\n    def streaming_chat_completions(\n        self,\n        model: str,\n        messages: list[dict[str, Any]],\n        logprobs: bool,\n        **kwargs,\n    ) -> ContextManager[Iterator[\"ChatCompletionChunk\"]]:\n        \"\"\"Streaming chat completions.\"\"\"\n        raise NotImplementedError(\"This method should be implemented by subclasses.\")\n\n\nclass OpenAIClientWrapper(BaseOpenAIClientWrapper):\n    def __init__(self, client: \"openai.OpenAI\"):\n        self.client = client\n\n    def streaming_chat_completions(\n        self,\n        model: str,\n        messages: list[dict[str, Any]],\n        logprobs: bool,\n        **kwargs,\n    ) -> ContextManager[Iterator[\"ChatCompletionChunk\"]]:\n        \"\"\"Streaming chat completions.\"\"\"\n\n        return self.client.chat.completions.create(\n            model=model,\n            messages=messages,\n            logprobs=logprobs,\n            stream=True,\n            stream_options={\"include_usage\": True},\n            **kwargs,\n        )\n\n\nclass BaseOpenAIInterpreter(Interpreter[OpenAIState]):\n    \"\"\"Base class for interacting with OpenAI models.\"\"\"\n\n    logprobs: bool = True\n    # TODO: have top-k be passed programmatically and only if echo=True\n    top_k: int | None = 5\n\n    def __init__(self, model: str, client: BaseOpenAIClientWrapper, *, reasoning_effort: str | None = None):\n        super().__init__(state=OpenAIState())\n        self.model = model\n        self.client = client\n        self.reasoning_effort = reasoning_effort\n\n        if \"gpt-5\" in model:\n            # logprobs are not allowed for gpt-5...\n            self.logprobs = False\n\n    def run(self, node: ASTNode, **kwargs) -> Iterator[OutputAttr]:\n        if not isinstance(node, RoleStart) and self.state.active_role is None:\n            raise ValueError(\"OpenAI models require an active role (e.g. use `with assistant(): ...`)\")\n        return super().run(node, **kwargs)\n\n    def role_start(self, node: RoleStart, **kwargs) -> Iterator[OutputAttr]:\n        if node.role not in [\"system\", \"user\", \"assistant\"]:\n            raise ValueError(f\"OpenAI models only support roles 'system', 'user', and 'assistant', got {node.role}\")\n        self.state.active_role = cast(Literal[\"system\", \"user\", \"assistant\"], node.role)\n        # TODO: drop this and yield nothing. We need to add this for now as a workaround for the\n        # fact that current vis code assumes that there is actually a role start message\n        yield TextOutput(value=get_role_start(node.role), is_input=True)\n\n    def role_end(self, node: RoleEnd, **kwargs) -> Iterator[OutputAttr]:\n        active_message = self.state.get_active_message()\n        if active_message is not None:\n            self.state.messages.append(active_message)\n        self.state.audio = None\n        self.state.content = []\n        self.state.active_role = None\n        yield from ()\n\n    def text(self, node: LiteralNode, **kwargs) -> Iterator[OutputAttr]:\n        self.state.apply_text(node.value)\n        yield TextOutput(value=node.value, is_input=True)\n\n    def _run(self, tools: dict[str, Tool] | None = None, **kwargs) -> Iterator[OutputAttr]:\n        if self.state.active_role is None:\n            # Should never happen?\n            raise ValueError(\"OpenAI models require chat blocks (e.g. use `with assistant(): ...`)\")\n        if self.state.active_role != \"assistant\":\n            raise ValueError(\n                \"OpenAI models can only generate as the assistant (i.e. inside of `with assistant(): ...`)\"\n            )\n        if self.state.content:\n            raise ValueError(\n                f\"OpenAI models do not support pre-filled assistant messages: got data {self.state.content}.\"\n            )\n\n        sampling_params = kwargs.pop(\"sampling_params\", None)\n        if sampling_params:\n            # only process kwargs that are supported by the OpenAI API\n            if \"top_p\" not in kwargs:\n                kwargs[\"top_p\"] = sampling_params.get(\"top_p\", None)\n\n            if sampling_params.get(\"top_k\", None) is not None:\n                raise ValueError(\"OpenAI models do not support top_k sampling.\")\n\n            if sampling_params.get(\"min_p\", None) is not None:\n                raise ValueError(\"OpenAI models do not support min_p sampling.\")\n\n            if sampling_params.get(\"repetition_penalty\", None) is not None:\n                raise ValueError(\"OpenAI models do not support repetition_penalty sampling.\")\n\n        # Set default kwargs\n        if \"reasoning_effort\" not in kwargs and self.reasoning_effort is not None:\n            kwargs[\"reasoning_effort\"] = self.reasoning_effort\n\n        with self.client.streaming_chat_completions(\n            model=self.model,\n            messages=cast(list[dict[str, Any]], TypeAdapter(list[Message]).dump_python(self.state.messages)),\n            logprobs=self.logprobs,\n            top_logprobs=self.top_k if self.logprobs else None,\n            tools=[tool.with_name(name).to_openai_style() for name, tool in tools.items()] if tools else None,\n            **kwargs,\n        ) as chunks:\n            yield from self._handle_stream(chunks, tools)\n\n    def _handle_stream(\n        self,\n        chunks: Iterator[\"ChatCompletionChunk\"],\n        tools: dict[str, Tool] | None,\n    ) -> Iterator[OutputAttr]:\n        _t0 = time.time()\n        t0 = _t0\n        audio: AssistantAudio | None = None\n        final_tool_calls: dict[int, ToolCall] = {}\n        # We made another call to the OpenAI API, so we count it as a round trip.\n        usage = TokenUsage(round_trips=1)\n        for chunk in chunks:\n            t1 = time.time()\n            latency_ms = (t1 - t0) * 1000\n            t0 = t1\n\n            # NOTE: use getattr here as litellm does not return usage\n            if getattr(chunk, \"usage\", None) is not None:\n                # Update token usage\n                usage.input_tokens += chunk.usage.prompt_tokens\n                # Estimate forward passes as number of completion tokens\n                usage.forward_passes += chunk.usage.completion_tokens\n                if getattr(chunk.usage, \"prompt_tokens_details\", None) is not None:\n                    if chunk.usage.prompt_tokens_details.cached_tokens is not None:\n                        usage.cached_input_tokens += chunk.usage.prompt_tokens_details.cached_tokens\n            if chunk.choices is None or len(chunk.choices) == 0:\n                # Azure seems to return empty choices sometimes (on first chunk?)\n                # OpenAI seems to return None choices sometimes (after giving usage?) (for audio only?)\n                continue\n            choice = chunk.choices[0]\n            delta = choice.delta\n            if delta.content is not None:\n                assert audio is None\n                content = delta.content\n                if len(content) == 0:\n                    continue\n                self.state.apply_text(content)\n                # Rather paranoid check, as we have a few slightly different\n                # apis which are \"almost\" openai compatible...\n                if (\n                    hasattr(choice, \"logprobs\")\n                    and choice.logprobs is not None\n                    and hasattr(choice.logprobs, \"content\")\n                    and choice.logprobs.content is not None\n                    and len(choice.logprobs.content) > 0\n                ):\n                    tokens = choice.logprobs.content\n                    for token in tokens:\n                        yield TokenOutput(\n                            value=content if len(tokens) == 1 else token.token,\n                            # amortized latency\n                            latency_ms=latency_ms / len(tokens),\n                            token=Token(\n                                token=token.token,\n                                bytes=b\"\" if token.bytes is None else base64.b64encode(bytes(token.bytes)),\n                                prob=2.718**token.logprob,\n                            ),\n                            top_k=[\n                                Token(\n                                    token=tok.token,\n                                    bytes=b\"\" if tok.bytes is None else base64.b64encode(bytes(tok.bytes)),\n                                    prob=2.718**tok.logprob,\n                                )\n                                for tok in token.top_logprobs\n                            ],\n                            is_generated=True,\n                        )\n                else:\n                    yield TextOutput(value=delta.content, is_generated=True, latency_ms=latency_ms)\n            elif (delta_audio := cast(dict | None, getattr(delta, \"audio\", None))) is not None:\n                transcript_chunk: str | None = None\n                if audio is None:\n                    assert delta_audio.get(\"id\") is not None\n                    audio = AssistantAudio(\n                        id=delta_audio[\"id\"],\n                        expires_at=delta_audio.get(\"expires_at\", 0),  # ?\n                        transcript=delta_audio.get(\"transcript\", \"\"),\n                        data=delta_audio.get(\"data\", \"\"),\n                    )\n                    transcript_chunk = delta_audio.get(\"transcript\")\n                else:\n                    assert delta_audio.get(\"id\") is None or delta_audio[\"id\"] == audio.id\n                    if delta_audio.get(\"data\") is not None:\n                        audio.data += delta_audio[\"data\"]\n                    if delta_audio.get(\"transcript\") is not None:\n                        audio.transcript += delta_audio[\"transcript\"]\n                        transcript_chunk = delta_audio[\"transcript\"]\n                    if delta_audio.get(\"expires_at\") is not None:\n                        assert audio.expires_at == 0\n                        audio.expires_at = delta_audio[\"expires_at\"]\n                if transcript_chunk is not None:\n                    # Why not give the users some transcript? :)\n                    yield TextOutput(\n                        value=delta_audio[\"transcript\"],\n                        is_generated=True,\n                        latency_ms=latency_ms,\n                    )\n            elif (tool_calls := delta.tool_calls) is not None:\n                for tool_call_delta in tool_calls:\n                    index = tool_call_delta.index\n                    if index not in final_tool_calls:\n                        if final_tool_calls:\n                            # Close previous one\n                            yield TextOutput(\n                                value=\"</tool>\",\n                            )\n                        tool_call = TypeAdapter[ToolCall](ToolCall).validate_python(\n                            tool_call_delta, from_attributes=True\n                        )\n                        if isinstance(tool_call, FunctionCall):\n                            yield TextOutput(\n                                value=f\"<tool={tool_call.function.name}>\",\n                            )\n                        elif isinstance(tool_call, CustomCall):\n                            yield TextOutput(\n                                value=f\"<tool={tool_call.custom.name}>\",\n                            )\n                        else:\n                            raise TypeError(f\"Unknown tool call type: {tool_call}\")\n                        final_tool_calls[index] = tool_call\n                    else:\n                        tool_call = final_tool_calls[index]\n                        if isinstance(tool_call, FunctionCall):\n                            yield TextOutput(value=tool_call_delta.function.arguments)\n                            final_tool_calls[index].function.arguments += tool_call_delta.function.arguments\n                        elif isinstance(tool_call, CustomCall):\n                            yield TextOutput(value=tool_call_delta.custom[\"input\"])\n                            final_tool_calls[index].custom.input += tool_call_delta.custom[\"input\"]\n                        else:\n                            raise ValueError(f\"Unknown tool call type: {type(tool_call)}\")\n            elif delta.function_call is not None:\n                # Deprecated?\n                raise NotImplementedError(\"Function calling not yet supported for OpenAI\")\n\n            # there are cases where vllm does not return refusal field in delta, using None as default value here\n            elif getattr(delta, \"refusal\", None) is not None:\n                raise ValueError(f\"OpenAI refused the request: {delta.refusal}\")\n\n            if choice.finish_reason is not None and choice.finish_reason != \"stop\":\n                # TODO: handle \"bad\" finish reasons\n                pass\n\n            if usage.ttft_ms == 0:\n                usage.ttft_ms = (time.time() - _t0) * 1000\n\n        if audio is not None:\n            assert self.state.audio is None\n            self.state.audio = audio\n            # Create an in-memory WAV file\n            wav_buffer = BytesIO()\n            with wave.open(wav_buffer, \"wb\") as wav_file:\n                wav_file.setnchannels(1)\n                wav_file.setsampwidth(2)  # PCM16 = 2 bytes per sample\n                wav_file.setframerate(22050)  # A guess\n                wav_file.writeframes(base64.b64decode(audio.data))\n\n            # Get WAV bytes\n            wav_bytes = wav_buffer.getvalue()\n            yield AudioOutput(value=base64.b64encode(wav_bytes), is_input=False)\n\n        if final_tool_calls:\n            if tools is None:\n                raise ValueError(f\"No tools provided, but tool calls were made: {final_tool_calls}\")\n            # Close last one\n            yield TextOutput(\n                value=\"</tool>\",\n            )\n            self.state.messages.append(\n                ToolCallMessage(\n                    tool_calls=[\n                        TypeAdapter(ToolCall).validate_python(tc, from_attributes=True)\n                        for tc in final_tool_calls.values()\n                    ]\n                )\n            )\n            for tool_call in final_tool_calls.values():\n                if isinstance(tool_call, FunctionCall):\n                    name = tool_call.function.name\n                    tool = tools[name]\n                    args = json.loads(tool_call.function.arguments)\n                    result = tool.call(**args)\n                elif isinstance(tool_call, CustomCall):\n                    name = tool_call.custom.name\n                    tool = tools[name]\n                    result = tool.call(tool_call.custom.input)\n                else:\n                    raise TypeError(f\"Unknown tool call type: {tool_call}\")\n                result_str = json.dumps(result)\n                self.state.messages.append(\n                    ToolCallResult(\n                        tool_call_id=tool_call.id,\n                        content=result_str,\n                    )\n                )\n                yield TextOutput(\n                    value=f\"\\n<tool_result={name}>{result_str}</tool_result>\",\n                )\n\n        usage.total_latency_ms += (time.time() - _t0) * 1000\n        self.state.add_usage(usage)\n\n    def tool_call(self, node: ToolCallNode, **kwargs) -> Iterator[OutputAttr]:\n        yield from self._run(\n            tools=node.tools,\n            tool_choice=node.tool_choice,\n            parallel_tool_calls=node.parallel_tool_calls,\n            **kwargs,\n        )\n\n    def __deepcopy__(self, memo):\n        \"\"\"Custom deepcopy to ensure client is not copied.\"\"\"\n        cls = self.__class__\n        result = cls.__new__(cls)\n        memo[id(self)] = result\n        for k, v in self.__dict__.items():\n            if k == \"client\":\n                # Don't copy the client\n                setattr(result, k, v)\n            else:\n                setattr(result, k, deepcopy(v, memo))\n        return result\n\n\nclass OpenAIRuleMixin(BaseOpenAIInterpreter):\n    def rule(self, node: RuleNode, **kwargs) -> Iterator[OutputAttr]:\n        if node.stop:\n            raise ValueError(\"Stop condition not yet supported for OpenAI\")\n        if node.suffix:\n            raise ValueError(\"Suffix not yet supported for OpenAI\")\n        if node.stop_capture:\n            raise ValueError(\"Save stop text not yet supported for OpenAI\")\n\n        kwargs = kwargs.copy()\n        if node.temperature:\n            kwargs[\"temperature\"] = node.temperature\n        if node.max_tokens:\n            kwargs[\"max_completion_tokens\"] = node.max_tokens\n\n        chunks = self.run(node.value, **kwargs)\n        if node.capture:\n            buffered_text = \"\"\n            for chunk in chunks:\n                # TODO: this isinstance check is pretty darn fragile.\n                # ~there must be a better way~\n                if isinstance(chunk, TextOutput):\n                    buffered_text += chunk.value\n                yield chunk\n            yield self.state.apply_capture(\n                name=node.capture,\n                value=buffered_text,\n                log_prob=1,  # TODO\n                is_append=node.list_append,\n            )\n        else:\n            yield from chunks\n\n\nclass OpenAIRegexMixin(BaseOpenAIInterpreter):\n    def regex(self, node: RegexNode, **kwargs) -> Iterator[OutputAttr]:\n        if node.regex is not None:\n            raise ValueError(\"Regex not yet supported for OpenAI\")\n        # We're in unconstrained mode now.\n        return self._run(**kwargs)\n\n\nclass OpenAIJSONMixin(BaseOpenAIInterpreter):\n    def json(self, node: JsonNode, **kwargs) -> Iterator[OutputAttr]:\n        if node.schema is None:\n            response_format = {\"type\": \"json_object\"}\n        else:\n            response_format = {\n                \"type\": \"json_schema\",\n                \"json_schema\": {\n                    \"name\": \"json_schema\",  # TODO?\n                    \"schema\": node.schema,\n                    \"strict\": True,\n                },\n            }\n        return self._run(\n            response_format=response_format,\n            **kwargs,\n        )\n\n\nclass OpenAIImageMixin(BaseOpenAIInterpreter):\n    def image_blob(self, node: ImageBlob, **kwargs) -> Iterator[OutputAttr]:\n        try:\n            import PIL.Image\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the Pillow package `pip install Pillow` in order to use images with OpenAI!\"\n            ) from ie\n\n        image_bytes = base64.b64decode(node.data)\n        with PIL.Image.open(BytesIO(image_bytes)) as pil_image:\n            # Use PIL to infer file format\n            # TODO: just store format on ImageOutput type\n            format = pil_image.format\n            if format is None:\n                raise ValueError(\"Cannot upload image with unknown format\")\n\n        mime_type = f\"image/{format.lower()}\"\n        self.state.content.append(\n            ImageUrlContent(\n                type=\"image_url\",\n                image_url=ImageUrlContentInner(url=f\"data:{mime_type};base64,{node.data.decode()}\"),\n            )\n        )\n        yield ImageOutput(value=node.data, is_input=True)\n\n    def image_url(self, node: ImageUrl, **kwargs) -> Iterator[OutputAttr]:\n        self.state.content.append(ImageUrlContent(type=\"image_url\", image_url=ImageUrlContentInner(url=node.url)))\n        image_bytes = bytes_from(node.url, allow_local=False)\n        yield ImageOutput(value=base64.b64encode(image_bytes), is_input=True)\n\n\nclass OpenAIAudioMixin(BaseOpenAIInterpreter):\n    # Audio models don't support logprobs\n    logprobs: bool = False\n\n    def audio_blob(self, node: AudioBlob, **kwargs) -> Iterator[OutputAttr]:\n        format = \"wav\"  # TODO: infer from node\n        self.state.content.append(\n            AudioContent(\n                type=\"input_audio\",\n                input_audio=InputAudio(\n                    data=node.data.decode(\"utf-8\"),  # Base64 encoded string\n                    format=format,\n                ),\n            )\n        )\n        yield AudioOutput(value=node.data, format=format, is_input=True)\n\n    def gen_audio(self, node: GenAudio, **kwargs) -> Iterator[OutputAttr]:\n        yield from self._run(\n            modalities=[\"text\", \"audio\"],  # Has to be both?\n            audio={\n                \"voice\": node.kwargs.get(\"voice\", \"alloy\"),\n                \"format\": \"pcm16\",  # Has to be pcm16 for streaming\n            },\n        )\n"
  },
  {
    "path": "guidance/models/_transformers.py",
    "content": "import operator\nimport os\nimport re\nimport textwrap\nimport warnings\nfrom itertools import takewhile\nfrom typing import TYPE_CHECKING, Union, cast\n\nimport numpy as np\n\nfrom guidance._schema import SamplingParams\n\nfrom ..chat import ChatTemplate\nfrom ._base import Model\nfrom ._engine import Engine, EngineInterpreter, Llama3VisionInterpreter, LogitsOutput, Phi3VisionInterpreter, Tokenizer\nfrom ._engine._tokenizer import TokenizerWrappable\n\ntry:\n    import torch\nexcept ModuleNotFoundError:\n    pass\n\ntry:\n    import transformers as transformers_package\n\n    has_transformers = True\nexcept ModuleNotFoundError:\n    has_transformers = False\nelse:\n    import llguidance.hf\n\nif TYPE_CHECKING:\n    from transformers import PreTrainedModel, PreTrainedTokenizer, PreTrainedTokenizerFast\n\n# Formed by comparing model and tokenizer from_pretrained methods\n# transformers/models/auto/auto_factory.py\n# transformers/models/auto/tokenization_auto.py\n_COMMON_TRANSFORMERS_KWARGS = [\n    \"cache_dir\",\n    \"force_download\",\n    \"proxies\",\n    \"resume_download\",\n    \"revision\",\n    \"subfolder\",\n    \"trust_remote_code\",\n]\n\n\nclass ByteDecoderError(Exception):\n    pass\n\n\nclass ByteTokensError(Exception):\n    pass\n\n\nclass TransformersTokenizer(Tokenizer):\n    def __init__(\n        self,\n        hf_tokenizer: Union[\"PreTrainedTokenizer\", \"PreTrainedTokenizerFast\"],\n        chat_template: str | ChatTemplate | None = None,\n    ):\n        self._orig_tokenizer = hf_tokenizer\n\n        if isinstance(hf_tokenizer, transformers_package.PreTrainedTokenizerFast):\n            ll_tokenizer = llguidance.hf.from_tokenizer(\n                hf_tokenizer=hf_tokenizer,\n            )\n            vocab_size = hf_tokenizer.backend_tokenizer.get_vocab_size(with_added_tokens=True)\n        else:\n            byte_tokens = self._byte_tokens(hf_tokenizer)\n            vocab_size = len(byte_tokens)\n            ll_tokenizer = TokenizerWrappable(\n                eos_token_id=hf_tokenizer.eos_token_id,  # type: ignore[attr-defined]\n                bos_token_id=getattr(hf_tokenizer, \"bos_token_id\", None),\n                tokens=byte_tokens,\n                special_token_ids=[\n                    token_id for (token_id, token) in hf_tokenizer.added_tokens_decoder.items() if token.special\n                ],\n                encode_callable=hf_tokenizer.encode,\n            ).as_ll_tokenizer()\n\n        # Get chat template from the tokenizer if not provided\n        if chat_template is None and isinstance(hf_tokenizer.chat_template, str):\n            chat_template = hf_tokenizer.chat_template\n\n        super().__init__(\n            ll_tokenizer=ll_tokenizer,\n            chat_template=chat_template,\n            bos_token_id=getattr(hf_tokenizer, \"bos_token_id\", None),\n        )\n        self._vocab_size = vocab_size\n\n    @classmethod\n    def from_pretrained(\n        cls,\n        pretrained_model_name_or_path: str,\n        chat_template: str | ChatTemplate | None = None,\n        use_fast=True,\n        **kwargs,\n    ) -> \"TransformersTokenizer\":\n        tokenizer = transformers_package.AutoTokenizer.from_pretrained(\n            pretrained_model_name_or_path, use_fast=use_fast, **kwargs\n        )\n        return cls(\n            hf_tokenizer=tokenizer,\n            chat_template=chat_template,\n        )\n\n    def recode(self, tokens: list[int]) -> list[int]:\n        # the encode/decode cycle might not work if we have partial unicode strings\n        used_tokens = len(tokens)\n        for _ in range(3):\n            try:\n                first_decode = self.decode(tokens).decode(\"utf8\")\n            except UnicodeDecodeError:\n                if used_tokens == 0:\n                    break\n                else:\n                    used_tokens -= 1\n\n        new_ids = list(self.encode(first_decode.encode(\"utf-8\")))\n        if used_tokens < len(tokens):\n            new_ids += tokens[used_tokens:]\n\n        # HACK: check for a bug in the HuggingFace tokenizer\n        # (that will just add extra spaces during an encode-decode cycle)\n        second_decode = self._orig_tokenizer.decode(new_ids)\n        if (\n            second_decode != first_decode\n            and len(second_decode) == len(first_decode) + 1\n            and second_decode.startswith(\"<s>  \")\n        ):\n            new_ids = new_ids[0:1] + new_ids[2:]\n\n        return new_ids\n\n    @classmethod\n    def _byte_tokens(\n        cls,\n        transformers_tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n        ],\n    ) -> list[bytes]:\n        if hasattr(transformers_tokenizer, \"byte_decoder\"):\n            try:\n                cls._check_byte_decoder(transformers_tokenizer.byte_decoder, transformers_tokenizer)\n            except ByteDecoderError as e:\n                warnings.warn(\n                    f\"Tokenizer has a byte_decoder, but it can't be used to construct byte_tokens: {e}\", stacklevel=1\n                )\n                pass\n            else:\n                return cls._byte_tokens_from_byte_decoder(transformers_tokenizer.byte_decoder, transformers_tokenizer)\n\n        if hasattr(transformers_tokenizer, \"sp_model\"):\n            return cls._byte_tokens_from_sp_model(transformers_tokenizer)\n\n        try:\n            return cls._byte_tokens_by_encoding_token_strings(transformers_tokenizer)\n        except ValueError as e:\n            warnings.warn(\n                f\"Could not build_byte tokens from the tokenizer by encoding token strings: {e}\", stacklevel=1\n            )\n            pass\n\n        fallback_byte_decoder = cls._fallback_byte_decoder()\n        try:\n            cls._check_byte_decoder(fallback_byte_decoder, transformers_tokenizer)\n        except ByteDecoderError as e:\n            # Should be the only exception that is raised in _byte_tokens\n            raise ByteTokensError(\n                \"Could not build byte tokens from the tokenizer, and falling back to a standard gpt2 byte_decoder failed\"\n            ) from e\n        return cls._byte_tokens_from_byte_decoder(fallback_byte_decoder, transformers_tokenizer)\n\n    @classmethod\n    def _byte_tokens_from_byte_decoder(\n        cls,\n        byte_decoder: dict[str, int],\n        transformers_tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n        ],\n    ) -> list[bytes]:\n        byte_tokens = [b\"\"] * len(transformers_tokenizer)\n        for i in range(len(transformers_tokenizer)):\n            byte_coded = bytes([byte_decoder[c] for c in transformers_tokenizer.convert_ids_to_tokens(i)])\n            byte_tokens[i] = byte_coded\n        return byte_tokens\n\n    @classmethod\n    def _byte_tokens_from_sp_model(\n        cls,\n        transformers_tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n        ],\n    ) -> list[bytes]:\n        byte_tokens = [b\"\"] * len(transformers_tokenizer)\n        special_tokens_map = {id: token for token, id in transformers_tokenizer.get_added_vocab().items()}\n        space_prefix = \"▁\".encode()\n        for i in range(len(transformers_tokenizer)):\n            if i in special_tokens_map:\n                byte_coded = special_tokens_map[i].encode()\n            else:\n                byte_coded = re.sub(\n                    rb\"<0x(..)>\",\n                    lambda x: bytes.fromhex(x[1].decode()),\n                    transformers_tokenizer.sp_model.id_to_piece(i).encode(),\n                )\n            byte_tokens[i] = byte_coded.replace(space_prefix, b\" \")\n        return byte_tokens\n\n    @classmethod\n    def _byte_tokens_by_encoding_token_strings(\n        cls,\n        transformers_tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n        ],\n    ) -> list[bytes]:\n        byte_tokens = [b\"\"] * len(transformers_tokenizer)\n        special_tokens_map = {id: token for token, id in transformers_tokenizer.get_added_vocab().items()}\n        byte_encoder = cls._bytes_to_unicode()\n        byte_decoder = {v: k for k, v in byte_encoder.items()}\n\n        for i in range(len(transformers_tokenizer)):\n            if i in special_tokens_map:\n                byte_coded = special_tokens_map[i].encode()\n            else:\n                token = transformers_tokenizer.convert_ids_to_tokens(i)\n                if isinstance(token, bytes):\n                    byte_coded = token\n                elif isinstance(token, str):\n                    if hasattr(transformers_tokenizer, \"convert_tokens_to_string\"):\n                        token_str = transformers_tokenizer.convert_tokens_to_string([token])\n                        encoded_str = transformers_tokenizer.encode(token_str)\n                        if len(encoded_str) != 1:\n                            raise ValueError(f\"Round-trip encoding of tokens [{token}] failed! Got {encoded_str}\")\n                        roundtrip_id = encoded_str[0]\n                        if roundtrip_id == i:\n                            byte_coded = token_str.encode()\n                        else:\n                            byte_coded = bytes([byte_decoder[c] for c in token])\n                    else:\n                        byte_coded = token.encode()\n                else:\n                    raise ValueError(f\"Unexpected token type: {type(token)}\")\n            byte_tokens[i] = byte_coded\n        return byte_tokens\n\n    @classmethod\n    def _fallback_byte_decoder(cls) -> dict[str, int]:\n        byte_decoder = transformers_package.AutoTokenizer.from_pretrained(\n            \"gpt2\", use_fast=False\n        ).byte_decoder  # fall back to gpt2 mapping\n\n        # some special tokens may not have their whitespace encoded...\n        byte_decoder[\" \"] = 32\n        byte_decoder[\"\\n\"] = 10\n        byte_decoder[\"\\r\"] = 13\n        byte_decoder[\"\\t\"] = 9\n        byte_decoder[\"▁\"] = 32\n\n        return byte_decoder\n\n    @classmethod\n    def _check_byte_decoder(\n        cls,\n        byte_decoder: dict[str, int],\n        transformers_tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n        ],\n    ) -> None:\n        def check_byte_decoder_has_all_bytes() -> None:\n            # This is here because some tokenizers are bad and don't have all the bytes (I'm looking at you, microsoft/phi2)\n            all_bytes = set()\n            for x in transformers_tokenizer.get_vocab().keys():\n                for y in x:\n                    all_bytes.add(y)\n            if not set(byte_decoder.keys()) >= all_bytes:\n                raise ByteDecoderError(f\"Byte decoder is missing bytes: {all_bytes - set(byte_decoder.keys())}\")\n\n        def check_byte_decoder_complex_round_trip() -> None:\n            # run a quick spot check to verify we can rebuild complex multi-token unicode symbols\n            s = \"’•¶∂ƒ˙∆£Ħ爨ൠᅘ∰፨\"\n            reconstructed = b\"\"\n            try:\n                input_ids = transformers_tokenizer(s)[\"input_ids\"]\n                for i in input_ids:\n                    nxt_bytes = []\n                    token_str = transformers_tokenizer.convert_ids_to_tokens(i)\n                    for c in token_str:\n                        nxt_bytes.append(byte_decoder[c])\n                    reconstructed += bytes(nxt_bytes)\n                # Check if the tokenizer has a bos_token attribute, and if it does, check\n                # if it's at the start of the reconstructed bytes\n                # Some tokenizers add this automatically as part of the call function, so\n                # we need to remove it to compare\n                if (\n                    hasattr(transformers_tokenizer, \"bos_token\")\n                    and transformers_tokenizer.bos_token\n                    and reconstructed.startswith(transformers_tokenizer.bos_token.encode())\n                ):\n                    reconstructed = reconstructed[len(transformers_tokenizer.bos_token) :]\n            # TODO: can we narrow this exception?\n            except Exception as e:\n                msg = textwrap.dedent(\n                    f\"\"\"\n                    The tokenizer being used is unable to convert a special character in {s}.\n                    For models with sentencepiece based tokenizers (e.g. llama, phi-3-mini),\n                    installing sentencepiece often fixes this issue (pip install sentencepiece).\n                    \"\"\"\n                )\n                raise ByteDecoderError(msg) from e\n            if reconstructed.decode() != s:\n                raise ByteDecoderError(\n                    f\"Failed to reconstruct the string {s} from the tokenizer's byte_decoder: {reconstructed.decode()!r} != {s!r}\"\n                )\n\n        check_byte_decoder_has_all_bytes()\n        check_byte_decoder_complex_round_trip()\n\n    @classmethod\n    def _bytes_to_unicode(cls):\n        bs = (\n            list(range(ord(\"!\"), ord(\"~\") + 1))\n            + list(range(ord(\"¡\"), ord(\"¬\") + 1))\n            + list(range(ord(\"®\"), ord(\"ÿ\") + 1))\n        )\n        cs = bs[:]\n        n = 0\n        for b in range(256):\n            if b not in bs:\n                bs.append(b)\n                cs.append(256 + n)\n                n += 1\n        cs = [chr(n) for n in cs]\n        return dict(zip(bs, cs, strict=True))\n\n\nclass TransformersEngine(Engine):\n    def __init__(\n        self,\n        model: Union[str, \"PreTrainedModel\"],\n        tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n            None,\n        ],\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        enable_token_probabilities=False,\n        enable_top_k=False,\n        top_k: int = 5,\n        **kwargs,\n    ):\n        # fill in default model value\n        if model is None:\n            model = os.environ.get(\"TRANSFORMERS_MODEL\", None)\n        if model is None:\n            try:\n                with open(os.path.expanduser(\"~/.transformers_model\"), \"r\") as file:\n                    model = file.read().replace(\"\\n\", \"\")\n            except FileNotFoundError:\n                pass\n            except PermissionError:\n                pass\n\n        self.model_obj = self._model(model, **kwargs)\n\n        if not isinstance(model, str):\n            try:\n                self.model = self.model_obj.config._name_or_path\n            except AttributeError:\n                self.model = self.model_obj.__class__.__name__\n        else:\n            self.model = model\n        self.device = self.model_obj.device  # otherwise note the current device\n\n        self._past_key_values: (\n            transformers_package.Cache | tuple[tuple[torch.Tensor, ...], tuple[torch.Tensor, ...]] | None\n        ) = None\n        self._cached_logits = None\n        self._cached_token_ids: list[int] = []\n\n        # Set attr for malformed tokenizer hack.\n        # If more models start doing this, generalize into a util function.\n        if hasattr(self.model_obj.config, \"model_type\"):\n            if self.model_obj.config.model_type in [\"phi3\"]:\n                self._disable_retokenize_check = True\n\n        # Automatically fill common args between Transformers\n        # model and tokenizer\n        passed_common_kwargs = {}\n        for arg_name in _COMMON_TRANSFORMERS_KWARGS:\n            if arg_name in kwargs:\n                passed_common_kwargs[arg_name] = kwargs[arg_name]\n\n        # Create the tokenizer\n        if tokenizer is None:\n            if isinstance(model, str):\n                # Note: prioritize the fast tokenizer if available\n                tokenizer = cast(\n                    Union[\"PreTrainedTokenizer\", \"PreTrainedTokenizerFast\"],\n                    transformers_package.AutoTokenizer.from_pretrained(\n                        pretrained_model_name_or_path=model, use_fast=True, **kwargs\n                    ),\n                )\n            else:\n                raise ValueError(\"If no tokenizer is provided, a model name must be provided to load the tokenizer.\")\n        my_tokenizer = TransformersTokenizer(\n            hf_tokenizer=tokenizer,\n            chat_template=chat_template,\n        )\n        self._orig_tokenizer = tokenizer\n\n        super().__init__(\n            tokenizer=my_tokenizer,\n            enable_backtrack=enable_backtrack,\n            enable_ff_tokens=enable_ff_tokens,\n            enable_monitoring=enable_monitoring,\n            enable_token_probabilities=enable_token_probabilities,\n            enable_top_k=enable_top_k,\n            top_k=top_k,\n        )\n\n    def _model(self, model, **kwargs) -> \"PreTrainedModel\":\n        # intantiate the model if needed\n        if isinstance(model, str):\n            # make sure transformers is installed\n            if not has_transformers:\n                raise Exception(\n                    \"Please install transformers with `pip install transformers` in order to use guidance.models.Transformers!\"\n                )\n            model = transformers_package.AutoModelForCausalLM.from_pretrained(model, **kwargs)\n        return model\n\n    def get_logits(self, token_ids: list[int], include_all_uncached_tokens: bool = False) -> LogitsOutput:\n        \"\"\"Computes the logits for the given token state.\n\n        This overrides a method from the LocalEngine class that is used to get\n        inference results from the model.\n        \"\"\"\n\n        if len(token_ids) == 0:\n            raise ValueError(\"token_ids must contain some tokens.\")\n\n        # make sure we don't run off the end of the model's context\n        if len(token_ids) >= getattr(self.model_obj.config, \"max_position_embeddings\", 1e10):\n            raise Exception(\n                f\"Attempted to run a transformers model past its maximum context window size of {self.model_obj.config.max_position_embeddings}!\"\n            )\n\n        # check what we have already cached\n        num_cached = sum(takewhile(operator.truth, map(operator.eq, token_ids, self._cached_token_ids)))\n        if num_cached == len(token_ids):\n            if num_cached == len(self._cached_token_ids):\n                # last token input is the same as the last cached token, so return the last cached logits\n                return {\n                    \"logits\": self._cached_logits,\n                    \"n_tokens\": len(token_ids),\n                    \"n_cached\": num_cached,\n                }\n            # we need to pass at least one new token\n            num_cached = num_cached - 1\n\n        # determine how many tokens are currently stored in the KV cache\n        past_key_values = self._past_key_values\n        if past_key_values is None:\n            past_length = 0\n        elif isinstance(past_key_values, tuple):\n            past_length = past_key_values[0][0].size(-2)\n        elif isinstance(past_key_values, transformers_package.Cache):\n            past_length = past_key_values.get_seq_length()\n        else:\n            raise TypeError(f\"Unknown type of past_key_values: {type(past_key_values)}\")\n\n        # clear obsolete parts of kv cache\n        if past_length > num_cached:\n            if isinstance(past_key_values, tuple):\n                self._past_key_values = tuple(tuple(p[..., :num_cached, :] for p in v) for v in past_key_values)\n            else:\n                if hasattr(past_key_values, \"crop\"):\n                    self._past_key_values.crop(num_cached)\n                else:\n                    warnings.warn(\n                        f\"Cropping unsupported for cache type: {type(self._past_key_values)}. Resetting cache.\",\n                        stacklevel=1,\n                    )\n                    if hasattr(self._past_key_values, \"reset\"):\n                        # Use built-in reset method if available to avoid constructing/allocating a new cache\n                        self._past_key_values.reset()\n                    else:\n                        self._past_key_values = None\n                    # Our cache is no longer valid\n                    num_cached = 0\n            past_length = num_cached\n        elif past_length < num_cached:\n            # Should never happen, but just in case -- we're not using all of the cached tokens\n            # (because they're not really in the kv cache somehow)\n            num_cached = past_length\n\n        # eval the model\n        assert past_length <= len(token_ids)\n        new_token_ids = token_ids[past_length:]\n        assert len(new_token_ids) > 0\n        logits_for_each_batch: list[np.ndarray] = []\n        with torch.no_grad():\n            # Not all models support batched tokens for some reason\n            try:\n                model_out = self.model_obj(\n                    input_ids=torch.tensor(new_token_ids).unsqueeze(0).to(self.device),\n                    past_key_values=self._past_key_values,\n                    use_cache=True,\n                    position_ids=torch.arange(past_length, past_length + len(new_token_ids))\n                    .unsqueeze(0)\n                    .to(self.device),\n                    attention_mask=torch.ones(1, past_length + len(new_token_ids)).to(self.device),\n                    return_dict=True,\n                    output_attentions=False,\n                    output_hidden_states=False,\n                )\n                # Need to add special truncating logic here for weird models that have a different output size than tokenizer vocab\n                logits_for_each_batch.append(model_out.logits[0, :, : self.tokenizer._vocab_size].float().cpu().numpy())\n            except AssertionError:\n                for new_token_id in new_token_ids:\n                    input_ids = torch.tensor([new_token_id]).unsqueeze(0).to(self.device)\n\n                    model_out = self.model_obj(\n                        input_ids=input_ids,\n                        past_key_values=self._past_key_values,\n                        use_cache=True,\n                        position_ids=torch.arange(past_length, past_length + 1).unsqueeze(0).to(self.device),\n                        attention_mask=torch.ones(1, past_length + 1).to(self.device),\n                        return_dict=True,\n                        output_attentions=False,\n                        output_hidden_states=False,\n                    )\n\n                    self._past_key_values = model_out.past_key_values\n                    past_length += 1\n\n                    # Need to add special truncating logic here for weird models that have a different output size than tokenizer vocab\n                    logits_for_each_batch.append(\n                        model_out.logits[0, :, : self.tokenizer._vocab_size].float().cpu().numpy()\n                    )\n\n        # If our cached logits are valid, we can include them when we include_all_uncached_tokens\n        # this lets us give logits FOR the first uncached token, not just the logits that follow it,\n        last_cache_included = False\n        if self._cached_logits is not None and num_cached == len(self._cached_token_ids):\n            logits_for_each_batch = [self._cached_logits] + logits_for_each_batch\n            last_cache_included = True\n\n        # save the results\n        self._past_key_values = model_out.past_key_values\n        self._cached_token_ids = token_ids.copy()\n        self._cached_logits = logits_for_each_batch[-1][[-1], :]\n\n        if include_all_uncached_tokens:\n            logits = np.concatenate(logits_for_each_batch, axis=0)\n            if last_cache_included:\n                assert logits.shape[0] == len(token_ids) - num_cached + 1\n            else:\n                assert logits.shape[0] == len(token_ids) - num_cached\n        else:\n            logits = self._cached_logits\n        return {\n            \"logits\": logits,\n            \"n_tokens\": len(token_ids),\n            \"n_cached\": num_cached,\n        }\n\n\nclass Transformers(Model):\n    def __init__(\n        self,\n        model: Union[str, \"PreTrainedModel\"],\n        tokenizer: Union[\n            \"PreTrainedTokenizer\",\n            \"PreTrainedTokenizerFast\",\n            None,\n        ] = None,\n        interpreter_cls: type[EngineInterpreter] | None = None,\n        echo=True,\n        chat_template=None,\n        enable_backtrack=True,\n        enable_ff_tokens=True,\n        enable_monitoring=True,\n        sampling_params: SamplingParams | None = None,\n        **kwargs,\n    ):\n        \"\"\"Build a new Transformers model object that represents a model in a given state.\"\"\"\n        if interpreter_cls is None and isinstance(model, str):\n            if re.search(\"Llama-3.*-Vision\", model):\n                interpreter_cls = Llama3VisionInterpreter\n            elif re.search(\"Phi-3-vision\", model):\n                interpreter_cls = Phi3VisionInterpreter\n        if interpreter_cls is None:\n            interpreter_cls = EngineInterpreter\n\n        client = interpreter_cls(\n            TransformersEngine(\n                model,\n                tokenizer,\n                chat_template=chat_template,\n                enable_backtrack=enable_backtrack,\n                enable_ff_tokens=enable_ff_tokens,\n                enable_monitoring=enable_monitoring,\n                enable_token_probabilities=echo,\n                enable_top_k=echo,\n                **kwargs,\n            )\n        )\n        super().__init__(\n            interpreter=client,\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/broken_models/README.MD",
    "content": "These model files use an older version of guidance's internal API design, and need to be updated. They're kept here commented in the codebase solely as reference documentation to help with the migration. They cannot and should not be imported from this repository. "
  },
  {
    "path": "guidance/models/broken_models/_Gemini.py",
    "content": "# import os\n# from pathlib import Path\n# import multiprocessing\n# from itertools import takewhile\n# import operator\n# import threading\n# import numpy as np\n# import queue\n# import time\n# import tiktoken\n# import re\n\n# from ..vertexai._vertexai import (\n#     VertexAICompletion,\n#     VertexAIInstruct,\n#     VertexAIChat,\n#     VertexAIChatEngine,\n# )\n\n# _image_token_pattern = re.compile(r\"<\\|_image:(.*)\\|>\")\n\n# try:\n#     from vertexai.language_models import (\n#         TextGenerationModel,\n#         ChatModel,\n#         InputOutputTextPair,\n#     )\n#     from vertexai.preview.generative_models import GenerativeModel, Content, Part, Image\n#     import vertexai\n\n#     # def get_chat_response(message):\n#     #     vertexai.init(project=\"PROJECT_ID\", location=\"us-central1\")\n#     #     model = GenerativeModel(\"gemini-pro\")\n#     #     chat = model.start_chat()\n#     #     response = chat.send_message(message)\n#     #     return response.text\n\n#     # print(get_chat_response(\"Hello\"))\n#     # print(get_chat_response(\"What are all the colors in a rainbow?\"))\n#     # print(get_chat_response(\"Why does it appear when it rains?\"))\n#     is_vertexai = True\n# except ModuleNotFoundError:\n#     is_vertexai = False\n\n# # class GeminiCompletion(VertexAICompletion):\n# #     def __init__(self, model, tokenizer=None, echo=True, caching=True, temperature=0.0, max_streaming_tokens=None, **kwargs):\n\n# #         if isinstance(model, str):\n# #             self.model_name = model\n# #             self.model_obj = TextGenerationModel.from_pretrained(self.model_name)\n\n# #         # Gemini does not have a public tokenizer, so we pretend it tokenizes like gpt2...\n# #         if tokenizer is None:\n# #             tokenizer = tiktoken.get_encoding(\"gpt2\")\n\n# #         # the superclass does all the work\n# #         super().__init__(\n# #             model,\n# #             tokenizer=tokenizer,\n# #             echo=echo,\n# #             caching=caching,\n# #             temperature=temperature,\n# #             max_streaming_tokens=max_streaming_tokens,\n# #             **kwargs\n# #         )\n\n# # class GeminiInstruct(VertexAIInstruct):\n# #     def __init__(self, model, tokenizer=None, echo=True, caching=True, temperature=0.0, max_streaming_tokens=None, **kwargs):\n\n# #         if isinstance(model, str):\n# #             self.model_name = model\n# #             self.model_obj = TextGenerationModel.from_pretrained(self.model_name)\n\n# #         # Gemini does not have a public tokenizer, so we pretend it tokenizes like gpt2...\n# #         if tokenizer is None:\n# #             tokenizer = tiktoken.get_encoding(\"gpt2\")\n\n# #         # the superclass does all the work\n# #         super().__init__(\n# #             model,\n# #             tokenizer=tokenizer,\n# #             echo=echo,\n# #             caching=caching,\n# #             temperature=temperature,\n# #             max_streaming_tokens=max_streaming_tokens,\n# #             **kwargs\n# #         )\n\n\n# class GeminiChat(VertexAIChat):\n#     def __init__(\n#         self, model, tokenizer=None, echo=True, max_streaming_tokens=None, **kwargs\n#     ):\n#         if isinstance(model, str):\n#             model = GenerativeModel(model)\n\n#         # Gemini does not have a public tokenizer, so we pretend it tokenizes like gpt2...\n#         if tokenizer is None:\n#             tokenizer = tiktoken.get_encoding(\"gpt2\")\n\n#         # the superclass does all the work\n#         super().__init__(\n#             model,\n#             tokenizer=tokenizer,\n#             echo=echo,\n#             max_streaming_tokens=max_streaming_tokens,\n#             engine_class=GeminiChatEngine,\n#             **kwargs,\n#         )\n\n\n# class GeminiChatEngine(VertexAIChatEngine):\n#     def _start_chat(self, system_text, messages):\n#         assert (\n#             system_text == \"\"\n#         ), \"We don't support passing system text to Gemini models (yet?)!\"\n#         out = self.model_obj.start_chat(history=messages)\n#         return out\n\n#     def _start_generator(self, system_text, messages, temperature):\n#         # last_user_text = messages[-1][\"content\"]\n#         formated_messages = []\n#         for m in messages:\n#             raw_parts = _image_token_pattern.split(m[\"content\"])\n#             parts = []\n#             for i in range(0, len(raw_parts), 2):\n\n#                 # append the text portion\n#                 if len(raw_parts[i]) > 0:\n#                     parts.append(Part.from_text(raw_parts[i]))\n\n#                 # append any image\n#                 if i + 1 < len(raw_parts):\n#                     parts.append(\n#                         Part.from_image(Image.from_bytes(self[raw_parts[i + 1]]))\n#                     )\n#             formated_messages.append(Content(role=m[\"role\"], parts=parts))\n#         last_user_parts = (\n#             formated_messages.pop()\n#         )  # remove the last user stuff that goes in send_message (and not history)\n\n#         chat_session = self.model_obj.start_chat(\n#             history=formated_messages,\n#         )\n\n#         generation_config = {\"temperature\": temperature}\n#         if self.max_streaming_tokens is not None:\n#             generation_config[\"max_output_tokens\"] = self.max_streaming_tokens\n#         generator = chat_session.send_message(\n#             last_user_parts, generation_config=generation_config, stream=True\n#         )\n\n#         for chunk in generator:\n#             yield chunk.candidates[0].content.parts[0].text.encode(\"utf8\")\n"
  },
  {
    "path": "guidance/models/broken_models/_anthropic.py",
    "content": "# import os\n# import tiktoken\n\n# from .._engine._engine import Chat, Instruct\n# from .._grammarless import GrammarlessEngine, Grammarless\n\n\n# class AnthropicEngine(GrammarlessEngine):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer,\n#         api_key,\n#         timeout,\n#         max_streaming_tokens,\n#         compute_log_probs,\n#         **kwargs,\n#     ):\n#         try:\n#             from anthropic import Anthropic\n#         except ModuleNotFoundError:\n#             raise Exception(\n#                 \"Please install the anthropic package version >= 0.7 using `pip install anthropic -U` in order to use guidance.models.Anthropic!\"\n#             )\n\n#         if api_key is None:\n#             api_key = os.environ.get(\"ANTHROPIC_API_KEY\")\n\n#         if api_key is None:\n#             raise Exception(\n#                 \"Expected an api_key argument or the ANTHROPIC_API_KEY environment variable to be set!\"\n#             )\n\n#         self.anthropic = Anthropic(api_key=api_key, **kwargs)\n#         self.model_name = model\n\n#         # we pretend it tokenizes like gpt2 if tiktoken does not know about it... TODO: make this better\n#         if tokenizer is None:\n#             try:\n#                 tokenizer = tiktoken.encoding_for_model(model)\n#             except:\n#                 tokenizer = tiktoken.get_encoding(\"gpt2\")\n\n#         super().__init__(tokenizer, max_streaming_tokens, timeout, compute_log_probs)\n\n#     def _generator(self, prompt, temperature):\n\n#         # find the role tags\n#         pos = 0\n#         role_end = b\"<|im_end|>\\n\"\n#         messages = []\n#         found = True\n#         system_prompt = None # Not mandatory, but we'll store it if found\n#         while found:\n\n#             # find the role text blocks\n#             found = False\n#             for role_name, start_bytes in (\n#                 (\"system\", b\"<|im_start|>system\\n\"),\n#                 (\"user\", b\"<|im_start|>user\\n\"),\n#                 (\"assistant\", b\"<|im_start|>assistant\\n\"),\n#             ):\n#                 if prompt[pos:].startswith(start_bytes):\n#                     pos += len(start_bytes)\n#                     end_pos = prompt[pos:].find(role_end)\n#                     if end_pos < 0:\n#                         assert (\n#                             role_name == \"assistant\"\n#                         ), \"Bad chat format! Last role before gen needs to be assistant!\"\n#                         break\n#                     btext = prompt[pos : pos + end_pos]\n#                     pos += end_pos + len(role_end)\n#                     if role_name == \"system\":\n#                         system_prompt = btext.decode(\"utf8\")\n#                     else:\n#                         messages.append(\n#                             {\"role\": role_name, \"content\": btext.decode(\"utf8\")}\n#                         )\n#                     found = True\n#                     break\n\n#         # Add nice exception if no role tags were used in the prompt.\n#         # TODO: Move this somewhere more general for all chat models?\n#         if messages == []:\n#             raise ValueError(\n#                 f\"The AnthropicAI model {self.model_name} is a Chat-based model and requires role tags in the prompt! \\\n#             Make sure you are using guidance context managers like `with system():`, `with user():` and `with assistant():` \\\n#             to appropriately format your guidance program for this type of model.\"\n#             )\n\n#         # update our shared data state\n#         self._reset_shared_data(prompt, temperature)\n\n#         # API call and response handling\n#         try:\n#             # Need to do this because Anthropic API is a bit weird with the system keyword...\n#             model_kwargs = dict(\n#                 model=self.model_name,\n#                 messages=messages,\n#                 max_tokens=self.max_streaming_tokens,\n#                 temperature=temperature,\n#             )\n#             if system_prompt is not None:\n#                 model_kwargs[\"system\"] = system_prompt\n#             generator = self.anthropic.messages.stream(\n#                 **model_kwargs,\n#             )\n#         except Exception as e:  # TODO: add retry logic\n#             raise e\n\n#         with generator as stream:\n#             for chunk in stream.text_stream:\n#                 # print(chunk)\n#                 yield chunk.encode(\"utf8\")\n\n\n# class Anthropic(Grammarless):\n#     \"\"\"Represents an Anthropic model as exposed through their remote API.\n\n#     Note that because this uses a remote API endpoint without built-in guidance support\n#     there are some things we cannot do, like force the model to follow a pattern inside\n#     a chat role block.\n#     \"\"\"\n\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer=None,\n#         echo=True,\n#         api_key=None,\n#         timeout=0.5,\n#         max_streaming_tokens=1000,\n#         compute_log_probs=False,\n#         **kwargs,\n#     ):\n#         \"\"\"Build a new Anthropic model object that represents a model in a given state.\"\"\"\n\n#         super().__init__(\n#             engine=AnthropicEngine(\n#                 model=model,\n#                 tokenizer=tokenizer,\n#                 api_key=api_key,\n#                 max_streaming_tokens=max_streaming_tokens,\n#                 timeout=timeout,\n#                 compute_log_probs=compute_log_probs,\n#                 **kwargs,\n#             ),\n#             echo=echo,\n#         )\n"
  },
  {
    "path": "guidance/models/broken_models/_azure_openai.py",
    "content": "# import pathlib\n\n# from typing import Union\n# from urllib.parse import parse_qs, urlparse\n\n# import tiktoken\n\n# from .._grammarless import Grammarless\n# from .._engine._engine import Chat, Instruct\n# from .._openai import OpenAIEngine\n\n# try:\n#     import openai as openai_package\n\n#     is_openai = True\n# except ModuleNotFoundError:\n#     is_openai = False\n\n\n# class AzureOpenAI(Grammarless):\n#     \"\"\"Represents an Azure OpenAI model as exposed through their remote API.\n\n#     Note that because this uses a remote API endpoint without built-in guidance support\n#     there are some things we cannot do, like force the model to follow a pattern inside\n#     a chat role block.\n\n#     Authentication can be provided via an `api_key` or through Entra/Azure Active\n#     Directory.\n#     \"\"\"\n\n#     def __init__(\n#         self,\n#         model: str,\n#         azure_endpoint: str,\n#         azure_deployment: Union[str, None] = None,\n#         azure_ad_token_provider=None,\n#         api_key: Union[str, None] = None,\n#         tokenizer=None,\n#         echo: bool = True,\n#         version: Union[str, None] = None,\n#         max_streaming_tokens: int = 1000,\n#         timeout: float = 0.5,\n#         compute_log_probs: bool = False,\n#         **kwargs,\n#     ):\n#         \"\"\"Build a new AzureOpenAI model object that represents a model in a given state.\n\n#         Parameters\n#         ----------\n#         model : str\n#             The name of the OpenAI model to use (e.g. gpt-3.5-turbo).\n#         azure_endpoint: str\n#             The endpoint of the deployed model (e.g. https://my_azureai_instance.openai.azure.com)\n#         azure_deployment: str\n#             The deployed name of the model (given when the deployment was created)\n#         api_key: str\n#             The API key for calling the model\n#         azure_ad_token_provider:\n#             Alternative to the api_key, allows for use of Azure Entra authentication\n#         \"\"\"\n#         if not is_openai or not hasattr(openai_package, \"OpenAI\"):\n#             raise ImportError(\n#                 \"Please install the openai package version >= 1 using `pip install openai -U` \"\n#                 \"in order to use guidance.models.OpenAI!\"\n#             )\n\n#         if api_key is None and azure_ad_token_provider is None:\n#             raise ValueError(\"Please provide either api_key or azure_ad_token_provider\")\n\n#         parsed_url = urlparse(azure_endpoint)\n\n#         if azure_deployment is None:\n#             parts = pathlib.Path(parsed_url.path).parts\n#             if len(parts) > 2:\n#                 azure_deployment = parts[3]\n\n#         parsed_query = parse_qs(parsed_url.query)\n#         api_version = (\n#             version if \"api-version\" not in parsed_query else parsed_query[\"api-version\"][0]\n#         )\n\n#         if tokenizer is None:\n#             tokenizer = tiktoken.encoding_for_model(model)\n\n#         engine_instance = OpenAIEngine(\n#             tokenizer=tokenizer,\n#             max_streaming_tokens=max_streaming_tokens,\n#             timeout=timeout,\n#             compute_log_probs=compute_log_probs,\n#             model=model,\n#             azure_endpoint=f\"{parsed_url.scheme}://{parsed_url.netloc}\",\n#             api_key=api_key,\n#             azure_ad_token_provider=azure_ad_token_provider,\n#             api_version=api_version,\n#             azure_deployment=azure_deployment,\n#             client_class=openai_package.AzureOpenAI,\n#             **kwargs,\n#         )\n\n#         super().__init__(\n#             engine_instance,\n#             echo=echo,\n#         )\n"
  },
  {
    "path": "guidance/models/broken_models/_azureai_studio.py",
    "content": "# import hashlib\n# import pathlib\n# import urllib.parse\n\n# import diskcache as dc\n# import platformdirs\n# import requests\n\n# from .._engine._engine import Chat\n# from .._grammarless import GrammarlessEngine, Grammarless\n\n\n# try:\n#     import openai\n\n#     is_openai = True\n# except ModuleNotFoundError:\n#     is_openai = False\n\n\n# class AzureAIStudioChatEngine(GrammarlessEngine):\n#     def __init__(\n#         self,\n#         *,\n#         tokenizer,\n#         max_streaming_tokens: int,\n#         timeout: float,\n#         compute_log_probs: bool,\n#         azureai_studio_endpoint: str,\n#         azureai_model_deployment: str,\n#         azureai_studio_key: str,\n#         clear_cache: bool,\n#     ):\n#         endpoint_parts = urllib.parse.urlparse(azureai_studio_endpoint)\n#         if endpoint_parts.path == \"/score\":\n#             self._is_openai_compatible = False\n#             self._endpoint = azureai_studio_endpoint\n#         else:\n#             if not is_openai:\n#                 raise ValueError(\n#                     \"Detected OpenAI compatible model; please install openai package\"\n#                 )\n#             self._is_openai_compatible = True\n#             self._endpoint = f\"{endpoint_parts.scheme}://{endpoint_parts.hostname}\"\n#         self._deployment = azureai_model_deployment\n#         self._api_key = azureai_studio_key\n\n#         # There is a cache... better make sure it's specific\n#         # to the endpoint and deployment\n#         deployment_id = self._hash_prompt(self._endpoint + self._deployment)\n\n#         path = (\n#             pathlib.Path(platformdirs.user_cache_dir(\"guidance\"))\n#             / f\"azureaistudio.tokens.{deployment_id}\"\n#         )\n#         self.cache = dc.Cache(path)\n#         if clear_cache:\n#             self.cache.clear()\n\n#         super().__init__(tokenizer, max_streaming_tokens, timeout, compute_log_probs)\n\n#     def _hash_prompt(self, prompt):\n#         # Copied from OpenAIChatEngine\n#         return hashlib.sha256(f\"{prompt}\".encode()).hexdigest()\n\n#     def _generator(self, prompt: bytes, temperature: float):\n#         # Initial parts of this straight up copied from OpenAIChatEngine\n\n#         # The next loop (or one like it) appears in several places,\n#         # and quite possibly belongs in a library function or superclass\n#         # That said, I'm not _completely sure that there aren't subtle\n#         # differences between the various versions\n\n#         assert isinstance(prompt, bytes)\n\n#         # find the role tags\n#         pos = 0\n#         input_token_count = 0\n#         role_end = b\"<|im_end|>\"\n#         messages = []\n#         found = True\n#         while found:\n\n#             # find the role text blocks\n#             found = False\n#             for role_name, start_bytes in (\n#                 (\"system\", b\"<|im_start|>system\\n\"),\n#                 (\"user\", b\"<|im_start|>user\\n\"),\n#                 (\"assistant\", b\"<|im_start|>assistant\\n\"),\n#             ):\n#                 if prompt[pos:].startswith(start_bytes):\n#                     pos += len(start_bytes)\n#                     end_pos = prompt[pos:].find(role_end)\n#                     if end_pos < 0:\n#                         assert (\n#                             role_name == \"assistant\"\n#                         ), \"Bad chat format! Last role before gen needs to be assistant!\"\n#                         break\n#                     btext = prompt[pos : pos + end_pos]\n#                     pos += end_pos + len(role_end)\n#                     message_content = btext.decode(\"utf8\")\n#                     input_token_count += len(self.tokenizer.encode(btext))\n#                     messages.append({\"role\": role_name, \"content\": message_content})\n#                     found = True\n#                     break\n\n#         # Add nice exception if no role tags were used in the prompt.\n#         # TODO: Move this somewhere more general for all chat models?\n#         if messages == []:\n#             raise ValueError(\n#                 f\"The model is a Chat-based model and requires role tags in the prompt! \\\n#             Make sure you are using guidance context managers like `with system():`, `with user():` and `with assistant():` \\\n#             to appropriately format your guidance program for this type of model.\"\n#             )\n\n#         # Update shared data state\n#         self._reset_shared_data(prompt[:pos], temperature)\n\n#         # Use cache only when temperature is 0\n#         if temperature == 0:\n#             cache_key = self._hash_prompt(prompt)\n\n#             # Check if the result is already in the cache\n#             if cache_key in self.cache:\n#                 for chunk in self.cache[cache_key]:\n#                     yield chunk\n#                 return\n\n#         # Call the actual API and extract the next chunk\n#         if self._is_openai_compatible:\n#             client = openai.OpenAI(api_key=self._api_key, base_url=self._endpoint)\n#             response = client.chat.completions.create(\n#                 model=self._deployment,\n#                 messages=messages,  # type: ignore[arg-type]\n#                 # max_tokens=self.max_streaming_tokens,\n#                 n=1,\n#                 top_p=1.0,  # TODO: this should be controllable like temp (from the grammar)\n#                 temperature=temperature,\n#                 # stream=True,\n#             )\n\n#             result = response.choices[0]\n#             chunk = result.message.content\n#             encoded_chunk = chunk.encode(\"utf8\")  # type: ignore[union-attr]\n\n#             # Non-streaming OpenAI call, so we can just get the metrics directly\n#             if response.usage is not None:\n#                 self.metrics.engine_input_tokens += response.usage.prompt_tokens\n#                 self.metrics.engine_output_tokens += response.usage.completion_tokens\n#         else:\n#             parameters = dict(temperature=temperature)\n#             payload = dict(\n#                 input_data=dict(input_string=messages, parameters=parameters)\n#             )\n\n#             headers = {\n#                 \"Content-Type\": \"application/json\",\n#                 \"Authorization\": (\"Bearer \" + self._api_key),\n#                 \"azureml-model-deployment\": self._deployment,\n#             }\n#             response_score = requests.post(\n#                 self._endpoint,\n#                 json=payload,\n#                 headers=headers,\n#             )\n\n#             result_score = response_score.json()\n\n#             chunk = result_score[\"output\"]\n#             encoded_chunk = chunk.encode(\"utf8\")\n#             self.metrics.engine_input_tokens += input_token_count\n#             self.metrics.engine_output_tokens += len(\n#                 self.tokenizer.encode(encoded_chunk)\n#             )\n\n#         # Now back to OpenAIChatEngine, with slight modifications since\n#         # this isn't a streaming API\n#         if temperature == 0:\n#             cached_results = []\n\n#         yield encoded_chunk\n\n#         if temperature == 0:\n#             cached_results.append(encoded_chunk)\n\n#         # Cache the results after the generator is exhausted\n#         if temperature == 0:\n#             self.cache[cache_key] = cached_results\n\n\n# class AzureAIStudioChat(Grammarless, Chat):\n#     def __init__(\n#         self,\n#         azureai_studio_endpoint: str,\n#         azureai_studio_deployment: str,\n#         azureai_studio_key: str,\n#         tokenizer=None,\n#         echo: bool = True,\n#         max_streaming_tokens: int = 1000,\n#         timeout: float = 0.5,\n#         compute_log_probs: bool = False,\n#         clear_cache: bool = False,\n#     ):\n#         \"\"\"Create a model object for interacting with Azure AI Studio chat endpoints.\n\n#         The required information about the deployed endpoint can\n#         be obtained from Azure AI Studio.\n\n#         A `diskcache`-based caching system is used to speed up\n#         repeated calls when the temperature is specified to be\n#         zero.\n\n#         Parameters\n#         ----------\n#         azureai_studio_endpoint : str\n#             The HTTPS endpoint deployed by Azure AI Studio\n#         azureai_studio_deployment : str\n#             The specific model deployed to the endpoint\n#         azureai_studio_key : str\n#             The key required for access to the API\n#         clear_cache : bool\n#             Whether to empty the internal cache\n#         \"\"\"\n#         super().__init__(\n#             AzureAIStudioChatEngine(\n#                 azureai_studio_endpoint=azureai_studio_endpoint,\n#                 azureai_model_deployment=azureai_studio_deployment,\n#                 azureai_studio_key=azureai_studio_key,\n#                 tokenizer=tokenizer,\n#                 max_streaming_tokens=max_streaming_tokens,\n#                 timeout=timeout,\n#                 compute_log_probs=compute_log_probs,\n#                 clear_cache=clear_cache,\n#             ),\n#             echo=echo,\n#         )\n"
  },
  {
    "path": "guidance/models/broken_models/_cohere.py",
    "content": "# from ._lite_llm import LiteLLMEngine, LiteLLM, LiteLLMCompletion, LiteLLMInstruct\n\n\n# class Cohere(LiteLLM):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer=None,\n#         echo=True,\n#         timeout=0.5,\n#         compute_log_probs=False,\n#         max_streaming_tokens=1000,\n#     ):\n#         \"\"\"Build a new Anthropic model object that represents a model in a given state.\"\"\"\n#         try:\n#             import tokenizers\n#         except ModuleNotFoundError:\n#             raise Exception(\n#                 \"Please install the HuggingFace tokenizers package using `pip install tokenizers -U` in order to use guidance.models.Cohere!\"\n#             )\n\n#         # get the tokenizer\n#         if tokenizer is None:\n#             try:\n#                 tokenizer = tokenizers.Tokenizer.from_pretrained(\"Cohere/\" + model)\n#             except:\n#                 tokenizer = tokenizers.Tokenizer.from_pretrained(\n#                     \"Cohere/command-nightly\"\n#                 )\n\n#         super().__init__(\n#             model,\n#             tokenizer=tokenizer,\n#             echo=echo,\n#             timeout=timeout,\n#             max_streaming_tokens=max_streaming_tokens,\n#             compute_log_probs=compute_log_probs,\n#         )\n\n\n# class CohereCompletion(Cohere, LiteLLMCompletion):\n#     pass\n\n\n# class CohereInstruct(Cohere, LiteLLMInstruct):\n#     pass\n"
  },
  {
    "path": "guidance/models/broken_models/_googleai.py",
    "content": "# import re\n# from .._engine._engine import Chat, Instruct\n# from .._grammarless import Grammarless, GrammarlessEngine\n# import tiktoken\n# import os\n\n# try:\n#     import google.generativeai as genai\n\n#     has_genai = True\n# except ImportError:\n#     has_genai = False\n\n\n# _image_token_pattern = re.compile(r\"<\\|_image:(.*)\\|>\")\n\n\n# class GoogleAIEngine(GrammarlessEngine):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer,\n#         api_key,\n#         max_streaming_tokens,\n#         timeout,\n#         compute_log_probs,\n#         **kwargs,\n#     ):\n#         if not has_genai:\n#             raise Exception(\n#                 \"Please install the Google AI Studio(makersuite.google.com) package using `pip install google-generativeai google-ai-generativelanguage` in order to use guidance.models.GoogleAI!\"\n#             )\n\n#         assert (\n#             not compute_log_probs\n#         ), \"We don't support compute_log_probs=True yet for GoogleAIEngine!\"\n\n#         if api_key is None:\n#             api_key = os.environ.get(\"GOOGLEAI_API_KEY\")\n\n#         genai.configure(api_key=api_key)\n\n#         # Gemini does not have a public tokenizer, so we pretend it tokenizes like gpt2...\n#         if tokenizer is None:\n#             tokenizer = tiktoken.get_encoding(\"gpt2\")\n#         self.model_name = model\n\n#         self.model_obj = genai.GenerativeModel(self.model_name, **kwargs)\n\n#         super().__init__(tokenizer, max_streaming_tokens, timeout, compute_log_probs)\n\n\n# class GoogleAI(Grammarless):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer=None,\n#         echo=True,\n#         api_key=None,\n#         max_streaming_tokens=None,\n#         timeout=0.5,\n#         compute_log_probs=False,\n#         **kwargs,\n#     ):\n#         \"\"\"Build a new GoogleAI model object that represents a model in a given state.\"\"\"\n\n#         # if we are called directly (as opposed to through super()) then we convert ourselves to a more specific subclass if possible\n#         if self.__class__ is GoogleAI:\n#             found_subclass = None\n\n#             # chat\n#             found_subclass = GoogleAIChat  # we assume all models are chat right now\n\n#             # instruct\n#             # elif \"instruct\" in model:\n#             #     found_subclass = GoogleAIInstruct\n\n#             # # regular completion\n#             # else:\n#             #     found_subclass = GoogleAICompletion\n\n#             # convert to any found subclass\n#             self.__class__ = found_subclass\n#             found_subclass.__init__(\n#                 self,\n#                 model,\n#                 tokenizer=None,\n#                 echo=True,\n#                 api_key=api_key,\n#                 max_streaming_tokens=max_streaming_tokens,\n#                 timeout=timeout,\n#                 compute_log_probs=False,\n#                 **kwargs,\n#             )\n#             return  # we return since we just ran init above and don't need to run again\n\n#         # this allows us to use a single constructor for all our subclasses\n#         engine_map = {GoogleAIChat: GoogleAIChatEngine}\n\n#         super().__init__(\n#             engine=engine_map[self.__class__](\n#                 model=model,\n#                 tokenizer=tokenizer,\n#                 api_key=api_key,\n#                 max_streaming_tokens=max_streaming_tokens,\n#                 timeout=timeout,\n#                 compute_log_probs=compute_log_probs,\n#                 **kwargs,\n#             ),\n#             echo=echo,\n#         )\n\n\n# class GoogleAIChatEngine(GoogleAIEngine):\n#     def _generator(self, prompt, temperature):\n\n#         # find the system text\n#         pos = 0\n#         system_start = b\"<|im_start|>system\\n\"\n#         user_start = b\"<|im_start|>user\\n\"\n#         assistant_start = b\"<|im_start|>assistant\\n\"\n#         role_end = b\"<|im_end|>\"\n#         # system_start_pos = prompt.startswith(system_start)\n\n#         # find the system text\n#         system_text = b\"\"\n#         if prompt.startswith(system_start):\n#             pos += len(system_start)\n#             system_end_pos = prompt.find(role_end)\n#             system_text = prompt[pos:system_end_pos]\n#             pos = system_end_pos + len(role_end)\n\n#         # find the user/assistant pairs\n#         messages = []\n#         valid_end = False\n#         while True:\n\n#             # find the user text\n#             if prompt[pos:].startswith(user_start):\n#                 pos += len(user_start)\n#                 end_pos = prompt[pos:].find(role_end)\n#                 if end_pos < 0:\n#                     break\n#                 messages.append(\n#                     dict(\n#                         role=\"user\",\n#                         content=prompt[pos : pos + end_pos].decode(\"utf8\"),\n#                     )\n#                 )\n#                 pos += end_pos + len(role_end)\n#             elif prompt[pos:].startswith(assistant_start):\n#                 pos += len(assistant_start)\n#                 end_pos = prompt[pos:].find(role_end)\n#                 if end_pos < 0:\n#                     valid_end = True\n#                     break\n#                 messages.append(\n#                     dict(\n#                         role=\"model\",\n#                         content=prompt[pos : pos + end_pos].decode(\"utf8\"),\n#                     )\n#                 )\n#                 pos += end_pos + len(role_end)\n#             else:\n#                 raise Exception(\n#                     \"It looks like your prompt is not a well formed chat prompt! Please enclose all model state appends inside chat role blocks like `user()` or `assistant()`.\"\n#                 )\n\n#         self._data = prompt[:pos]\n\n#         assert len(messages) > 0, \"Bad chat format! No chat blocks were defined.\"\n#         assert (\n#             messages[-1][\"role\"] == \"user\"\n#         ), \"Bad chat format! There must be a user() role before the last assistant() role.\"\n#         assert valid_end, \"Bad chat format! You must generate inside assistant() roles.\"\n\n#         # TODO: don't make a new session on every call\n#         # last_user_text = messages.pop().content\n\n#         return self._start_generator(system_text.decode(\"utf8\"), messages, temperature)\n\n#         # kwargs = {}\n#         # if self.max_streaming_tokens is not None:\n#         #     kwargs[\"max_output_tokens\"] = self.max_streaming_tokens\n#         # generator = chat_session.send_message_streaming(last_user_text, temperature=temperature, **kwargs)\n\n#         # for chunk in generator:\n#         #     yield chunk.text.encode(\"utf8\")\n\n#     def _start_chat(self, system_text, messages):\n#         assert (\n#             system_text == \"\"\n#         ), \"We don't support passing system text to Gemini models (yet?)!\"\n#         out = self.model_obj.start_chat(history=messages)\n#         return out\n\n#     def _start_generator(self, system_text, messages, temperature):\n#         from google.ai.generativelanguage import Content, Part, Blob\n\n#         # last_user_text = messages[-1][\"content\"]\n#         formated_messages = []\n#         for m in messages:\n#             raw_parts = _image_token_pattern.split(m[\"content\"])\n#             parts = []\n#             for i in range(0, len(raw_parts), 2):\n\n#                 # append the text portion\n#                 if len(raw_parts[i]) > 0:\n#                     parts.append(Part(text=raw_parts[i]))\n\n#                 # append any image\n#                 if i + 1 < len(raw_parts):\n#                     # parts.append(Part.from_image(Image.from_bytes(self[raw_parts[i+1]])))\n#                     parts.append(\n#                         Part(\n#                             inline_data=Blob(\n#                                 mime_type=\"image/jpeg\", data=self[raw_parts[i + 1]]\n#                             )\n#                         )\n#                     )\n#             formated_messages.append(Content(role=m[\"role\"], parts=parts))\n#         last_user_parts = (\n#             formated_messages.pop()\n#         )  # remove the last user stuff that goes in send_message (and not history)\n\n#         chat_session = self.model_obj.start_chat(\n#             history=formated_messages,\n#         )\n\n#         generation_config = {\"temperature\": temperature}\n#         if self.max_streaming_tokens is not None:\n#             generation_config[\"max_output_tokens\"] = self.max_streaming_tokens\n#         generator = chat_session.send_message(\n#             last_user_parts, generation_config=generation_config, stream=True\n#         )\n\n#         for chunk in generator:\n#             yield chunk.candidates[0].content.parts[0].text.encode(\"utf8\")\n\n\n# class GoogleAIChat(GoogleAI, Chat):\n#     pass\n"
  },
  {
    "path": "guidance/models/broken_models/_lite_llm.py",
    "content": "# import tiktoken\n\n# from .._engine._engine import Chat, Instruct\n# from .._grammarless import GrammarlessTokenizer, GrammarlessEngine, Grammarless\n\n\n# class LiteLLMEngine(GrammarlessEngine):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer,\n#         timeout,\n#         compute_log_probs,\n#         max_streaming_tokens,\n#         **kwargs,\n#     ):\n#         try:\n#             import litellm\n#         except ModuleNotFoundError:\n#             raise Exception(\n#                 \"Please install the litellm package version >= 1.7 using `pip install litellm -U` in order to use guidance.models.LiteLLM!\"\n#             )\n\n#         self.litellm = litellm\n\n#         # self.client = openai_package.OpenAI(api_key=api_key, organization=organization, base_url=base_url)\n#         self.model_name = model\n\n#         # we pretend it tokenizes like gpt2 if tiktoken does not know about it... TODO: make this better\n#         if tokenizer is None:\n#             try:\n#                 tokenizer = tiktoken.encoding_for_model(model)\n#             except:\n#                 tokenizer = tiktoken.get_encoding(\"gpt2\")\n\n#         super().__init__(\n#             tokenizer,\n#             max_streaming_tokens=max_streaming_tokens,\n#             timeout=timeout,\n#             compute_log_probs=compute_log_probs,\n#         )\n\n\n# class LiteLLM(Grammarless):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer=None,\n#         echo=True,\n#         timeout=0.5,\n#         max_streaming_tokens=1000,\n#         compute_log_probs=False,\n#     ):\n#         \"\"\"Build a new LiteLLM model object that represents a model in a given state.\"\"\"\n\n#         # if we are called directly (as opposed to through super()) then we convert ourselves to a more specific subclass if possible\n#         if self.__class__ is LiteLLM:\n#             raise Exception(\n#                 \"The LightLLM class is not meant to be used directly! Please use LiteLLMChat, LiteLLMInstruct, or LiteLLMCompletion depending on the model you are using.\"\n#             )\n\n#         # this allows us to use a single constructor for all our subclasses\n#         engine_map = {\n#             LiteLLMCompletion: LiteLLMCompletionEngine,\n#             LiteLLMInstruct: LiteLLMInstructEngine,\n#             LiteLLMChat: LiteLLMChatEngine,\n#         }\n\n#         for k in engine_map:\n#             if issubclass(self.__class__, k):\n#                 super().__init__(\n#                     engine_map[k](\n#                         model,\n#                         tokenizer,\n#                         timeout,\n#                         compute_log_probs,\n#                         max_streaming_tokens,\n#                     ),\n#                     echo=echo,\n#                 )\n\n\n# class LiteLLMCompletion(LiteLLM):\n#     pass\n\n\n# class LiteLLMCompletionEngine(LiteLLMEngine):\n\n#     def _generator(self, prompt, temperature):\n\n#         # update our shared data state\n#         self._reset_shared_data(prompt, temperature)\n\n#         try:\n#             generator = self.litellm.completion(\n#                 model=self.model_name,\n#                 messages=[\n#                     {\"content\": prompt.decode(\"utf8\"), \"role\": \"system\"}\n#                 ],  # note that role=system is just ignored by litellm but used by them to match chat syntax\n#                 max_tokens=self.max_streaming_tokens,\n#                 n=1,\n#                 top_p=1,\n#                 temperature=temperature,\n#                 stream=True,\n#             )\n#         except Exception as e:  # TODO: add retry logic\n#             raise e\n\n#         for part in generator:\n#             chunk = part.choices[0].delta.content or \"\"\n#             yield chunk.encode(\"utf8\")\n\n\n# class LiteLLMInstruct(LiteLLM, Instruct):\n#     def get_role_start(self, name):\n#         return \"\"\n\n#     def get_role_end(self, name):\n#         if name == \"instruction\":\n#             return \"<|endofprompt|>\"\n#         else:\n#             raise Exception(\n#                 f\"The LiteLLMInstruct model does not know about the {name} role type!\"\n#             )\n\n\n# class LiteLLMInstructEngine(LiteLLMEngine):\n\n#     def _generator(self, prompt, temperature):\n#         # start the new stream\n#         prompt_end = prompt.find(b\"<|endofprompt|>\")\n#         if prompt_end >= 0:\n#             stripped_prompt = prompt[:prompt_end]\n#         else:\n#             raise Exception(\n#                 \"This model cannot handle prompts that don't match the instruct format!\"\n#             )\n\n#         # make sure you don't try and instruct the same model twice\n#         if b\"<|endofprompt|>\" in prompt[prompt_end + len(b\"<|endofprompt|>\") :]:\n#             raise Exception(\n#                 \"This model has been given two separate instruct blocks, but this is not allowed!\"\n#             )\n\n#         # update our shared data state\n#         self._reset_shared_data(stripped_prompt + b\"<|endofprompt|>\", temperature)\n\n#         try:\n#             generator = self.litellm.completion(\n#                 model=self.model_name,\n#                 messages=[\n#                     {\"content\": self._data.decode(\"utf8\"), \"role\": \"system\"}\n#                 ],  # note that role=system is just ignored by litellm but used by them to match chat syntax\n#                 prompt=self._data.decode(\"utf8\"),\n#                 max_tokens=self.max_streaming_tokens,\n#                 n=1,\n#                 top_p=1,\n#                 temperature=temperature,\n#                 stream=True,\n#             )\n#         except Exception as e:  # TODO: add retry logic\n#             raise e\n\n#         for part in generator:\n#             chunk = part.choices[0].delta.content or \"\"\n#             yield chunk.encode(\"utf8\")\n\n\n# class LiteLLMChat(LiteLLM, Chat):\n#     pass\n\n\n# class LiteLLMChatEngine(LiteLLMEngine):\n#     def _generator(self, prompt, temperature):\n\n#         # find the system text\n#         pos = 0\n#         role_end = b\"<|im_end|>\"\n\n#         # find the user/assistant pairs\n#         messages = []\n#         found = True\n#         while found:\n\n#             # find the user text\n#             found = False\n#             for role_name, start_bytes in (\n#                 (\"system\", b\"<|im_start|>system\\n\"),\n#                 (\"user\", b\"<|im_start|>user\\n\"),\n#                 (\"assistant\", b\"<|im_start|>assistant\\n\"),\n#             ):\n#                 if prompt[pos:].startswith(start_bytes):\n#                     pos += len(start_bytes)\n#                     end_pos = prompt[pos:].find(role_end)\n#                     if end_pos < 0:\n#                         assert (\n#                             role_name == \"assistant\"\n#                         ), \"Bad chat format! Last role before gen needs to be assistant!\"\n#                         break\n#                     btext = prompt[pos : pos + end_pos]\n#                     pos += end_pos + len(role_end)\n#                     messages.append(\n#                         {\"role\": role_name, \"content\": btext.decode(\"utf8\")}\n#                     )\n#                     found = True\n#                     break\n\n#         # update our shared data state\n#         self._reset_shared_data(prompt[:pos], temperature)\n\n#         try:\n#             generator = self.litellm.completion(\n#                 model=self.model_name,\n#                 messages=messages,\n#                 max_tokens=self.max_streaming_tokens,\n#                 n=1,\n#                 top_p=1,\n#                 temperature=temperature,\n#                 stream=True,\n#             )\n#         except Exception as e:  # TODO: add retry logic\n#             raise e\n\n#         for part in generator:\n#             chunk = part.choices[0].delta.content or \"\"\n#             yield chunk.encode(\"utf8\")\n"
  },
  {
    "path": "guidance/models/broken_models/_togetherai.py",
    "content": "# import os\n# from .._engine._engine import Chat, Instruct\n# from .._openai import (\n#     OpenAI,\n#     OpenAIEngine,\n# )\n# from ..transformers import TransformersTokenizer\n\n\n# class TogetherAI(OpenAI):\n#     def __init__(\n#         self,\n#         model,\n#         tokenizer=None,\n#         echo=True,\n#         api_key=None,\n#         max_streaming_tokens=1000,\n#         timeout=0.5,\n#         compute_log_probs=False,\n#         engine_class=None,\n#         **kwargs,\n#     ):\n#         \"\"\"\n#         Build a new TogetherAI model object that represents a model in a given state.\n#         \"\"\"\n\n#         tokenizer = TransformersTokenizer(\n#             model=model, tokenizer=tokenizer, ignore_bos_token=True\n#         )\n\n#         # Default base_url is the together.ai endpoint\n#         if not \"base_url\" in kwargs:\n#             kwargs[\"base_url\"] = \"https://api.together.xyz\"\n#         # TogetherAI uses TOGETHERAI_API_KEY env value instead of OPENAI_API_KEY\n#         # We pass explicitly to avoid OpenAI class complaining about a missing key\n#         if api_key is None:\n#             api_key = os.environ.get(\"TOGETHERAI_API_KEY\", None)\n#         if api_key is None:\n#             raise Exception(\n#                 \"The api_key client option must be set either by passing api_key to the client or by setting the TOGETHERAI_API_KEY environment variable\"\n#             )\n\n#         if engine_class is None:\n#             engine_map = {\n#                 TogetherAICompletion: OpenAIEngine,\n#                 TogetherAIInstruct: OpenAIEngine,\n#                 TogetherAIChat: OpenAIEngine,\n#                 TogetherAI: OpenAIEngine,\n#             }\n#             for k in engine_map:\n#                 if issubclass(self.__class__, k):\n#                     engine_class = engine_map[k]\n#                     break\n\n#         super().__init__(\n#             model,\n#             tokenizer,\n#             echo,\n#             api_key,\n#             max_streaming_tokens,\n#             timeout,\n#             compute_log_probs,\n#             engine_class,\n#             **kwargs,\n#         )\n\n\n# class TogetherAICompletion(TogetherAI):\n#     pass\n\n\n# class TogetherAIInstruct(TogetherAI, Instruct):\n#     \"\"\"\n#     Utilizes chat endpoints to simulate a single instruction query\n#     together.ai will format in correct prompt template for model on their end\n#     \"\"\"\n\n#     def get_role_start(self, name):\n#         if name == \"instruction\":\n#             return \"<|im_start|>user\\n\"\n#         else:\n#             raise Exception(\n#                 f\"The TogetherAIInstruct model does not know about the {name} role type!\"\n#             )\n\n#     def get_role_end(self, name):\n#         if name == \"instruction\":\n#             return \"<|im_end|>\"\n#         else:\n#             raise Exception(\n#                 f\"The TogetherAIInstruct model does not know about the {name} role type!\"\n#             )\n\n\n# class TogetherAIChat(TogetherAI, Chat):\n#     pass\n"
  },
  {
    "path": "guidance/models/broken_models/_vertexai.py",
    "content": "import re\n\nfrom .._engine._engine import Chat, Instruct\nfrom .._grammarless import Grammarless, GrammarlessEngine\n\ntry:\n    import vertexai\n\n    is_vertexai = True\nexcept ModuleNotFoundError:\n    is_vertexai = False\n\n\nclass VertexAIEngine(GrammarlessEngine):\n    def __init__(self, tokenizer, max_streaming_tokens, timeout, compute_log_probs, model_obj):\n        super().__init__(tokenizer, max_streaming_tokens, timeout, compute_log_probs)\n        self.model_obj = model_obj\n\n\nclass VertexAI(Grammarless):\n    def __init__(\n        self,\n        model,\n        tokenizer=None,\n        echo=True,\n        max_streaming_tokens=None,\n        timeout=0.5,\n        compute_log_probs=False,\n        engine_class=None,\n        **kwargs,\n    ):\n        \"\"\"Build a new VertexAI model object that represents a model in a given state.\"\"\"\n        if not is_vertexai:\n            raise Exception(\n                \"Please install the vertexai package using `pip install google-cloud-aiplatform` in order to use guidance.models.VertexAI!\"\n            )\n\n        # if we are called directly (as opposed to through super()) then we convert ourselves to a more specific subclass if possible\n        if self.__class__ is VertexAI:\n            found_subclass = None\n            from .. import vertexai as vertexai_subclasses\n\n            if isinstance(model, str):\n                model_name = model\n            else:\n                model_name = model._model_id\n\n            # CodeyCompletion\n            if re.match(\"code-gecko(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.CodeyCompletion\n\n            # CodeyInstruct\n            elif re.match(\"code-bison(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.CodeyInstruct\n\n            # CodeyChat\n            elif re.match(\"codechat-bison(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.CodeyChat\n\n            # PaLM2Instruct\n            elif re.match(\"text-(bison|unicorn)(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.PaLM2Instruct\n\n            # PaLM2Chat\n            elif re.match(\"chat-bison(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.PaLM2Chat\n\n            # Gemini2Chat\n            elif re.match(\"gemini-(pro|ultra)(@[0-9]+)?\", model_name):\n                found_subclass = vertexai_subclasses.GeminiChat\n\n            # convert to any found subclass\n            if found_subclass is not None:\n                self.__class__ = found_subclass\n                found_subclass.__init__(\n                    self,\n                    model,\n                    tokenizer=tokenizer,\n                    echo=echo,\n                    max_streaming_tokens=max_streaming_tokens,\n                    **kwargs,\n                )\n                return  # we return since we just ran init above and don't need to run again\n\n            # make sure we have a valid model object\n            if isinstance(model, str):\n                raise Exception(\"The model ID you passed, `{model}`, does not match any known subclasses!\")\n\n        # this allows us to use a single constructor for all our subclasses\n        if engine_class is None:\n            engine_map = {\n                VertexAICompletion: VertexAICompletionEngine,\n                VertexAIInstruct: VertexAIInstructEngine,\n                VertexAIChat: VertexAIChatEngine,\n            }\n            for k in engine_map:\n                if issubclass(self.__class__, k):\n                    engine_class = engine_map[k]\n                    break\n\n        super().__init__(\n            engine_class(\n                tokenizer=tokenizer,\n                timeout=timeout,\n                compute_log_probs=compute_log_probs,\n                max_streaming_tokens=max_streaming_tokens,\n                model_obj=model,\n            ),\n            echo=echo,\n        )\n\n\nclass VertexAICompletion(VertexAI):\n    pass\n\n\nclass VertexAICompletionEngine(VertexAIEngine):\n    def _generator(self, prompt, temperature):\n        self._not_running_stream.clear()  # so we know we are running\n        self._data = prompt  # we start with this data\n\n        try:\n            kwargs = {}\n            if self.max_streaming_tokens is not None:\n                kwargs[\"max_output_tokens\"] = self.max_streaming_tokens\n            generator = self.model_obj.predict_streaming(\n                prompt.decode(\"utf8\"),\n                # top_p=self.top_p,\n                temperature=temperature,\n                **kwargs,\n            )\n        except Exception as e:  # TODO: add retry logic\n            raise e\n\n        for chunk in generator:\n            yield chunk.text.encode(\"utf8\")\n\n\nclass VertexAIInstruct(VertexAI, Instruct):\n    def get_role_start(self, name):\n        return \"\"\n\n    def get_role_end(self, name):\n        if name == \"instruction\":\n            return \"<|endofprompt|>\"\n        else:\n            raise Exception(f\"The VertexAIInstruct model does not know about the {name} role type!\")\n\n\nclass VertexAIInstructEngine(VertexAIEngine):\n    def _generator(self, prompt, temperature):\n        # start the new stream\n        prompt_end = prompt.find(b\"<|endofprompt|>\")\n        if prompt_end >= 0:\n            stripped_prompt = prompt[:prompt_end]\n        else:\n            raise Exception(\n                \"This model cannot handle prompts that don't match the instruct format! Follow for example:\\nwith instruction():\\n    lm += prompt\\nlm += gen(max_tokens=10)\"\n            )\n        self._not_running_stream.clear()  # so we know we are running\n        self._data = stripped_prompt + b\"<|endofprompt|>\"  # we start with this data\n        kwargs = {}\n        if self.max_streaming_tokens is not None:\n            kwargs[\"max_output_tokens\"] = self.max_streaming_tokens\n        for chunk in self.model_obj.predict_streaming(self._data.decode(\"utf8\"), temperature=temperature, **kwargs):\n            yield chunk.text.encode(\"utf8\")\n\n\nclass VertexAIChat(VertexAI, Chat):\n    pass\n\n\nclass VertexAIChatEngine(VertexAIEngine):\n    def _generator(self, prompt, temperature):\n        # find the system text\n        pos = 0\n        system_start = b\"<|im_start|>system\\n\"\n        user_start = b\"<|im_start|>user\\n\"\n        assistant_start = b\"<|im_start|>assistant\\n\"\n        role_end = b\"<|im_end|>\"\n        # system_start_pos = prompt.startswith(system_start)\n\n        # find the system text\n        system_text = b\"\"\n        if prompt.startswith(system_start):\n            pos += len(system_start)\n            system_end_pos = prompt.find(role_end)\n            system_text = prompt[pos:system_end_pos]\n            pos = system_end_pos + len(role_end)\n\n        # find the user/assistant pairs\n        messages = []\n        valid_end = False\n        while True:\n            # find the user text\n            if prompt[pos:].startswith(user_start):\n                pos += len(user_start)\n                end_pos = prompt[pos:].find(role_end)\n                if end_pos < 0:\n                    break\n                messages.append(\n                    {\n                        \"role\": \"user\",\n                        \"content\": prompt[pos : pos + end_pos].decode(\"utf8\"),\n                    }\n                )\n                pos += end_pos + len(role_end)\n            elif prompt[pos:].startswith(assistant_start):\n                pos += len(assistant_start)\n                end_pos = prompt[pos:].find(role_end)\n                if end_pos < 0:\n                    valid_end = True\n                    break\n                messages.append(\n                    {\n                        \"role\": \"assistant\",\n                        \"content\": prompt[pos : pos + end_pos].decode(\"utf8\"),\n                    }\n                )\n                pos += end_pos + len(role_end)\n            else:\n                raise Exception(\n                    \"It looks like your prompt is not a well formed chat prompt! Please enclose all model state appends inside chat role blocks like `user()` or `assistant()`.\"\n                )\n\n        self._data = prompt[:pos]\n\n        assert len(messages) > 0, \"Bad chat format! No chat blocks were defined.\"\n        assert messages[-1][\"role\"] == \"user\", (\n            \"Bad chat format! There must be a user() role before the last assistant() role.\"\n        )\n        assert valid_end, \"Bad chat format! You must generate inside assistant() roles.\"\n\n        # TODO: don't make a new session on every call\n        # last_user_text = messages.pop().content\n\n        return self._start_generator(system_text.decode(\"utf8\"), messages, temperature)\n\n        # kwargs = {}\n        # if self.max_streaming_tokens is not None:\n        #     kwargs[\"max_output_tokens\"] = self.max_streaming_tokens\n        # generator = chat_session.send_message_streaming(last_user_text, temperature=temperature, **kwargs)\n\n        # for chunk in generator:\n        #     yield chunk.text.encode(\"utf8\")\n\n    def _start_generator(self, system_text, messages, temperature):\n        messages = [vertexai.language_models.ChatMessage(author=m[\"role\"], content=m[\"content\"]) for m in messages]\n        last_user_text = messages.pop().content\n\n        chat_session = self.model_obj.start_chat(\n            context=system_text,\n            message_history=messages,\n        )\n\n        kwargs = {}\n        if self.max_streaming_tokens is not None:\n            kwargs[\"max_output_tokens\"] = self.max_streaming_tokens\n        generator = chat_session.send_message_streaming(last_user_text, temperature=temperature, **kwargs)\n\n        for chunk in generator:\n            yield chunk.text.encode(\"utf8\")\n"
  },
  {
    "path": "guidance/models/experimental/__init__.py",
    "content": "from ._litellm import LiteLLM\nfrom ._sglang import SglangModel\nfrom ._vllm import VLLMModel\n\n__all__ = [\"LiteLLM\", \"SglangModel\", \"VLLMModel\"]\n"
  },
  {
    "path": "guidance/models/experimental/_litellm.py",
    "content": "from typing import TYPE_CHECKING, Any, ContextManager, Iterator\n\nfrom guidance._schema import SamplingParams\n\nfrom ..._ast import GrammarNode, JsonNode, RegexNode, RuleNode\nfrom ...trace import OutputAttr, TextOutput\nfrom .._base import Model\nfrom .._openai_base import BaseOpenAIClientWrapper, BaseOpenAIInterpreter\n\nif TYPE_CHECKING:\n    from openai.types.chat import ChatCompletionChunk\nimport contextlib\n\n\nclass LiteLLMOpenAIClientWrapper(BaseOpenAIClientWrapper):\n    def __init__(self, router):\n        self.router = router\n\n    @contextlib.contextmanager\n    def _wrapped_completion(\n        self,\n        model: str,\n        messages: list[dict[str, Any]],\n        logprobs: bool,\n        **kwargs,\n    ) -> Iterator[\"ChatCompletionChunk\"]:\n        \"\"\"Wrapped completion call within a context manager.\"\"\"\n        kwargs[\"stream\"] = True  # Ensure we are streaming here\n        if logprobs:\n            # only add logprobs if needed. Some EPs like Mistral does not allow logprobs\n            kwargs[\"logprobs\"] = logprobs\n        stream_wrapper = self.router.completion(\n            model=model,\n            messages=messages,\n            **kwargs,\n        )\n\n        try:\n            yield stream_wrapper\n        finally:\n            # stream_wrapper.completion_stream is the underlying stream, e.g. openai.Stream\n            if hasattr(stream_wrapper.completion_stream, \"close\"):\n                # Close the stream if it has a close method\n                stream_wrapper.completion_stream.close()\n\n    def streaming_chat_completions(\n        self,\n        model: str,\n        messages: list[dict[str, Any]],\n        logprobs: bool,\n        **kwargs,\n    ) -> ContextManager[Iterator[\"ChatCompletionChunk\"]]:\n        \"\"\"Streaming chat completions.\"\"\"\n        return self._wrapped_completion(\n            model=model,\n            messages=messages,\n            logprobs=logprobs,\n            **kwargs,\n        )  # type: ignore[return-value]\n\n\nclass LiteLLMInterpreter(BaseOpenAIInterpreter):\n    SUPPORTED_ENDPOINT_TYPES = [\n        \"openai\",\n        \"azure_ai\",\n        \"azure\",\n        \"gemini\",\n        \"anthropic\",\n        \"xai\",\n        \"hosted_vllm\",\n        \"groq\",\n        \"mistral\",\n    ]\n\n    def __init__(self, model_description: dict, **kwargs):\n        try:\n            import litellm\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the litellm package version >= 1.71.0 using `pip install litellm -U` in order to use guidance.models.LiteLLM!\"\n            ) from ie\n\n        self.ep_type = self._check_model(model_description)\n        # set default model to the first one in the list\n        self.model = model_description[\"model_name\"]\n        self.router = litellm.Router(model_list=[model_description])\n        self.client = LiteLLMOpenAIClientWrapper(self.router)\n\n        # Disable log_probs for any remote endpoints by default.\n        # Otherwise, generation will fail for some endpoints.\n        self.logprobs = False\n\n        super().__init__(model=self.model, client=self.client, **kwargs)\n\n    def _check_model(self, model_desc: dict) -> str:\n        \"\"\"Check if the model description is valid.\"\"\"\n        for ep_type in self.SUPPORTED_ENDPOINT_TYPES:\n            if model_desc[\"litellm_params\"][\"model\"].startswith(ep_type):\n                return ep_type\n\n        raise Exception(\n            \"Cannot parse endpoint type. \"\n            \"Please use this 'model' format in 'litellm_params': endpoint_type/model_name (e.g., openai/gpt-3.5-turbo). \"\n            \"Supported endpoints are: \" + \", \".join(self.SUPPORTED_ENDPOINT_TYPES)\n        )\n\n    def rule(self, node: RuleNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n\n        # Disable this check for now as all the supported endpoints have 'stop' support.\n        # if node.stop and self.ep_type not in [\"hosted_vllm\", \"azure\", \"azure_ai\", \"gemini\", \"openai\", \"xai\", \"anthropic\"]:\n        #     raise ValueError(f\"stop condition not yet supported for {self.ep_type} endpoint\")\n        if node.suffix:\n            raise ValueError(f\"suffix not yet supported for {self.ep_type} endpoint\")\n        if node.stop_capture:\n            raise ValueError(f\"stop_capture not yet supported for {self.ep_type} endpoint\")\n\n        kwargs = kwargs.copy()\n        if node.temperature:\n            kwargs[\"temperature\"] = node.temperature\n        if node.max_tokens:\n            kwargs[\"max_tokens\"] = node.max_tokens\n        if node.stop:\n            if self.ep_type in [\"xai\"] and isinstance(node.stop.regex, str):\n                kwargs[\"stop\"] = [node.stop.regex]\n            else:\n                kwargs[\"stop\"] = node.stop.regex\n\n        chunks = self.run(node.value, **kwargs)\n        if node.capture:\n            buffered_text = \"\"\n            for chunk in chunks:\n                # TODO: this isinstance check is pretty darn fragile.\n                # ~there must be a better way~\n                if isinstance(chunk, TextOutput):\n                    buffered_text += chunk.value\n                yield chunk\n            yield self.state.apply_capture(\n                name=node.capture,\n                value=buffered_text,\n                log_prob=1,  # TODO\n                is_append=node.list_append,\n            )\n        else:\n            yield from chunks\n\n    def regex(self, node: RegexNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n        if node.regex is not None and self.ep_type not in [\"hosted_vllm\"]:\n            raise ValueError(f\"Regex is not yet supported for ep {self.ep_type}\")\n\n        if self.ep_type == \"hosted_vllm\":\n            return self._regex_vllm(node, **kwargs)\n\n        # We're in unconstrained mode now.\n        return self._run(**kwargs)\n\n    def _regex_vllm(self, node: RegexNode, **kwargs):\n        \"\"\"Run the regex node using vLLM.\"\"\"\n        if \"extra_body\" not in kwargs:\n            kwargs[\"extra_body\"] = {}\n\n        kwargs[\"extra_body\"].update({\"guided_decoding_backend\": \"guidance\", \"guided_regex\": node.regex})\n\n        buffer: str = \"\"\n        for attr in self._run(**kwargs):\n            if isinstance(attr, TextOutput):\n                buffer += attr.value\n            yield attr\n\n    def json(self, node: JsonNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n        if (\n            self.ep_type in [\"openai\"]\n            and (self.model in [\"gpt-3.5-turbo\"] or self.model.startswith(\"gpt-4-\"))\n            and node.schema is not None\n        ):\n            raise ValueError(f\"json_schema is not supported for ep {self.ep_type}/{self.model}\")\n\n        if self.ep_type in [\"azure_ai\"]:\n            raise ValueError(f\"json_object/json_schema are not supported for ep {self.ep_type}\")\n\n        if node.schema is None:\n            response_format = {\"type\": \"json_object\"}\n        else:\n            # set additionalProperties to False but allow it to be overridden\n            node.schema[\"additionalProperties\"] = node.schema.get(\"additionalProperties\", False)\n            response_format = {\n                \"type\": \"json_schema\",\n                \"json_schema\": {\n                    \"name\": \"json_schema\",\n                    \"schema\": node.schema,\n                    \"strict\": True,\n                },\n            }\n\n        return self._run(\n            response_format=response_format,\n            **kwargs,\n        )\n\n    def grammar(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n        if self.ep_type == \"hosted_vllm\":\n            return self._grammar_vllm(node, **kwargs)\n\n        raise ValueError(f\"Grammar is not yet supported for ep {self.ep_type}\")\n\n    def _grammar_vllm(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        \"\"\"Run the grammar node using vLLM.\"\"\"\n        if \"extra_body\" not in kwargs:\n            kwargs[\"extra_body\"] = {}\n\n        kwargs[\"extra_body\"].update({\"guided_decoding_backend\": \"guidance\", \"guided_grammar\": node.ll_grammar()})\n\n        buffer: str = \"\"\n        for attr in self._run(**kwargs):\n            if isinstance(attr, TextOutput):\n                buffer += attr.value\n            yield attr\n        matches = node.match(\n            buffer,\n            raise_exceptions=False,\n            # Turn of max_tokens since we don't have access to the tokenizer\n            enforce_max_tokens=False,\n        )\n        if matches is None:\n            # TODO: should probably raise...\n            # raise ValueError(\"vLLM failed to constrain the grammar\")\n            pass\n        else:\n            for name, value in matches.captures.items():\n                log_probs = matches.log_probs[name]\n                if isinstance(value, list):\n                    assert isinstance(log_probs, list)\n                    assert len(value) == len(log_probs)\n                    for v, l in zip(value, log_probs, strict=True):\n                        yield self.state.apply_capture(name=name, value=v, log_prob=l, is_append=True)\n                else:\n                    yield self.state.apply_capture(name=name, value=value, log_prob=log_probs, is_append=False)\n\n    def _process_kwargs(self, **kwargs):\n        sampling_params = kwargs.pop(\"sampling_params\", None)\n        if sampling_params is None:\n            return kwargs\n\n        kwargs[\"top_p\"] = sampling_params.pop(\"top_p\", None)\n        kwargs[\"top_k\"] = sampling_params.pop(\"top_k\", None)\n        kwargs[\"min_p\"] = sampling_params.pop(\"min_p\", None)\n        kwargs[\"repetition_penalty\"] = sampling_params.pop(\"repetition_penalty\", None)\n\n        if self.ep_type == \"groq\":\n            # Groq does not support top_k, min_p, or repetition_penalty\n            kwargs.pop(\"top_k\", None)\n            kwargs.pop(\"min_p\", None)\n            kwargs.pop(\"repetition_penalty\", None)\n        if self.ep_type == \"mistral\":\n            kwargs.pop(\"top_k\", None)\n            kwargs.pop(\"min_p\", None)\n            kwargs.pop(\"repetition_penalty\", None)\n\n        return kwargs\n\n\nclass LiteLLM(Model):\n    def __init__(\n        self, model_description: dict, sampling_params: SamplingParams | None = None, echo: bool = True, **kwargs\n    ):\n        interpreter = LiteLLMInterpreter(model_description=model_description, **kwargs)\n        super().__init__(\n            interpreter=interpreter,\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/experimental/_sglang.py",
    "content": "from typing import Iterator\n\nfrom guidance._schema import SamplingParams\n\nfrom ..._ast import GrammarNode, JsonNode, RegexNode, RuleNode\nfrom ...trace import OutputAttr, TextOutput\nfrom .._base import Model\nfrom .._openai_base import BaseOpenAIInterpreter, OpenAIClientWrapper\n\n\nclass SglangInterpreter(BaseOpenAIInterpreter):\n    def __init__(\n        self,\n        model: str,\n        base_url: str | None = None,\n        api_key: str | None = None,\n        **kwargs,\n    ):\n        try:\n            import openai\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the openai package version >= 1 using `pip install openai -U` in order to use guidance.models.OpenAI!\"\n            ) from ie\n\n        client = openai.OpenAI(base_url=base_url, api_key=api_key, **kwargs)\n        super().__init__(model=model, client=OpenAIClientWrapper(client), **kwargs)\n\n    def rule(self, node: RuleNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n\n        # Disable this check for now as all the supported endpoints have 'stop' support.\n        if node.suffix:\n            raise ValueError(\"suffix not yet supported for sglang endpoint\")\n        if node.stop_capture:\n            raise ValueError(\"stop_capture not yet supported for sglang endpoint\")\n\n        kwargs = kwargs.copy()\n        if node.temperature:\n            kwargs[\"temperature\"] = node.temperature\n        if node.max_tokens:\n            kwargs[\"max_tokens\"] = node.max_tokens\n        if node.stop:\n            kwargs[\"stop\"] = node.stop.regex\n\n        chunks = self.run(node.value, **kwargs)\n        if node.capture:\n            buffered_text = \"\"\n            for chunk in chunks:\n                # TODO: this isinstance check is pretty darn fragile.\n                # ~there must be a better way~\n                if isinstance(chunk, TextOutput):\n                    buffered_text += chunk.value\n                yield chunk\n            yield self.state.apply_capture(\n                name=node.capture,\n                value=buffered_text,\n                log_prob=1,  # TODO\n                is_append=node.list_append,\n            )\n        else:\n            yield from chunks\n\n    def regex(self, node: RegexNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n\n        if \"extra_body\" not in kwargs:\n            kwargs[\"extra_body\"] = {}\n\n        kwargs[\"extra_body\"].update({\"regex\": node.regex})\n\n        buffer: str = \"\"\n        for attr in self._run(**kwargs):\n            if isinstance(attr, TextOutput):\n                buffer += attr.value\n            yield attr\n\n    def json(self, node: JsonNode, **kwargs) -> Iterator[OutputAttr]:\n        kwargs = self._process_kwargs(**kwargs)\n\n        if node.schema is not None:\n            # set additionalProperties to False but allow it to be overridden\n            node.schema[\"additionalProperties\"] = node.schema.get(\"additionalProperties\", False)\n\n        response_format = {\n            \"type\": \"json_schema\",\n            \"json_schema\": {\n                \"name\": \"json_schema\",\n                \"schema\": node.schema if node.schema is not None else {\"type\": \"object\"},\n                \"strict\": True,\n            },\n        }\n\n        return self._run(\n            response_format=response_format,\n            **kwargs,\n        )\n\n    def grammar(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        buffer: str = \"\"\n\n        kwargs = self._process_kwargs(**kwargs)\n        extra_body = {\"ebnf\": node.ll_grammar()}\n        kwargs[\"extra_body\"].update(extra_body)\n\n        for attr in self._run(**kwargs):\n            if isinstance(attr, TextOutput):\n                buffer += attr.value\n            yield attr\n        matches = node.match(\n            buffer,\n            raise_exceptions=False,\n            # Turn of max_tokens since we don't have access to the tokenizer\n            enforce_max_tokens=False,\n        )\n        if matches is None:\n            # TODO: should probably raise...\n            # raise ValueError(\"vLLM failed to constrain the grammar\")\n            pass\n        else:\n            for name, value in matches.captures.items():\n                log_probs = matches.log_probs[name]\n                if isinstance(value, list):\n                    assert isinstance(log_probs, list)\n                    assert len(value) == len(log_probs)\n                    for v, l in zip(value, log_probs, strict=True):\n                        yield self.state.apply_capture(name=name, value=v, log_prob=l, is_append=True)\n                else:\n                    yield self.state.apply_capture(name=name, value=value, log_prob=log_probs, is_append=False)\n\n    def _process_kwargs(self, **kwargs):\n        if \"extra_body\" not in kwargs:\n            kwargs[\"extra_body\"] = {}\n\n        sampling_params = kwargs.pop(\"sampling_params\", None)\n        if sampling_params is None:\n            return kwargs\n\n        if \"top_p\" in sampling_params:\n            kwargs[\"top_p\"] = sampling_params[\"top_p\"]\n\n        # top_k must be put in extra_body\n        top_k = sampling_params.pop(\"top_k\", None)\n        if top_k is not None:\n            kwargs[\"extra_body\"][\"top_k\"] = top_k\n\n        min_p = sampling_params.pop(\"min_p\", None)\n        if min_p is not None:\n            kwargs[\"extra_body\"][\"min_p\"] = min_p\n\n        repetition_penalty = sampling_params.pop(\"repetition_penalty\", None)\n        if repetition_penalty is not None:\n            kwargs[\"extra_body\"][\"repetition_penalty\"] = repetition_penalty\n\n        return kwargs\n\n\nclass SglangModel(Model):\n    def __init__(self, model: str, sampling_params: SamplingParams | None = None, echo: bool = True, **kwargs):\n        super().__init__(\n            interpreter=SglangInterpreter(model=model, **kwargs),\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/models/experimental/_vllm.py",
    "content": "from typing import Iterator\n\nfrom guidance._schema import SamplingParams\n\nfrom ..._ast import GrammarNode\nfrom ...trace import OutputAttr, TextOutput\nfrom .._base import Model\nfrom .._openai_base import BaseOpenAIInterpreter, OpenAIClientWrapper\n\n\nclass VLLMInterpreter(BaseOpenAIInterpreter):\n    def __init__(\n        self,\n        model: str,\n        base_url: str | None = None,\n        api_key: str | None = None,\n        **kwargs,\n    ):\n        try:\n            import openai\n        except ImportError as ie:\n            raise Exception(\n                \"Please install the openai package version >= 1 using `pip install openai -U` in order to use guidance.models.OpenAI!\"\n            ) from ie\n\n        client = openai.OpenAI(base_url=base_url, api_key=api_key, **kwargs)\n        super().__init__(model=model, client=OpenAIClientWrapper(client), **kwargs)\n\n    def grammar(self, node: GrammarNode, **kwargs) -> Iterator[OutputAttr]:\n        buffer: str = \"\"\n\n        kwargs = self._process_kwargs(**kwargs)\n        # As of v0.12.0, vLLM expects a different format for structured output requests\n        # https://docs.vllm.ai/en/latest/features/structured_outputs/\n        # But, we can send both, and vLLM will ignore the invalid one\n        extra_body = {\n            # < v0.12.0\n            \"guided_decoding_backend\": \"guidance\",\n            \"guided_grammar\": node.ll_grammar(),\n            # > v0.12.0\n            \"structured_outputs\": {\"grammar\": node.ll_grammar()},\n        }\n        kwargs[\"extra_body\"].update(extra_body)\n\n        for attr in self._run(**kwargs):\n            if isinstance(attr, TextOutput):\n                buffer += attr.value\n            yield attr\n        matches = node.match(\n            buffer,\n            raise_exceptions=False,\n            # Turn of max_tokens since we don't have access to the tokenizer\n            enforce_max_tokens=False,\n        )\n        if matches is None:\n            # TODO: should probably raise...\n            # raise ValueError(\"vLLM failed to constrain the grammar\")\n            pass\n        else:\n            for name, value in matches.captures.items():\n                log_probs = matches.log_probs[name]\n                if isinstance(value, list):\n                    assert isinstance(log_probs, list)\n                    assert len(value) == len(log_probs)\n                    for v, l in zip(value, log_probs, strict=True):\n                        yield self.state.apply_capture(name=name, value=v, log_prob=l, is_append=True)\n                else:\n                    yield self.state.apply_capture(name=name, value=value, log_prob=log_probs, is_append=False)\n\n    def _process_kwargs(self, **kwargs):\n        if \"extra_body\" not in kwargs:\n            kwargs[\"extra_body\"] = {}\n\n        sampling_params = kwargs.pop(\"sampling_params\", None)\n        if sampling_params is None:\n            return kwargs\n\n        kwargs[\"top_p\"] = sampling_params.pop(\"top_p\", None)\n\n        # top_k must be put in extra_body\n        top_k = sampling_params.pop(\"top_k\", None)\n        if top_k is not None:\n            kwargs[\"extra_body\"][\"top_k\"] = top_k\n\n        min_p = sampling_params.pop(\"min_p\", None)\n        if min_p is not None:\n            kwargs[\"extra_body\"][\"min_p\"] = min_p\n\n        repetition_penalty = sampling_params.pop(\"repetition_penalty\", None)\n        if repetition_penalty is not None:\n            kwargs[\"extra_body\"][\"repetition_penalty\"] = repetition_penalty\n\n        return kwargs\n\n\nclass VLLMModel(Model):\n    def __init__(self, model: str, sampling_params: SamplingParams | None = None, echo: bool = True, **kwargs):\n        super().__init__(\n            interpreter=VLLMInterpreter(model=model, **kwargs),\n            sampling_params=SamplingParams() if sampling_params is None else sampling_params,\n            echo=echo,\n        )\n"
  },
  {
    "path": "guidance/py.typed",
    "content": ""
  },
  {
    "path": "guidance/registry/__init__.py",
    "content": "\"\"\"Registry module that contains singletons.\"\"\"\n\nfrom ._registry import get_bg_async, get_exchange, get_monitor, get_renderer, get_trace_handler, set_renderer\n\n__all__ = [\n    \"get_bg_async\",\n    \"get_exchange\",\n    \"get_monitor\",\n    \"get_renderer\",\n    \"get_trace_handler\",\n    \"set_renderer\",\n]\n"
  },
  {
    "path": "guidance/registry/_registry.py",
    "content": "# NOTE(nopdive): Consider moving singleton factories to registry static class.\n\nimport threading\n\nfrom .._bg import BackgroundAsync\nfrom ..metrics import Monitor, PeriodicMetricsGenerator\nfrom ..trace import TraceHandler\nfrom ..visual import AutoRenderer, Renderer, TopicExchange\n\n_monitor_lock = threading.Lock()\n_monitor = None\n_periodic_metrics_gen = None\n\n_bg_async_lock = threading.Lock()\n_bg_async = None\n\n_exchange_lock = threading.Lock()\n_exchange = None\n\n_trace_handler_lock = threading.Lock()\n_trace_handler = None\n\n_renderer_lock = threading.Lock()\n_renderer = None\n\n\ndef get_monitor() -> Monitor:\n    global _monitor\n    global _monitor_lock\n    global _periodic_metrics_gen\n\n    with _monitor_lock:\n        if _monitor is None:\n            _monitor = Monitor()\n            _monitor.start()\n            _periodic_metrics_gen = PeriodicMetricsGenerator(_monitor)\n            _periodic_metrics_gen.start()\n    return _monitor\n\n\ndef get_bg_async() -> BackgroundAsync:\n    global _bg_async\n    global _bg_async_lock\n\n    with _bg_async_lock:\n        if _bg_async is None:\n            _bg_async = BackgroundAsync()\n    return _bg_async\n\n\ndef get_exchange() -> TopicExchange:\n    global _exchange\n    global _exchange_lock\n\n    with _exchange_lock:\n        if _exchange is None:\n            _exchange = TopicExchange()\n    return _exchange\n\n\ndef get_trace_handler() -> TraceHandler:\n    global _trace_handler\n    global _trace_handler_lock\n\n    with _trace_handler_lock:\n        if _trace_handler is None:\n            _trace_handler = TraceHandler()\n    return _trace_handler\n\n\ndef get_renderer() -> Renderer:\n    global _renderer\n    global _renderer_lock\n\n    with _renderer_lock:\n        trace_handler = get_trace_handler()\n        if _renderer is None:\n            _renderer = AutoRenderer(trace_handler)\n    return _renderer\n\n\ndef set_renderer(renderer: Renderer) -> None:\n    global _renderer\n    global _renderer_lock\n\n    with _renderer_lock:\n        _renderer = renderer\n"
  },
  {
    "path": "guidance/resources/graphpaper-inline.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n\n    <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n    <link href=\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\" rel=\"stylesheet\">\n</head>\n<body>\n<script>\nvar app=function(){\"use strict\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\"function\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\"object\"==typeof e||\"function\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\"a\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\"\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\"undefined\"!=typeof window?window:\"undefined\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\"http://www.w3.org/2000/svg\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\" \")}function _(){return v(\"\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\"\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\"\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\"\")}let E,C;function A(){if(void 0===E){E=!1;try{\"undefined\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\"Function called outside component initialization\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\"undefined\"!=typeof document){var s=document.head||document.getElementsByTagName(\"head\")[0],n=document.createElement(\"style\");n.type=\"text/css\",\"top\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\"undefined\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\"4\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\"JetBrains Mono\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\[-15px\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\[0\\\\.125rem\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\:bg-\\\\[\\\\#5A5F72\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\:hover\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\:hover\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\:hover\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\:hover\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\:hover\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\:focus\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\"*\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\"RoleOpenerInput\"===e.class_name}function le(e){return null!=e&&\"RoleCloserInput\"===e.class_name}function ce(e){return null!=e&&(\"TextOutput\"===e.class_name||\"TokenOutput\"===e.class_name)}function de(e){return null!=e&&\"TokenOutput\"===e.class_name}function ue(e){return null!=e&&\"ImageOutput\"===e.class_name}function he(e){return null!=e&&\"AudioOutput\"===e.class_name}function pe(e){return null!=e&&\"VideoOutput\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\"svg\"),i=y(\"path\"),S(i,\"d\",\"M8 5.14v14l11-7-11-7z\"),S(t,\"class\",\"fill-white dark:fill-gray-900 w-5 h-5\"),S(t,\"viewBox\",\"0 0 24 24\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\"svg\"),i=y(\"rect\"),s=y(\"rect\"),S(i,\"x\",\"7\"),S(i,\"y\",\"6\"),S(i,\"width\",\"3\"),S(i,\"height\",\"12\"),S(i,\"rx\",\"1\"),S(s,\"x\",\"14\"),S(s,\"y\",\"6\"),S(s,\"width\",\"3\"),S(s,\"height\",\"12\"),S(s,\"rx\",\"1\"),S(t,\"class\",\"fill-white dark:fill-gray-900 w-5 h-5\"),S(t,\"viewBox\",\"0 0 24 24\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\"path\"),S(t,\"d\",\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\"path\"),S(t,\"d\",\"M7 9v6h4l5 5V4l-5 5H7z\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\"path\"),S(t,\"d\",\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\"div\"),i=f(\"div\"),n=f(\"input\"),r=b(),a=f(\"div\"),o=b(),l=f(\"div\"),S(n,\"type\",\"range\"),S(n,\"min\",\"0\"),S(n,\"max\",\"1\"),S(n,\"step\",\"0.01\"),S(n,\"class\",\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\"),S(n,\"aria-label\",\"Volume\"),S(a,\"class\",\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\"),x(a,\"width\",100*e[2]+\"%\"),S(l,\"class\",\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\"),x(l,\"left\",\"calc(\"+100*e[2]+\"% - 6px)\"),x(l,\"top\",\"-2px\"),S(i,\"class\",\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\"),S(t,\"class\",\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\"),S(t,\"role\",\"slider\"),S(t,\"aria-label\",\"Volume\"),S(t,\"aria-valuemin\",\"0\"),S(t,\"aria-valuemax\",\"100\"),S(t,\"aria-valuenow\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\"change\",e[18]),T(n,\"input\",e[18]),T(n,\"input\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\"width\",100*e[2]+\"%\"),4&i[0]&&x(l,\"left\",\"calc(\"+100*e[2]+\"% - 6px)\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\"aria-valuenow\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\"\",U=xe(t[6])+\"\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\"div\"),n=f(\"div\"),r=f(\"div\"),a=f(\"button\"),q.c(),l=b(),c=f(\"div\"),d=f(\"button\"),u=y(\"svg\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\"div\"),E=f(\"canvas\"),C=b(),A=f(\"div\"),I=v(R),j=v(\" / \"),D=v(U),P=b(),L=f(\"audio\"),S(a,\"class\",\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\"),S(a,\"aria-label\",\"Toggle playback\"),S(u,\"class\",\"w-5 h-5\"),S(u,\"viewBox\",\"0 0 24 24\"),S(u,\"fill\",\"currentColor\"),S(d,\"class\",\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\"),S(d,\"aria-label\",g=t[3]?\"Unmute\":\"Mute\"),S(d,\"aria-pressed\",t[3]),S(c,\"class\",\"relative\"),S(c,\"role\",\"group\"),S(c,\"aria-label\",\"Volume controls\"),S(E,\"class\",\"w-full h-12\"),S(x,\"class\",\"flex-grow relative cursor-pointer\"),S(x,\"role\",\"slider\"),S(x,\"tabindex\",\"0\"),S(x,\"aria-label\",\"Audio timeline\"),S(x,\"aria-valuemin\",\"0\"),S(x,\"aria-valuemax\",\"100\"),S(x,\"aria-valuenow\",t[5]),S(A,\"class\",\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\"),S(r,\"class\",\"flex items-center gap-1\"),S(n,\"class\",\"flex flex-col gap-2\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\"src\",O),S(L,\"class\",\"hidden\"),S(i,\"class\",\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\"click\",t[10]),T(d,\"click\",t[17]),T(c,\"mouseenter\",t[19]),T(c,\"mouseleave\",t[20]),T(x,\"click\",t[11]),T(x,\"mousemove\",t[13]),T(x,\"mouseleave\",t[14]),T(x,\"keydown\",t[22]),T(L,\"timeupdate\",t[15]),T(L,\"ended\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\"Unmute\":\"Mute\")&&S(d,\"aria-label\",g),8&t[0]&&S(d,\"aria-pressed\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\"aria-valuenow\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\"\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\"\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\"src\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\"0\":\"\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\"2d\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\"Error decoding audio for waveform:\",e)}}if(!v){a=document.createElement(\"canvas\"),a.width=t,a.height=i;const e=a.getContext(\"2d\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\"#E5E5E5\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\"#717171\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\"rgba(80, 80, 80, 0.7)\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\"rgba(0, 0, 0, 0.3)\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\"audioData\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\"Null seek event target\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\"Null change volume event target\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\"Null hover event target\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\"\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\"unshift\":\"push\"]((()=>{r=e,i(9,r)}))},e=>{\"ArrowRight\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\"ArrowLeft\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\"unshift\":\"push\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\"Running\",e.Error=\"Error\",e.Done=\"Done\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\"woff\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\"\\\\f101\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\"\\\\f102\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\"\\\\f103\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\"\\\\f104\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\"\\\\f105\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\"\\\\f106\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\"\\\\f107\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\"\\\\f108\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\"\\\\f109\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\"\\\\f10a\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\"\\\\f10b\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\"\\\\f10c\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\"\\\\f10d\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\"\\\\f10e\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\"\\\\f10f\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\"\\\\f110\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\"\\\\f111\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\"\\\\f112\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\"\\\\f113\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\"\\\\f114\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\"\\\\f115\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\"\\\\f116\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\"\\\\f117\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\"\\\\f118\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\"\\\\f119\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\"\\\\f11a\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\"\\\\f11b\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\"\\\\f11c\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\"\\\\f11d\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\"\\\\f11e\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\"\\\\f11f\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\"\\\\f120\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\"\\\\f121\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\"\\\\f122\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\"\\\\f123\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\"\\\\f124\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\"\\\\f125\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\"\\\\f126\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\"\\\\f127\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\"\\\\f128\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\"\\\\f129\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\"\\\\f12a\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\"\\\\f12b\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\"\\\\f12c\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\"\\\\f12d\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\"\\\\f12e\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\"-1\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\"\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\"\\\\f10c\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\" \\\\f12e\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\"function\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\"__esModule\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\"undefined\"!=typeof window?window:void 0!==Ae?Ae:\"undefined\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\"undefined\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\"undefined\"!=typeof document?De=document:(De=Oe[\"__GLOBAL_DOCUMENT_CACHE@4\"])||(De=Oe[\"__GLOBAL_DOCUMENT_CACHE@4\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\"[object Function]\"===t||\"function\"==typeof e&&\"[object RegExp]\"!==t||\"undefined\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\"string\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===i&&e.constructor&&(i=e.constructor.name);if(\"Map\"===i||\"Set\"===i)return Array.from(e);if(\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\"\");return e.toLowerCase().split(\";\").reduce((function(e,t){var i=t.split(\"=\"),s=i[0],n=i[1];return\"charset\"===s.trim()?n.trim():e}),\"utf-8\")}(s.headers&&s.headers[\"content-type\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\n/**\n\t * @license\n\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n\t * Copyright (c) 2014 David Björklund\n\t * Available under the MIT license\n\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\n\t */\nvar it=function(e){var t={};return e?(e.trim().split(\"\\n\").forEach((function(e){var i=e.indexOf(\":\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\"string\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\"callback argument missing\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\"document\"===e.responseType)return e.responseXML;var t=e.responseXML&&\"parsererror\"===e.responseXML.documentElement.nodeName;if(\"\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\"\"+(t||\"Unknown XMLHttpRequest Error\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\"Internal XMLHttpRequest Error\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\"GET\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\"json\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\"application/json\"),\"GET\"!==p&&\"HEAD\"!==p&&(g[\"content-type\"]||g[\"Content-Type\"]||(g[\"Content-Type\"]=\"application/json\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\"timeout\");var e=new Error(\"XMLHttpRequest timeout\");e.code=\"ETIMEDOUT\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\"Headers cannot be set on an XDomainRequest object\");return\"responseType\"in e&&(d.responseType=e.responseType),\"beforeSend\"in e&&\"function\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\"withCredentials\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\"get\",\"put\",\"post\",\"patch\",\"head\",\"delete\"],(function(e){nt[\"delete\"===e?\"del\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\"Object.create shim only accepts one parameter.\");return e.prototype=t,new e}}();function dt(e,t){this.name=\"ParsingError\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\":\",\"\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\"string\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\"Malformed timestamp: \"+s);return e=e.replace(/^[^\\sa-zA-Z-]+/,\"\"),t}function r(){e=e.replace(/^\\s+/,\"\")}if(r(),t.startTime=n(),r(),\"--\\x3e\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\"Malformed time stamp (time stamps must be separated by '--\\x3e'): \"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\"region\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\"vertical\":s.alt(e,t,[\"rl\",\"lr\"]);break;case\"line\":var r=t.split(\",\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\"snapToLines\",!1),s.alt(e,a,[\"auto\"]),2===r.length&&s.alt(\"lineAlign\",r[1],[\"start\",\"center\",\"end\"]);break;case\"position\":r=t.split(\",\"),s.percent(e,r[0]),2===r.length&&s.alt(\"positionAlign\",r[1],[\"start\",\"center\",\"end\"]);break;case\"size\":s.percent(e,t);break;case\"align\":s.alt(e,t,[\"start\",\"center\",\"end\",\"left\",\"right\"])}}),/:/,/\\s/),t.region=s.get(\"region\",null),t.vertical=s.get(\"vertical\",\"\");try{t.line=s.get(\"line\",\"auto\")}catch(e){}t.lineAlign=s.get(\"lineAlign\",\"start\"),t.snapToLines=s.get(\"snapToLines\",!0),t.size=s.get(\"size\",100);try{t.align=s.get(\"align\",\"center\")}catch(e){t.align=s.get(\"align\",\"middle\")}try{t.position=s.get(\"position\",\"auto\")}catch(e){t.position=s.get(\"position\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\"positionAlign\",{start:\"start\",left:\"start\",center:\"center\",middle:\"center\",end:\"end\",right:\"end\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\"Malformed WebVTT signature.\"},BadTimeStamp:{code:1,message:\"Malformed time stamp.\"}},ht.prototype={set:function(e,t){this.get(e)||\"\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\"textarea\"),ft={c:\"span\",i:\"i\",b:\"b\",u:\"u\",ruby:\"ruby\",rt:\"rt\",v:\"span\",lang:\"span\"},yt={white:\"rgba(255,255,255,1)\",lime:\"rgba(0,255,0,1)\",cyan:\"rgba(0,255,255,1)\",red:\"rgba(255,0,0,1)\",yellow:\"rgba(255,255,0,1)\",magenta:\"rgba(255,0,255,1)\",blue:\"rgba(0,0,255,1)\",black:\"rgba(0,0,0,1)\"},vt={v:\"title\",lang:\"lang\"},bt={rt:\"ruby\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\"div\"),l=o,c=[];null!==(r=i());)if(\"<\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\"\",a)));else{if(\"/\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\">\",\"\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\"timestamp\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\".\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\"background-color\":\"color\",n=yt[i];d.style[s]=n}})),d.className=p.join(\" \")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\"\";if(!e||!e.childNodes)return\"ltr\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\n|\\r)/);return r?(e.length=0,r[0]):i}return\"ruby\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\"rtl\";return\"ltr\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\"rgba(255, 255, 255, 1)\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",position:\"relative\",left:0,right:0,top:0,bottom:0,display:\"inline\",writingMode:\"\"===t.vertical?\"horizontal-tb\":\"lr\"===t.vertical?\"vertical-lr\":\"vertical-rl\",unicodeBidi:\"plaintext\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\"div\"),s={direction:wt(this.cueDiv),writingMode:\"\"===t.vertical?\"horizontal-tb\":\"lr\"===t.vertical?\"vertical-lr\":\"vertical-rl\",unicodeBidi:\"plaintext\",textAlign:\"middle\"===t.align?\"center\":t.align,font:i.font,whiteSpace:\"pre-line\",position:\"absolute\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\"start\":case\"line-left\":n=t.position;break;case\"center\":n=t.position-t.size/2;break;case\"end\":case\"line-right\":n=t.position-t.size}\"\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\"%\"),width:this.formatStyle(t.size,\"%\")}):this.applyStyles({top:this.formatStyle(n,\"%\"),height:this.formatStyle(t.size,\"%\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\"px\"),bottom:this.formatStyle(e.bottom,\"px\"),left:this.formatStyle(e.left,\"px\"),right:this.formatStyle(e.right,\"px\"),height:this.formatStyle(e.height,\"px\"),width:this.formatStyle(e.width,\"px\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\"number\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\"showing\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\"\":o=[\"+y\",\"-y\"],l=\"height\";break;case\"rl\":o=[\"+x\",\"-x\"],l=\"width\";break;case\"lr\":o=[\"-x\",\"+x\"],l=\"width\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\"\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\"center\":a-=p/2;break;case\"end\":a-=p}switch(r.vertical){case\"\":t.applyStyles({top:t.formatStyle(a,\"%\")});break;case\"rl\":t.applyStyles({left:t.formatStyle(a,\"%\")});break;case\"lr\":t.applyStyles({right:t.formatStyle(a,\"%\")})}o=[\"+y\",\"-x\",\"+x\",\"-y\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\"+x\":this.left+=t,this.right+=t;break;case\"-x\":this.left-=t,this.right-=t;break;case\"+y\":this.top+=t,this.bottom+=t;break;case\"-y\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\"+x\":return this.left<e.left;case\"-x\":return this.right>e.right;case\"+y\":return this.top<e.top;case\"-y\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\"\";if(\"string\"!=typeof e)throw new Error(\"Error - expected string data.\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\"div\");if(s.style.position=\"absolute\",s.style.left=\"0\",s.style.right=\"0\",s.style.top=\"0\",s.style.bottom=\"0\",s.style.margin=\"1.5%\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\"px sans-serif\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\"INITIAL\",this.buffer=\"\",this.decoder=i||new TextDecoder(\"utf8\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\"\\r\"!==e[i]&&\"\\n\"!==e[i];)++i;var s=e.substr(0,i);return\"\\r\"===e[i]&&++i,\"\\n\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\"X-TIMESTAMP-MAP\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\"MPEGT\":i.integer(e+\"S\",t);break;case\"LOCA\":i.set(e+\"L\",ut(t))}}),/[^\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\"MPEGTS\"),LOCAL:i.get(\"LOCAL\")})}(i)}),/=/):pt(e,(function(e,i){if(\"Region\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\"id\":i.set(e,t);break;case\"width\":i.percent(e,t);break;case\"lines\":i.integer(e,t);break;case\"regionanchor\":case\"viewportanchor\":var s=t.split(\",\");if(2!==s.length)break;var n=new ht;if(n.percent(\"x\",s[0]),n.percent(\"y\",s[1]),!n.has(\"x\")||!n.has(\"y\"))break;i.set(e+\"X\",n.get(\"x\")),i.set(e+\"Y\",n.get(\"y\"));break;case\"scroll\":i.alt(e,t,[\"up\"])}}),/=/,/\\s/),i.has(\"id\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\"width\",100),s.lines=i.get(\"lines\",3),s.regionAnchorX=i.get(\"regionanchorX\",0),s.regionAnchorY=i.get(\"regionanchorY\",100),s.viewportAnchorX=i.get(\"viewportanchorX\",0),s.viewportAnchorY=i.get(\"viewportanchorY\",100),s.scroll=i.get(\"scroll\",\"\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\"id\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\"INITIAL\"===t.state){if(!/\\r\\n|\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\"HEADER\"}for(var a=!1;t.buffer;){if(!/\\r\\n|\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\"HEADER\":/:/.test(n)?s(n):n||(t.state=\"ID\");continue;case\"NOTE\":n||(t.state=\"ID\");continue;case\"ID\":if(/^NOTE($|[ \\t])/.test(n)){t.state=\"NOTE\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\"\");try{t.cue.align=\"center\"}catch(e){t.cue.align=\"middle\"}if(t.state=\"CUE\",-1===n.indexOf(\"--\\x3e\")){t.cue.id=n;continue}case\"CUE\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\"BADCUE\";continue}t.state=\"CUETEXT\";continue;case\"CUETEXT\":var o=-1!==n.indexOf(\"--\\x3e\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\"ID\";continue}t.cue.text&&(t.cue.text+=\"\\n\"),t.cue.text+=n.replace(/\\u2028/g,\"\\n\").replace(/u2029/g,\"\\n\");continue;case\"BADCUE\":n||(t.state=\"ID\");continue}}}catch(e){t.reportOrThrowError(e),\"CUETEXT\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\"INITIAL\"===t.state?\"BADWEBVTT\":\"BADCUE\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\"HEADER\"===e.state)&&(e.buffer+=\"\\n\\n\",e.parse()),\"INITIAL\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\"\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\"line-left\":1,\"line-right\":1};function Pt(e){return\"string\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\"\",n=!1,r=e,a=t,o=i,l=null,c=\"\",d=!0,u=\"auto\",h=\"start\",p=\"auto\",m=\"auto\",g=100,f=\"center\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\"\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"Start time must be set to a number.\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"End time must be set to a number.\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\"\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\"string\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\"number\"!=typeof e&&\"auto\"!==e)throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\"lineAlign: an invalid or illegal string was specified.\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\"Position must be between 0 and 100.\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\"positionAlign: an invalid or illegal string was specified.\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\"Size must be between 0 and 100.\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\"\":!0,up:!0};function Mt(e){return\"number\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\"\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\"Width must be between 0 and 100.\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"Lines must be set to a number.\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\"RegionAnchorX must be between 0 and 100.\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\"RegionAnchorY must be between 0 and 100.\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\"ViewportAnchorY must be between 0 and 100.\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\"ViewportAnchorX must be between 0 and 100.\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\"string\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\"Scroll: an invalid or illegal string was specified.\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\"https://example.com\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\"\");var i=/^\\/\\//.test(e),s=!Le.location&&!/\\/\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\"data\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\"base64\").toString(\"binary\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\"\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\"\\n\");t>-1;t=this.buffer.indexOf(\"\\n\"))this.trigger(\"data\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\"\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\"[^\"]*\"|[^,]*))'));let s,n=i.length;for(;n--;)\"\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\s+|\\s+$/g,\"\"),s[1]=s[1].replace(/^\\s+|\\s+$/g,\"\"),s[1]=s[1].replace(/^['\"](.*)['\"]$/g,\"$1\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\"x\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\"#\"!==e[0])return void this.trigger(\"data\",{type:\"uri\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\"#EXT\"))if(e=e.replace(\"\\r\",\"\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\"data\",{type:\"tag\",tagType:\"m3u\"});else{if(t=/^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\"tag\",tagType:\"inf\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\"data\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\"tag\",tagType:\"targetduration\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\"data\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\"tag\",tagType:\"version\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\"data\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(e),t)return i={type:\"tag\",tagType:\"media-sequence\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\"data\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(e),t)return i={type:\"tag\",tagType:\"discontinuity-sequence\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\"data\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\"tag\",tagType:\"playlist-type\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\"data\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\"tag\",tagType:\"byterange\"}),void this.trigger(\"data\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\"tag\",tagType:\"allow-cache\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\"data\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\"tag\",tagType:\"map\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\"data\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"stream-inf\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\"FRAME-RATE\"]&&(i.attributes[\"FRAME-RATE\"]=parseFloat(i.attributes[\"FRAME-RATE\"])),i.attributes[\"PROGRAM-ID\"]&&(i.attributes[\"PROGRAM-ID\"]=parseInt(i.attributes[\"PROGRAM-ID\"],10))),void this.trigger(\"data\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"media\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\"data\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\"data\",{type:\"tag\",tagType:\"endlist\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\"data\",{type:\"tag\",tagType:\"discontinuity\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"program-date-time\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\"data\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"key\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\"0x\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\"data\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"start\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\"TIME-OFFSET\"]=parseFloat(i.attributes[\"TIME-OFFSET\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\"data\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\"tag\",tagType:\"cue-out-cont\"},t[1]?i.data=t[1]:i.data=\"\",void this.trigger(\"data\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\"tag\",tagType:\"cue-out\"},t[1]?i.data=t[1]:i.data=\"\",void this.trigger(\"data\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\"tag\",tagType:\"cue-in\"},t[1]?i.data=t[1]:i.data=\"\",void this.trigger(\"data\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"skip\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\"SKIPPED-SEGMENTS\")&&(i.attributes[\"SKIPPED-SEGMENTS\"]=parseInt(i.attributes[\"SKIPPED-SEGMENTS\"],10)),i.attributes.hasOwnProperty(\"RECENTLY-REMOVED-DATERANGES\")&&(i.attributes[\"RECENTLY-REMOVED-DATERANGES\"]=i.attributes[\"RECENTLY-REMOVED-DATERANGES\"].split(Qt)),void this.trigger(\"data\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"part\"},i.attributes=Zt(t[1]),[\"DURATION\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\"INDEPENDENT\",\"GAP\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\"BYTERANGE\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\"data\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"server-control\"},i.attributes=Zt(t[1]),[\"CAN-SKIP-UNTIL\",\"PART-HOLD-BACK\",\"HOLD-BACK\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\"CAN-SKIP-DATERANGES\",\"CAN-BLOCK-RELOAD\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\"data\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"part-inf\"},i.attributes=Zt(t[1]),[\"PART-TARGET\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\"data\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"preload-hint\"},i.attributes=Zt(t[1]),[\"BYTERANGE-START\",\"BYTERANGE-LENGTH\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\"BYTERANGE-LENGTH\"===e?\"length\":\"offset\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\"data\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\"tag\",tagType:\"rendition-report\"},i.attributes=Zt(t[1]),[\"LAST-MSN\",\"LAST-PART\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\"data\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\"tag\",tagType:\"daterange\"},i.attributes=Zt(t[1]),[\"ID\",\"CLASS\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\"START-DATE\",\"END-DATE\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\"DURATION\",\"PLANNED-DURATION\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\"END-ON-NEXT\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\"SCTE35-CMD\",\" SCTE35-OUT\",\"SCTE35-IN\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\d+(\\.\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\"data\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\"data\",{type:\"tag\",tagType:\"independent-segments\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\"data\",{type:\"tag\",tagType:\"i-frames-only\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"content-steering\"},i.attributes=Zt(t[1]),void this.trigger(\"data\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"i-frame-playlist\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\"AVERAGE-BANDWIDTH\"]&&(i.attributes[\"AVERAGE-BANDWIDTH\"]=parseInt(i.attributes[\"AVERAGE-BANDWIDTH\"],10)),i.attributes[\"FRAME-RATE\"]&&(i.attributes[\"FRAME-RATE\"]=parseFloat(i.attributes[\"FRAME-RATE\"])),void this.trigger(\"data\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\"tag\",tagType:\"define\"},i.attributes=Zt(t[1]),void this.trigger(\"data\",i);this.trigger(\"data\",{type:\"tag\",data:e.slice(4)})}}}}else this.trigger(\"data\",{type:\"comment\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\"function\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\"data\",{type:\"custom\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\"#EXT-X-SERVER-CONTROL\",r=\"holdBack\",a=\"partHoldBack\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\"info\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\"warn\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\"info\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\"warn\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\"https://a.com\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\"CLOSED-CAPTIONS\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\"end\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\"number\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\"data\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\"string\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\"allow-cache\"(){this.manifest.allowCache=e.allowed,\"allowed\"in e||(this.trigger(\"info\",{message:\"defaulting allowCache to YES\"}),this.manifest.allowCache=!0)},byterange(){const t={};\"length\"in e&&(r.byterange=t,t.length=e.length,\"offset\"in e||(e.offset=d)),\"offset\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\"mediaSequence\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\"info\",{message:\"defaulting media sequence to zero\"})),\"discontinuitySequence\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\"info\",{message:\"defaulting discontinuity sequence to zero\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\"info\",{message:\"updating zero segment duration to a small value\"})),this.manifest.segments=i},key(){if(e.attributes)if(\"NONE\"!==e.attributes.METHOD)if(e.attributes.URI){if(\"com.apple.streamingkeydelivery\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\"com.apple.fps.1_0\"]={attributes:e.attributes});if(\"com.microsoft.playready\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\"com.microsoft.playready\"]={uri:e.attributes.URI});if(\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\"===e.attributes.KEYFORMAT){return-1===[\"SAMPLE-AES\",\"SAMPLE-AES-CTR\",\"SAMPLE-AES-CENC\"].indexOf(e.attributes.METHOD)?void this.trigger(\"warn\",{message:\"invalid key method provided for Widevine\"}):(\"SAMPLE-AES-CENC\"===e.attributes.METHOD&&this.trigger(\"warn\",{message:\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\"}),\"data:text/plain;base64,\"!==e.attributes.URI.substring(0,23)?void this.trigger(\"warn\",{message:\"invalid key URI provided for Widevine\"}):e.attributes.KEYID&&\"0x\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\"com.widevine.alpha\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\",\")[1])})):void this.trigger(\"warn\",{message:\"invalid key ID provided for Widevine\"}))}e.attributes.METHOD||this.trigger(\"warn\",{message:\"defaulting key method to AES-128\"}),n={method:e.attributes.METHOD||\"AES-128\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\"warn\",{message:\"ignoring key declaration without URI\"});else n=null;else this.trigger(\"warn\",{message:\"ignoring key declaration without attribute list\"})},\"media-sequence\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\"warn\",{message:\"ignoring invalid media sequence: \"+e.number})},\"discontinuity-sequence\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\"warn\",{message:\"ignoring invalid discontinuity sequence: \"+e.number})},\"playlist-type\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\"warn\",{message:\"ignoring unknown playlist type: \"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\"stream-inf\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\"warn\",{message:\"ignoring empty stream-inf attributes\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\"GROUP-ID\"]&&e.attributes.NAME))return void this.trigger(\"warn\",{message:\"ignoring incomplete or missing media group\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\"GROUP-ID\"]]=t[e.attributes[\"GROUP-ID\"]]||{},p=t[e.attributes[\"GROUP-ID\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\"INSTREAM-ID\"]&&(m.instreamId=e.attributes[\"INSTREAM-ID\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\"program-date-time\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\"warn\",{message:\"ignoring invalid target duration: \"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\"TIME-OFFSET\"])?this.manifest.start={timeOffset:e.attributes[\"TIME-OFFSET\"],precise:e.attributes.PRECISE}:this.trigger(\"warn\",{message:\"ignoring start declaration without appropriate attribute list\"})},\"cue-out\"(){r.cueOut=e.data},\"cue-out-cont\"(){r.cueOutCont=e.data},\"cue-in\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\"#EXT-X-SKIP\",e.attributes,[\"SKIPPED-SEGMENTS\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\"offset\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\"URI\",\"DURATION\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\"lastPart\")||this.trigger(\"warn\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\"server-control\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\"canBlockReload\")||(t.canBlockReload=!1,this.trigger(\"info\",{message:\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\"canSkipUntil\")&&this.trigger(\"warn\",{message:\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\"})},\"preload-hint\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\"PART\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\"offset\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\"TYPE\",\"URI\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\"warn\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\"rendition-report\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\"LAST-MSN\",\"URI\"];a&&s.push(\"LAST-PART\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\"part-inf\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\"#EXT-X-PART-INF\",e.attributes,[\"PART-TARGET\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\"ID\",\"START-DATE\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\"warn\",{message:\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\"}),i.duration&&i.duration<0&&this.trigger(\"warn\",{message:\"EXT-X-DATERANGE DURATION must not be negative\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\"warn\",{message:\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\"warn\",{message:\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\"}),s&&(i.duration||i.endDate)&&this.trigger(\"warn\",{message:\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\"warn\",{message:\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\"independent-segments\"(){this.manifest.independentSegments=!0},\"i-frames-only\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\"content-steering\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\"#EXT-X-CONTENT-STEERING\",e.attributes,[\"SERVER-URI\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\"error\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\"QUERYPARAM\"in e.attributes){if(\"NAME\"in e.attributes||\"IMPORT\"in e.attributes)return void this.trigger(\"error\",{message:\"EXT-X-DEFINE: Invalid attributes\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\"error\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\"NAME\"in e.attributes?\"IMPORT\"in e.attributes?void this.trigger(\"error\",{message:\"EXT-X-DEFINE: Invalid attributes\"}):\"VALUE\"in e.attributes&&\"string\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\"error\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\"IMPORT\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\"error\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\"error\",{message:\"EXT-X-DEFINE: No attribute\"})},\"i-frame-playlist\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\"#EXT-X-I-FRAME-STREAM-INF\",e.attributes,[\"BANDWIDTH\",\"URI\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\"duration\"in r)&&(this.trigger(\"warn\",{message:\"defaulting segment duration to the target duration\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\"warn\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\"warn\",{message:`${e} lacks required attribute(s): ${s.join(\", \")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\"\\n\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\"warn\",{message:\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\"}),this.lastProgramDateTime=null,this.trigger(\"end\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\"video\",\"audio\",\"text\"],ci=[\"Video\",\"Audio\",\"Text\"],di=function(e){return e?e.replace(/avc1\\.(\\d+)\\.(\\d+)/i,(function(e,t,i){return\"avc1.\"+(\"00\"+Number(t).toString(16)).slice(-2)+\"00\"+(\"00\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\"\");var t=e.split(\",\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\"\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\"\",mediaType:\"unknown\"})})),i},hi=function(e){return void 0===e&&(e=\"\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\"string\"==typeof e){var t,i=e.toLowerCase().split(\",\").map((function(e){return di(e.trim())})),s=\"video\";1===i.length&&hi(i[0])?s=\"audio\":1===i.length&&(void 0===(t=i[0])&&(t=\"\"),oi.text.test(t.trim().toLowerCase()))&&(s=\"application\");var n=\"mp4\";return i.every((function(e){return oi.mp4.test(e)}))?n=\"mp4\":i.every((function(e){return oi.webm.test(e)}))?n=\"webm\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\"ogg\"),s+\"/\"+n+';codecs=\"'+e+'\"'}},mi=function(e,t){return void 0===e&&(e=\"\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\"\"),e.toLowerCase().split(\",\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\"muxer\"+ci[t]].test(e))return!0}return!1}))},fi=\"mp4a.40.2\",yi=/^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i,vi=/^application\\/dash\\+xml/i,bi=function(e){return yi.test(e)?\"hls\":vi.test(e)?\"dash\":\"application/vnd.videojs.vhs+json\"===e?\"vhs-json\":null},_i=function(e){return\"function\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\"number\"!=typeof e||\"number\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\"0x1\"),Si(\"0x100\"),Si(\"0x10000\"),Si(\"0x1000000\"),Si(\"0x100000000\"),Si(\"0x10000000000\"),Si(\"0x1000000000000\"),Si(\"0x100000000000000\"),Si(\"0x10000000000000000\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\"reduce\":\"reduceRight\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\"bigint\"!=typeof e&&\"number\"!=typeof e||\"number\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\"string\"!=typeof e&&e&&\"function\"==typeof e.toString&&(e=e.toString()),\"string\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\"function\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\"text/html\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\"application/xml\",XML_TEXT:\"text/xml\",XML_XHTML_APPLICATION:\"application/xhtml+xml\",XML_SVG_IMAGE:\"image/svg+xml\"}),Pi=ji({HTML:\"http://www.w3.org/1999/xhtml\",isHTML:function(e){return e===Pi.HTML},SVG:\"http://www.w3.org/2000/svg\",XML:\"http://www.w3.org/XML/1998/namespace\",XMLNS:\"http://www.w3.org/2000/xmlns/\"});Ii.assign=function(e,t){if(null===e||\"object\"!=typeof e)throw new TypeError(\"target is not an object\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\"function\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\"\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\t\\n\\f\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\"function\"!=typeof e&&console.error(\"unknown Class:\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\"Index size error\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\"DOMString size error\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\"Hierarchy request error\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\"Wrong document\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\"Invalid character\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\"No data allowed\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\"No modification allowed\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\"Not found\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\"Not supported\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\"Attribute in use\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\": \"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\"length\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\"\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\"@\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\"<\"==e?\"&lt;\":\">\"==e&&\"&gt;\")||\"&\"==e&&\"&amp;\"||'\"'==e&&\"&quot;\"||\"&#\"+e.charCodeAt()+\";\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\"\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\"Unexpected parent node type \"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\"child not in parent\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\"Unexpected node type \"+t.nodeType+\" for parent node type \"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\"More than one element or text in fragment\");if(1===r.length&&!ks(e,i))throw new rs(is,\"Element in fragment can not be inserted before doctype\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\"Only one element can be added and only after doctype\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\"Only one doctype is allowed\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\"Doctype can only be inserted before an element\");if(!i&&a)throw new rs(is,\"Doctype can not be appended since element is present\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\"More than one element or text in fragment\");if(1===r.length&&!xs(e,i))throw new rs(is,\"Element in fragment can not be inserted before doctype\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\"Only one element can be added and only after doctype\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\"Only one doctype is allowed\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\"Doctype can only be inserted before an element\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\"\")}function Hs(e,t,i){var s=e.prefix||\"\",n=e.namespaceURI;if(!n)return!1;if(\"xml\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\" \",t,'=\"',i.replace(/[<>&\"\\t\\n\\r]/g,gs),'\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\"string\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\"xmlns\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\"\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\":\"+l);break}}}t.push(\"<\",c);for(var m=0;m<a;m++){\"xmlns\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\"xmlns\"==g.nodeName&&n.push({prefix:\"\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\"\")?\"xmlns:\"+f:\"xmlns\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\"\")?\"xmlns:\"+f:\"xmlns\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\">\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\"</\",c,\">\")}else t.push(\"/>\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\"<![CDATA[\",e.data,\"]]>\");case Yi:return t.push(\"\\x3c!--\",e.data,\"--\\x3e\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\"<!DOCTYPE \",e.name),v)t.push(\" PUBLIC \",v),b&&\".\"!=b&&t.push(\" \",b),t.push(\">\");else if(b&&\".\"!=b)t.push(\" SYSTEM \",b,\">\");else{var _=e.internalSubset;_&&t.push(\" [\",_,\"]\"),t.push(\">\")}return;case Xi:return t.push(\"<?\",e.target,\" \",e.data,\"?>\");case Wi:return t.push(\"&\",e.nodeName,\";\");default:t.push(\"??\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\"object\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\"Invalid state\",11),es.SYNTAX_ERR=(ts[12]=\"Syntax error\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\"Invalid modification\",13),es.NAMESPACE_ERR=(ts[14]=\"Invalid namespace\",14),es.INVALID_ACCESS_ERR=(ts[15]=\"Invalid access\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\"\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\"\",s.systemId=i||\"\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\"#document\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\"id\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\"class\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\":\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\":\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\"\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\"\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\"\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\"\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\"*\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\"*\"!==e&&n.namespaceURI!==e||\"*\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\"\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\"\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\"#text\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\"#comment\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\"#cdata-section\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\"#document-fragment\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\"\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\"length\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\"textContent\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\"$$\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",quot:'\"'}),e.HTML_ENTITIES=t({Aacute:\"Á\",aacute:\"á\",Abreve:\"Ă\",abreve:\"ă\",ac:\"∾\",acd:\"∿\",acE:\"∾̳\",Acirc:\"Â\",acirc:\"â\",acute:\"´\",Acy:\"А\",acy:\"а\",AElig:\"Æ\",aelig:\"æ\",af:\"⁡\",Afr:\"𝔄\",afr:\"𝔞\",Agrave:\"À\",agrave:\"à\",alefsym:\"ℵ\",aleph:\"ℵ\",Alpha:\"Α\",alpha:\"α\",Amacr:\"Ā\",amacr:\"ā\",amalg:\"⨿\",AMP:\"&\",amp:\"&\",And:\"⩓\",and:\"∧\",andand:\"⩕\",andd:\"⩜\",andslope:\"⩘\",andv:\"⩚\",ang:\"∠\",ange:\"⦤\",angle:\"∠\",angmsd:\"∡\",angmsdaa:\"⦨\",angmsdab:\"⦩\",angmsdac:\"⦪\",angmsdad:\"⦫\",angmsdae:\"⦬\",angmsdaf:\"⦭\",angmsdag:\"⦮\",angmsdah:\"⦯\",angrt:\"∟\",angrtvb:\"⊾\",angrtvbd:\"⦝\",angsph:\"∢\",angst:\"Å\",angzarr:\"⍼\",Aogon:\"Ą\",aogon:\"ą\",Aopf:\"𝔸\",aopf:\"𝕒\",ap:\"≈\",apacir:\"⩯\",apE:\"⩰\",ape:\"≊\",apid:\"≋\",apos:\"'\",ApplyFunction:\"⁡\",approx:\"≈\",approxeq:\"≊\",Aring:\"Å\",aring:\"å\",Ascr:\"𝒜\",ascr:\"𝒶\",Assign:\"≔\",ast:\"*\",asymp:\"≈\",asympeq:\"≍\",Atilde:\"Ã\",atilde:\"ã\",Auml:\"Ä\",auml:\"ä\",awconint:\"∳\",awint:\"⨑\",backcong:\"≌\",backepsilon:\"϶\",backprime:\"‵\",backsim:\"∽\",backsimeq:\"⋍\",Backslash:\"∖\",Barv:\"⫧\",barvee:\"⊽\",Barwed:\"⌆\",barwed:\"⌅\",barwedge:\"⌅\",bbrk:\"⎵\",bbrktbrk:\"⎶\",bcong:\"≌\",Bcy:\"Б\",bcy:\"б\",bdquo:\"„\",becaus:\"∵\",Because:\"∵\",because:\"∵\",bemptyv:\"⦰\",bepsi:\"϶\",bernou:\"ℬ\",Bernoullis:\"ℬ\",Beta:\"Β\",beta:\"β\",beth:\"ℶ\",between:\"≬\",Bfr:\"𝔅\",bfr:\"𝔟\",bigcap:\"⋂\",bigcirc:\"◯\",bigcup:\"⋃\",bigodot:\"⨀\",bigoplus:\"⨁\",bigotimes:\"⨂\",bigsqcup:\"⨆\",bigstar:\"★\",bigtriangledown:\"▽\",bigtriangleup:\"△\",biguplus:\"⨄\",bigvee:\"⋁\",bigwedge:\"⋀\",bkarow:\"⤍\",blacklozenge:\"⧫\",blacksquare:\"▪\",blacktriangle:\"▴\",blacktriangledown:\"▾\",blacktriangleleft:\"◂\",blacktriangleright:\"▸\",blank:\"␣\",blk12:\"▒\",blk14:\"░\",blk34:\"▓\",block:\"█\",bne:\"=⃥\",bnequiv:\"≡⃥\",bNot:\"⫭\",bnot:\"⌐\",Bopf:\"𝔹\",bopf:\"𝕓\",bot:\"⊥\",bottom:\"⊥\",bowtie:\"⋈\",boxbox:\"⧉\",boxDL:\"╗\",boxDl:\"╖\",boxdL:\"╕\",boxdl:\"┐\",boxDR:\"╔\",boxDr:\"╓\",boxdR:\"╒\",boxdr:\"┌\",boxH:\"═\",boxh:\"─\",boxHD:\"╦\",boxHd:\"╤\",boxhD:\"╥\",boxhd:\"┬\",boxHU:\"╩\",boxHu:\"╧\",boxhU:\"╨\",boxhu:\"┴\",boxminus:\"⊟\",boxplus:\"⊞\",boxtimes:\"⊠\",boxUL:\"╝\",boxUl:\"╜\",boxuL:\"╛\",boxul:\"┘\",boxUR:\"╚\",boxUr:\"╙\",boxuR:\"╘\",boxur:\"└\",boxV:\"║\",boxv:\"│\",boxVH:\"╬\",boxVh:\"╫\",boxvH:\"╪\",boxvh:\"┼\",boxVL:\"╣\",boxVl:\"╢\",boxvL:\"╡\",boxvl:\"┤\",boxVR:\"╠\",boxVr:\"╟\",boxvR:\"╞\",boxvr:\"├\",bprime:\"‵\",Breve:\"˘\",breve:\"˘\",brvbar:\"¦\",Bscr:\"ℬ\",bscr:\"𝒷\",bsemi:\"⁏\",bsim:\"∽\",bsime:\"⋍\",bsol:\"\\\\\",bsolb:\"⧅\",bsolhsub:\"⟈\",bull:\"•\",bullet:\"•\",bump:\"≎\",bumpE:\"⪮\",bumpe:\"≏\",Bumpeq:\"≎\",bumpeq:\"≏\",Cacute:\"Ć\",cacute:\"ć\",Cap:\"⋒\",cap:\"∩\",capand:\"⩄\",capbrcup:\"⩉\",capcap:\"⩋\",capcup:\"⩇\",capdot:\"⩀\",CapitalDifferentialD:\"ⅅ\",caps:\"∩︀\",caret:\"⁁\",caron:\"ˇ\",Cayleys:\"ℭ\",ccaps:\"⩍\",Ccaron:\"Č\",ccaron:\"č\",Ccedil:\"Ç\",ccedil:\"ç\",Ccirc:\"Ĉ\",ccirc:\"ĉ\",Cconint:\"∰\",ccups:\"⩌\",ccupssm:\"⩐\",Cdot:\"Ċ\",cdot:\"ċ\",cedil:\"¸\",Cedilla:\"¸\",cemptyv:\"⦲\",cent:\"¢\",CenterDot:\"·\",centerdot:\"·\",Cfr:\"ℭ\",cfr:\"𝔠\",CHcy:\"Ч\",chcy:\"ч\",check:\"✓\",checkmark:\"✓\",Chi:\"Χ\",chi:\"χ\",cir:\"○\",circ:\"ˆ\",circeq:\"≗\",circlearrowleft:\"↺\",circlearrowright:\"↻\",circledast:\"⊛\",circledcirc:\"⊚\",circleddash:\"⊝\",CircleDot:\"⊙\",circledR:\"®\",circledS:\"Ⓢ\",CircleMinus:\"⊖\",CirclePlus:\"⊕\",CircleTimes:\"⊗\",cirE:\"⧃\",cire:\"≗\",cirfnint:\"⨐\",cirmid:\"⫯\",cirscir:\"⧂\",ClockwiseContourIntegral:\"∲\",CloseCurlyDoubleQuote:\"”\",CloseCurlyQuote:\"’\",clubs:\"♣\",clubsuit:\"♣\",Colon:\"∷\",colon:\":\",Colone:\"⩴\",colone:\"≔\",coloneq:\"≔\",comma:\",\",commat:\"@\",comp:\"∁\",compfn:\"∘\",complement:\"∁\",complexes:\"ℂ\",cong:\"≅\",congdot:\"⩭\",Congruent:\"≡\",Conint:\"∯\",conint:\"∮\",ContourIntegral:\"∮\",Copf:\"ℂ\",copf:\"𝕔\",coprod:\"∐\",Coproduct:\"∐\",COPY:\"©\",copy:\"©\",copysr:\"℗\",CounterClockwiseContourIntegral:\"∳\",crarr:\"↵\",Cross:\"⨯\",cross:\"✗\",Cscr:\"𝒞\",cscr:\"𝒸\",csub:\"⫏\",csube:\"⫑\",csup:\"⫐\",csupe:\"⫒\",ctdot:\"⋯\",cudarrl:\"⤸\",cudarrr:\"⤵\",cuepr:\"⋞\",cuesc:\"⋟\",cularr:\"↶\",cularrp:\"⤽\",Cup:\"⋓\",cup:\"∪\",cupbrcap:\"⩈\",CupCap:\"≍\",cupcap:\"⩆\",cupcup:\"⩊\",cupdot:\"⊍\",cupor:\"⩅\",cups:\"∪︀\",curarr:\"↷\",curarrm:\"⤼\",curlyeqprec:\"⋞\",curlyeqsucc:\"⋟\",curlyvee:\"⋎\",curlywedge:\"⋏\",curren:\"¤\",curvearrowleft:\"↶\",curvearrowright:\"↷\",cuvee:\"⋎\",cuwed:\"⋏\",cwconint:\"∲\",cwint:\"∱\",cylcty:\"⌭\",Dagger:\"‡\",dagger:\"†\",daleth:\"ℸ\",Darr:\"↡\",dArr:\"⇓\",darr:\"↓\",dash:\"‐\",Dashv:\"⫤\",dashv:\"⊣\",dbkarow:\"⤏\",dblac:\"˝\",Dcaron:\"Ď\",dcaron:\"ď\",Dcy:\"Д\",dcy:\"д\",DD:\"ⅅ\",dd:\"ⅆ\",ddagger:\"‡\",ddarr:\"⇊\",DDotrahd:\"⤑\",ddotseq:\"⩷\",deg:\"°\",Del:\"∇\",Delta:\"Δ\",delta:\"δ\",demptyv:\"⦱\",dfisht:\"⥿\",Dfr:\"𝔇\",dfr:\"𝔡\",dHar:\"⥥\",dharl:\"⇃\",dharr:\"⇂\",DiacriticalAcute:\"´\",DiacriticalDot:\"˙\",DiacriticalDoubleAcute:\"˝\",DiacriticalGrave:\"`\",DiacriticalTilde:\"˜\",diam:\"⋄\",Diamond:\"⋄\",diamond:\"⋄\",diamondsuit:\"♦\",diams:\"♦\",die:\"¨\",DifferentialD:\"ⅆ\",digamma:\"ϝ\",disin:\"⋲\",div:\"÷\",divide:\"÷\",divideontimes:\"⋇\",divonx:\"⋇\",DJcy:\"Ђ\",djcy:\"ђ\",dlcorn:\"⌞\",dlcrop:\"⌍\",dollar:\"$\",Dopf:\"𝔻\",dopf:\"𝕕\",Dot:\"¨\",dot:\"˙\",DotDot:\"⃜\",doteq:\"≐\",doteqdot:\"≑\",DotEqual:\"≐\",dotminus:\"∸\",dotplus:\"∔\",dotsquare:\"⊡\",doublebarwedge:\"⌆\",DoubleContourIntegral:\"∯\",DoubleDot:\"¨\",DoubleDownArrow:\"⇓\",DoubleLeftArrow:\"⇐\",DoubleLeftRightArrow:\"⇔\",DoubleLeftTee:\"⫤\",DoubleLongLeftArrow:\"⟸\",DoubleLongLeftRightArrow:\"⟺\",DoubleLongRightArrow:\"⟹\",DoubleRightArrow:\"⇒\",DoubleRightTee:\"⊨\",DoubleUpArrow:\"⇑\",DoubleUpDownArrow:\"⇕\",DoubleVerticalBar:\"∥\",DownArrow:\"↓\",Downarrow:\"⇓\",downarrow:\"↓\",DownArrowBar:\"⤓\",DownArrowUpArrow:\"⇵\",DownBreve:\"̑\",downdownarrows:\"⇊\",downharpoonleft:\"⇃\",downharpoonright:\"⇂\",DownLeftRightVector:\"⥐\",DownLeftTeeVector:\"⥞\",DownLeftVector:\"↽\",DownLeftVectorBar:\"⥖\",DownRightTeeVector:\"⥟\",DownRightVector:\"⇁\",DownRightVectorBar:\"⥗\",DownTee:\"⊤\",DownTeeArrow:\"↧\",drbkarow:\"⤐\",drcorn:\"⌟\",drcrop:\"⌌\",Dscr:\"𝒟\",dscr:\"𝒹\",DScy:\"Ѕ\",dscy:\"ѕ\",dsol:\"⧶\",Dstrok:\"Đ\",dstrok:\"đ\",dtdot:\"⋱\",dtri:\"▿\",dtrif:\"▾\",duarr:\"⇵\",duhar:\"⥯\",dwangle:\"⦦\",DZcy:\"Џ\",dzcy:\"џ\",dzigrarr:\"⟿\",Eacute:\"É\",eacute:\"é\",easter:\"⩮\",Ecaron:\"Ě\",ecaron:\"ě\",ecir:\"≖\",Ecirc:\"Ê\",ecirc:\"ê\",ecolon:\"≕\",Ecy:\"Э\",ecy:\"э\",eDDot:\"⩷\",Edot:\"Ė\",eDot:\"≑\",edot:\"ė\",ee:\"ⅇ\",efDot:\"≒\",Efr:\"𝔈\",efr:\"𝔢\",eg:\"⪚\",Egrave:\"È\",egrave:\"è\",egs:\"⪖\",egsdot:\"⪘\",el:\"⪙\",Element:\"∈\",elinters:\"⏧\",ell:\"ℓ\",els:\"⪕\",elsdot:\"⪗\",Emacr:\"Ē\",emacr:\"ē\",empty:\"∅\",emptyset:\"∅\",EmptySmallSquare:\"◻\",emptyv:\"∅\",EmptyVerySmallSquare:\"▫\",emsp:\" \",emsp13:\" \",emsp14:\" \",ENG:\"Ŋ\",eng:\"ŋ\",ensp:\" \",Eogon:\"Ę\",eogon:\"ę\",Eopf:\"𝔼\",eopf:\"𝕖\",epar:\"⋕\",eparsl:\"⧣\",eplus:\"⩱\",epsi:\"ε\",Epsilon:\"Ε\",epsilon:\"ε\",epsiv:\"ϵ\",eqcirc:\"≖\",eqcolon:\"≕\",eqsim:\"≂\",eqslantgtr:\"⪖\",eqslantless:\"⪕\",Equal:\"⩵\",equals:\"=\",EqualTilde:\"≂\",equest:\"≟\",Equilibrium:\"⇌\",equiv:\"≡\",equivDD:\"⩸\",eqvparsl:\"⧥\",erarr:\"⥱\",erDot:\"≓\",Escr:\"ℰ\",escr:\"ℯ\",esdot:\"≐\",Esim:\"⩳\",esim:\"≂\",Eta:\"Η\",eta:\"η\",ETH:\"Ð\",eth:\"ð\",Euml:\"Ë\",euml:\"ë\",euro:\"€\",excl:\"!\",exist:\"∃\",Exists:\"∃\",expectation:\"ℰ\",ExponentialE:\"ⅇ\",exponentiale:\"ⅇ\",fallingdotseq:\"≒\",Fcy:\"Ф\",fcy:\"ф\",female:\"♀\",ffilig:\"ﬃ\",fflig:\"ﬀ\",ffllig:\"ﬄ\",Ffr:\"𝔉\",ffr:\"𝔣\",filig:\"ﬁ\",FilledSmallSquare:\"◼\",FilledVerySmallSquare:\"▪\",fjlig:\"fj\",flat:\"♭\",fllig:\"ﬂ\",fltns:\"▱\",fnof:\"ƒ\",Fopf:\"𝔽\",fopf:\"𝕗\",ForAll:\"∀\",forall:\"∀\",fork:\"⋔\",forkv:\"⫙\",Fouriertrf:\"ℱ\",fpartint:\"⨍\",frac12:\"½\",frac13:\"⅓\",frac14:\"¼\",frac15:\"⅕\",frac16:\"⅙\",frac18:\"⅛\",frac23:\"⅔\",frac25:\"⅖\",frac34:\"¾\",frac35:\"⅗\",frac38:\"⅜\",frac45:\"⅘\",frac56:\"⅚\",frac58:\"⅝\",frac78:\"⅞\",frasl:\"⁄\",frown:\"⌢\",Fscr:\"ℱ\",fscr:\"𝒻\",gacute:\"ǵ\",Gamma:\"Γ\",gamma:\"γ\",Gammad:\"Ϝ\",gammad:\"ϝ\",gap:\"⪆\",Gbreve:\"Ğ\",gbreve:\"ğ\",Gcedil:\"Ģ\",Gcirc:\"Ĝ\",gcirc:\"ĝ\",Gcy:\"Г\",gcy:\"г\",Gdot:\"Ġ\",gdot:\"ġ\",gE:\"≧\",ge:\"≥\",gEl:\"⪌\",gel:\"⋛\",geq:\"≥\",geqq:\"≧\",geqslant:\"⩾\",ges:\"⩾\",gescc:\"⪩\",gesdot:\"⪀\",gesdoto:\"⪂\",gesdotol:\"⪄\",gesl:\"⋛︀\",gesles:\"⪔\",Gfr:\"𝔊\",gfr:\"𝔤\",Gg:\"⋙\",gg:\"≫\",ggg:\"⋙\",gimel:\"ℷ\",GJcy:\"Ѓ\",gjcy:\"ѓ\",gl:\"≷\",gla:\"⪥\",glE:\"⪒\",glj:\"⪤\",gnap:\"⪊\",gnapprox:\"⪊\",gnE:\"≩\",gne:\"⪈\",gneq:\"⪈\",gneqq:\"≩\",gnsim:\"⋧\",Gopf:\"𝔾\",gopf:\"𝕘\",grave:\"`\",GreaterEqual:\"≥\",GreaterEqualLess:\"⋛\",GreaterFullEqual:\"≧\",GreaterGreater:\"⪢\",GreaterLess:\"≷\",GreaterSlantEqual:\"⩾\",GreaterTilde:\"≳\",Gscr:\"𝒢\",gscr:\"ℊ\",gsim:\"≳\",gsime:\"⪎\",gsiml:\"⪐\",Gt:\"≫\",GT:\">\",gt:\">\",gtcc:\"⪧\",gtcir:\"⩺\",gtdot:\"⋗\",gtlPar:\"⦕\",gtquest:\"⩼\",gtrapprox:\"⪆\",gtrarr:\"⥸\",gtrdot:\"⋗\",gtreqless:\"⋛\",gtreqqless:\"⪌\",gtrless:\"≷\",gtrsim:\"≳\",gvertneqq:\"≩︀\",gvnE:\"≩︀\",Hacek:\"ˇ\",hairsp:\" \",half:\"½\",hamilt:\"ℋ\",HARDcy:\"Ъ\",hardcy:\"ъ\",hArr:\"⇔\",harr:\"↔\",harrcir:\"⥈\",harrw:\"↭\",Hat:\"^\",hbar:\"ℏ\",Hcirc:\"Ĥ\",hcirc:\"ĥ\",hearts:\"♥\",heartsuit:\"♥\",hellip:\"…\",hercon:\"⊹\",Hfr:\"ℌ\",hfr:\"𝔥\",HilbertSpace:\"ℋ\",hksearow:\"⤥\",hkswarow:\"⤦\",hoarr:\"⇿\",homtht:\"∻\",hookleftarrow:\"↩\",hookrightarrow:\"↪\",Hopf:\"ℍ\",hopf:\"𝕙\",horbar:\"―\",HorizontalLine:\"─\",Hscr:\"ℋ\",hscr:\"𝒽\",hslash:\"ℏ\",Hstrok:\"Ħ\",hstrok:\"ħ\",HumpDownHump:\"≎\",HumpEqual:\"≏\",hybull:\"⁃\",hyphen:\"‐\",Iacute:\"Í\",iacute:\"í\",ic:\"⁣\",Icirc:\"Î\",icirc:\"î\",Icy:\"И\",icy:\"и\",Idot:\"İ\",IEcy:\"Е\",iecy:\"е\",iexcl:\"¡\",iff:\"⇔\",Ifr:\"ℑ\",ifr:\"𝔦\",Igrave:\"Ì\",igrave:\"ì\",ii:\"ⅈ\",iiiint:\"⨌\",iiint:\"∭\",iinfin:\"⧜\",iiota:\"℩\",IJlig:\"Ĳ\",ijlig:\"ĳ\",Im:\"ℑ\",Imacr:\"Ī\",imacr:\"ī\",image:\"ℑ\",ImaginaryI:\"ⅈ\",imagline:\"ℐ\",imagpart:\"ℑ\",imath:\"ı\",imof:\"⊷\",imped:\"Ƶ\",Implies:\"⇒\",in:\"∈\",incare:\"℅\",infin:\"∞\",infintie:\"⧝\",inodot:\"ı\",Int:\"∬\",int:\"∫\",intcal:\"⊺\",integers:\"ℤ\",Integral:\"∫\",intercal:\"⊺\",Intersection:\"⋂\",intlarhk:\"⨗\",intprod:\"⨼\",InvisibleComma:\"⁣\",InvisibleTimes:\"⁢\",IOcy:\"Ё\",iocy:\"ё\",Iogon:\"Į\",iogon:\"į\",Iopf:\"𝕀\",iopf:\"𝕚\",Iota:\"Ι\",iota:\"ι\",iprod:\"⨼\",iquest:\"¿\",Iscr:\"ℐ\",iscr:\"𝒾\",isin:\"∈\",isindot:\"⋵\",isinE:\"⋹\",isins:\"⋴\",isinsv:\"⋳\",isinv:\"∈\",it:\"⁢\",Itilde:\"Ĩ\",itilde:\"ĩ\",Iukcy:\"І\",iukcy:\"і\",Iuml:\"Ï\",iuml:\"ï\",Jcirc:\"Ĵ\",jcirc:\"ĵ\",Jcy:\"Й\",jcy:\"й\",Jfr:\"𝔍\",jfr:\"𝔧\",jmath:\"ȷ\",Jopf:\"𝕁\",jopf:\"𝕛\",Jscr:\"𝒥\",jscr:\"𝒿\",Jsercy:\"Ј\",jsercy:\"ј\",Jukcy:\"Є\",jukcy:\"є\",Kappa:\"Κ\",kappa:\"κ\",kappav:\"ϰ\",Kcedil:\"Ķ\",kcedil:\"ķ\",Kcy:\"К\",kcy:\"к\",Kfr:\"𝔎\",kfr:\"𝔨\",kgreen:\"ĸ\",KHcy:\"Х\",khcy:\"х\",KJcy:\"Ќ\",kjcy:\"ќ\",Kopf:\"𝕂\",kopf:\"𝕜\",Kscr:\"𝒦\",kscr:\"𝓀\",lAarr:\"⇚\",Lacute:\"Ĺ\",lacute:\"ĺ\",laemptyv:\"⦴\",lagran:\"ℒ\",Lambda:\"Λ\",lambda:\"λ\",Lang:\"⟪\",lang:\"⟨\",langd:\"⦑\",langle:\"⟨\",lap:\"⪅\",Laplacetrf:\"ℒ\",laquo:\"«\",Larr:\"↞\",lArr:\"⇐\",larr:\"←\",larrb:\"⇤\",larrbfs:\"⤟\",larrfs:\"⤝\",larrhk:\"↩\",larrlp:\"↫\",larrpl:\"⤹\",larrsim:\"⥳\",larrtl:\"↢\",lat:\"⪫\",lAtail:\"⤛\",latail:\"⤙\",late:\"⪭\",lates:\"⪭︀\",lBarr:\"⤎\",lbarr:\"⤌\",lbbrk:\"❲\",lbrace:\"{\",lbrack:\"[\",lbrke:\"⦋\",lbrksld:\"⦏\",lbrkslu:\"⦍\",Lcaron:\"Ľ\",lcaron:\"ľ\",Lcedil:\"Ļ\",lcedil:\"ļ\",lceil:\"⌈\",lcub:\"{\",Lcy:\"Л\",lcy:\"л\",ldca:\"⤶\",ldquo:\"“\",ldquor:\"„\",ldrdhar:\"⥧\",ldrushar:\"⥋\",ldsh:\"↲\",lE:\"≦\",le:\"≤\",LeftAngleBracket:\"⟨\",LeftArrow:\"←\",Leftarrow:\"⇐\",leftarrow:\"←\",LeftArrowBar:\"⇤\",LeftArrowRightArrow:\"⇆\",leftarrowtail:\"↢\",LeftCeiling:\"⌈\",LeftDoubleBracket:\"⟦\",LeftDownTeeVector:\"⥡\",LeftDownVector:\"⇃\",LeftDownVectorBar:\"⥙\",LeftFloor:\"⌊\",leftharpoondown:\"↽\",leftharpoonup:\"↼\",leftleftarrows:\"⇇\",LeftRightArrow:\"↔\",Leftrightarrow:\"⇔\",leftrightarrow:\"↔\",leftrightarrows:\"⇆\",leftrightharpoons:\"⇋\",leftrightsquigarrow:\"↭\",LeftRightVector:\"⥎\",LeftTee:\"⊣\",LeftTeeArrow:\"↤\",LeftTeeVector:\"⥚\",leftthreetimes:\"⋋\",LeftTriangle:\"⊲\",LeftTriangleBar:\"⧏\",LeftTriangleEqual:\"⊴\",LeftUpDownVector:\"⥑\",LeftUpTeeVector:\"⥠\",LeftUpVector:\"↿\",LeftUpVectorBar:\"⥘\",LeftVector:\"↼\",LeftVectorBar:\"⥒\",lEg:\"⪋\",leg:\"⋚\",leq:\"≤\",leqq:\"≦\",leqslant:\"⩽\",les:\"⩽\",lescc:\"⪨\",lesdot:\"⩿\",lesdoto:\"⪁\",lesdotor:\"⪃\",lesg:\"⋚︀\",lesges:\"⪓\",lessapprox:\"⪅\",lessdot:\"⋖\",lesseqgtr:\"⋚\",lesseqqgtr:\"⪋\",LessEqualGreater:\"⋚\",LessFullEqual:\"≦\",LessGreater:\"≶\",lessgtr:\"≶\",LessLess:\"⪡\",lesssim:\"≲\",LessSlantEqual:\"⩽\",LessTilde:\"≲\",lfisht:\"⥼\",lfloor:\"⌊\",Lfr:\"𝔏\",lfr:\"𝔩\",lg:\"≶\",lgE:\"⪑\",lHar:\"⥢\",lhard:\"↽\",lharu:\"↼\",lharul:\"⥪\",lhblk:\"▄\",LJcy:\"Љ\",ljcy:\"љ\",Ll:\"⋘\",ll:\"≪\",llarr:\"⇇\",llcorner:\"⌞\",Lleftarrow:\"⇚\",llhard:\"⥫\",lltri:\"◺\",Lmidot:\"Ŀ\",lmidot:\"ŀ\",lmoust:\"⎰\",lmoustache:\"⎰\",lnap:\"⪉\",lnapprox:\"⪉\",lnE:\"≨\",lne:\"⪇\",lneq:\"⪇\",lneqq:\"≨\",lnsim:\"⋦\",loang:\"⟬\",loarr:\"⇽\",lobrk:\"⟦\",LongLeftArrow:\"⟵\",Longleftarrow:\"⟸\",longleftarrow:\"⟵\",LongLeftRightArrow:\"⟷\",Longleftrightarrow:\"⟺\",longleftrightarrow:\"⟷\",longmapsto:\"⟼\",LongRightArrow:\"⟶\",Longrightarrow:\"⟹\",longrightarrow:\"⟶\",looparrowleft:\"↫\",looparrowright:\"↬\",lopar:\"⦅\",Lopf:\"𝕃\",lopf:\"𝕝\",loplus:\"⨭\",lotimes:\"⨴\",lowast:\"∗\",lowbar:\"_\",LowerLeftArrow:\"↙\",LowerRightArrow:\"↘\",loz:\"◊\",lozenge:\"◊\",lozf:\"⧫\",lpar:\"(\",lparlt:\"⦓\",lrarr:\"⇆\",lrcorner:\"⌟\",lrhar:\"⇋\",lrhard:\"⥭\",lrm:\"‎\",lrtri:\"⊿\",lsaquo:\"‹\",Lscr:\"ℒ\",lscr:\"𝓁\",Lsh:\"↰\",lsh:\"↰\",lsim:\"≲\",lsime:\"⪍\",lsimg:\"⪏\",lsqb:\"[\",lsquo:\"‘\",lsquor:\"‚\",Lstrok:\"Ł\",lstrok:\"ł\",Lt:\"≪\",LT:\"<\",lt:\"<\",ltcc:\"⪦\",ltcir:\"⩹\",ltdot:\"⋖\",lthree:\"⋋\",ltimes:\"⋉\",ltlarr:\"⥶\",ltquest:\"⩻\",ltri:\"◃\",ltrie:\"⊴\",ltrif:\"◂\",ltrPar:\"⦖\",lurdshar:\"⥊\",luruhar:\"⥦\",lvertneqq:\"≨︀\",lvnE:\"≨︀\",macr:\"¯\",male:\"♂\",malt:\"✠\",maltese:\"✠\",Map:\"⤅\",map:\"↦\",mapsto:\"↦\",mapstodown:\"↧\",mapstoleft:\"↤\",mapstoup:\"↥\",marker:\"▮\",mcomma:\"⨩\",Mcy:\"М\",mcy:\"м\",mdash:\"—\",mDDot:\"∺\",measuredangle:\"∡\",MediumSpace:\" \",Mellintrf:\"ℳ\",Mfr:\"𝔐\",mfr:\"𝔪\",mho:\"℧\",micro:\"µ\",mid:\"∣\",midast:\"*\",midcir:\"⫰\",middot:\"·\",minus:\"−\",minusb:\"⊟\",minusd:\"∸\",minusdu:\"⨪\",MinusPlus:\"∓\",mlcp:\"⫛\",mldr:\"…\",mnplus:\"∓\",models:\"⊧\",Mopf:\"𝕄\",mopf:\"𝕞\",mp:\"∓\",Mscr:\"ℳ\",mscr:\"𝓂\",mstpos:\"∾\",Mu:\"Μ\",mu:\"μ\",multimap:\"⊸\",mumap:\"⊸\",nabla:\"∇\",Nacute:\"Ń\",nacute:\"ń\",nang:\"∠⃒\",nap:\"≉\",napE:\"⩰̸\",napid:\"≋̸\",napos:\"ŉ\",napprox:\"≉\",natur:\"♮\",natural:\"♮\",naturals:\"ℕ\",nbsp:\" \",nbump:\"≎̸\",nbumpe:\"≏̸\",ncap:\"⩃\",Ncaron:\"Ň\",ncaron:\"ň\",Ncedil:\"Ņ\",ncedil:\"ņ\",ncong:\"≇\",ncongdot:\"⩭̸\",ncup:\"⩂\",Ncy:\"Н\",ncy:\"н\",ndash:\"–\",ne:\"≠\",nearhk:\"⤤\",neArr:\"⇗\",nearr:\"↗\",nearrow:\"↗\",nedot:\"≐̸\",NegativeMediumSpace:\"​\",NegativeThickSpace:\"​\",NegativeThinSpace:\"​\",NegativeVeryThinSpace:\"​\",nequiv:\"≢\",nesear:\"⤨\",nesim:\"≂̸\",NestedGreaterGreater:\"≫\",NestedLessLess:\"≪\",NewLine:\"\\n\",nexist:\"∄\",nexists:\"∄\",Nfr:\"𝔑\",nfr:\"𝔫\",ngE:\"≧̸\",nge:\"≱\",ngeq:\"≱\",ngeqq:\"≧̸\",ngeqslant:\"⩾̸\",nges:\"⩾̸\",nGg:\"⋙̸\",ngsim:\"≵\",nGt:\"≫⃒\",ngt:\"≯\",ngtr:\"≯\",nGtv:\"≫̸\",nhArr:\"⇎\",nharr:\"↮\",nhpar:\"⫲\",ni:\"∋\",nis:\"⋼\",nisd:\"⋺\",niv:\"∋\",NJcy:\"Њ\",njcy:\"њ\",nlArr:\"⇍\",nlarr:\"↚\",nldr:\"‥\",nlE:\"≦̸\",nle:\"≰\",nLeftarrow:\"⇍\",nleftarrow:\"↚\",nLeftrightarrow:\"⇎\",nleftrightarrow:\"↮\",nleq:\"≰\",nleqq:\"≦̸\",nleqslant:\"⩽̸\",nles:\"⩽̸\",nless:\"≮\",nLl:\"⋘̸\",nlsim:\"≴\",nLt:\"≪⃒\",nlt:\"≮\",nltri:\"⋪\",nltrie:\"⋬\",nLtv:\"≪̸\",nmid:\"∤\",NoBreak:\"⁠\",NonBreakingSpace:\" \",Nopf:\"ℕ\",nopf:\"𝕟\",Not:\"⫬\",not:\"¬\",NotCongruent:\"≢\",NotCupCap:\"≭\",NotDoubleVerticalBar:\"∦\",NotElement:\"∉\",NotEqual:\"≠\",NotEqualTilde:\"≂̸\",NotExists:\"∄\",NotGreater:\"≯\",NotGreaterEqual:\"≱\",NotGreaterFullEqual:\"≧̸\",NotGreaterGreater:\"≫̸\",NotGreaterLess:\"≹\",NotGreaterSlantEqual:\"⩾̸\",NotGreaterTilde:\"≵\",NotHumpDownHump:\"≎̸\",NotHumpEqual:\"≏̸\",notin:\"∉\",notindot:\"⋵̸\",notinE:\"⋹̸\",notinva:\"∉\",notinvb:\"⋷\",notinvc:\"⋶\",NotLeftTriangle:\"⋪\",NotLeftTriangleBar:\"⧏̸\",NotLeftTriangleEqual:\"⋬\",NotLess:\"≮\",NotLessEqual:\"≰\",NotLessGreater:\"≸\",NotLessLess:\"≪̸\",NotLessSlantEqual:\"⩽̸\",NotLessTilde:\"≴\",NotNestedGreaterGreater:\"⪢̸\",NotNestedLessLess:\"⪡̸\",notni:\"∌\",notniva:\"∌\",notnivb:\"⋾\",notnivc:\"⋽\",NotPrecedes:\"⊀\",NotPrecedesEqual:\"⪯̸\",NotPrecedesSlantEqual:\"⋠\",NotReverseElement:\"∌\",NotRightTriangle:\"⋫\",NotRightTriangleBar:\"⧐̸\",NotRightTriangleEqual:\"⋭\",NotSquareSubset:\"⊏̸\",NotSquareSubsetEqual:\"⋢\",NotSquareSuperset:\"⊐̸\",NotSquareSupersetEqual:\"⋣\",NotSubset:\"⊂⃒\",NotSubsetEqual:\"⊈\",NotSucceeds:\"⊁\",NotSucceedsEqual:\"⪰̸\",NotSucceedsSlantEqual:\"⋡\",NotSucceedsTilde:\"≿̸\",NotSuperset:\"⊃⃒\",NotSupersetEqual:\"⊉\",NotTilde:\"≁\",NotTildeEqual:\"≄\",NotTildeFullEqual:\"≇\",NotTildeTilde:\"≉\",NotVerticalBar:\"∤\",npar:\"∦\",nparallel:\"∦\",nparsl:\"⫽⃥\",npart:\"∂̸\",npolint:\"⨔\",npr:\"⊀\",nprcue:\"⋠\",npre:\"⪯̸\",nprec:\"⊀\",npreceq:\"⪯̸\",nrArr:\"⇏\",nrarr:\"↛\",nrarrc:\"⤳̸\",nrarrw:\"↝̸\",nRightarrow:\"⇏\",nrightarrow:\"↛\",nrtri:\"⋫\",nrtrie:\"⋭\",nsc:\"⊁\",nsccue:\"⋡\",nsce:\"⪰̸\",Nscr:\"𝒩\",nscr:\"𝓃\",nshortmid:\"∤\",nshortparallel:\"∦\",nsim:\"≁\",nsime:\"≄\",nsimeq:\"≄\",nsmid:\"∤\",nspar:\"∦\",nsqsube:\"⋢\",nsqsupe:\"⋣\",nsub:\"⊄\",nsubE:\"⫅̸\",nsube:\"⊈\",nsubset:\"⊂⃒\",nsubseteq:\"⊈\",nsubseteqq:\"⫅̸\",nsucc:\"⊁\",nsucceq:\"⪰̸\",nsup:\"⊅\",nsupE:\"⫆̸\",nsupe:\"⊉\",nsupset:\"⊃⃒\",nsupseteq:\"⊉\",nsupseteqq:\"⫆̸\",ntgl:\"≹\",Ntilde:\"Ñ\",ntilde:\"ñ\",ntlg:\"≸\",ntriangleleft:\"⋪\",ntrianglelefteq:\"⋬\",ntriangleright:\"⋫\",ntrianglerighteq:\"⋭\",Nu:\"Ν\",nu:\"ν\",num:\"#\",numero:\"№\",numsp:\" \",nvap:\"≍⃒\",nVDash:\"⊯\",nVdash:\"⊮\",nvDash:\"⊭\",nvdash:\"⊬\",nvge:\"≥⃒\",nvgt:\">⃒\",nvHarr:\"⤄\",nvinfin:\"⧞\",nvlArr:\"⤂\",nvle:\"≤⃒\",nvlt:\"<⃒\",nvltrie:\"⊴⃒\",nvrArr:\"⤃\",nvrtrie:\"⊵⃒\",nvsim:\"∼⃒\",nwarhk:\"⤣\",nwArr:\"⇖\",nwarr:\"↖\",nwarrow:\"↖\",nwnear:\"⤧\",Oacute:\"Ó\",oacute:\"ó\",oast:\"⊛\",ocir:\"⊚\",Ocirc:\"Ô\",ocirc:\"ô\",Ocy:\"О\",ocy:\"о\",odash:\"⊝\",Odblac:\"Ő\",odblac:\"ő\",odiv:\"⨸\",odot:\"⊙\",odsold:\"⦼\",OElig:\"Œ\",oelig:\"œ\",ofcir:\"⦿\",Ofr:\"𝔒\",ofr:\"𝔬\",ogon:\"˛\",Ograve:\"Ò\",ograve:\"ò\",ogt:\"⧁\",ohbar:\"⦵\",ohm:\"Ω\",oint:\"∮\",olarr:\"↺\",olcir:\"⦾\",olcross:\"⦻\",oline:\"‾\",olt:\"⧀\",Omacr:\"Ō\",omacr:\"ō\",Omega:\"Ω\",omega:\"ω\",Omicron:\"Ο\",omicron:\"ο\",omid:\"⦶\",ominus:\"⊖\",Oopf:\"𝕆\",oopf:\"𝕠\",opar:\"⦷\",OpenCurlyDoubleQuote:\"“\",OpenCurlyQuote:\"‘\",operp:\"⦹\",oplus:\"⊕\",Or:\"⩔\",or:\"∨\",orarr:\"↻\",ord:\"⩝\",order:\"ℴ\",orderof:\"ℴ\",ordf:\"ª\",ordm:\"º\",origof:\"⊶\",oror:\"⩖\",orslope:\"⩗\",orv:\"⩛\",oS:\"Ⓢ\",Oscr:\"𝒪\",oscr:\"ℴ\",Oslash:\"Ø\",oslash:\"ø\",osol:\"⊘\",Otilde:\"Õ\",otilde:\"õ\",Otimes:\"⨷\",otimes:\"⊗\",otimesas:\"⨶\",Ouml:\"Ö\",ouml:\"ö\",ovbar:\"⌽\",OverBar:\"‾\",OverBrace:\"⏞\",OverBracket:\"⎴\",OverParenthesis:\"⏜\",par:\"∥\",para:\"¶\",parallel:\"∥\",parsim:\"⫳\",parsl:\"⫽\",part:\"∂\",PartialD:\"∂\",Pcy:\"П\",pcy:\"п\",percnt:\"%\",period:\".\",permil:\"‰\",perp:\"⊥\",pertenk:\"‱\",Pfr:\"𝔓\",pfr:\"𝔭\",Phi:\"Φ\",phi:\"φ\",phiv:\"ϕ\",phmmat:\"ℳ\",phone:\"☎\",Pi:\"Π\",pi:\"π\",pitchfork:\"⋔\",piv:\"ϖ\",planck:\"ℏ\",planckh:\"ℎ\",plankv:\"ℏ\",plus:\"+\",plusacir:\"⨣\",plusb:\"⊞\",pluscir:\"⨢\",plusdo:\"∔\",plusdu:\"⨥\",pluse:\"⩲\",PlusMinus:\"±\",plusmn:\"±\",plussim:\"⨦\",plustwo:\"⨧\",pm:\"±\",Poincareplane:\"ℌ\",pointint:\"⨕\",Popf:\"ℙ\",popf:\"𝕡\",pound:\"£\",Pr:\"⪻\",pr:\"≺\",prap:\"⪷\",prcue:\"≼\",prE:\"⪳\",pre:\"⪯\",prec:\"≺\",precapprox:\"⪷\",preccurlyeq:\"≼\",Precedes:\"≺\",PrecedesEqual:\"⪯\",PrecedesSlantEqual:\"≼\",PrecedesTilde:\"≾\",preceq:\"⪯\",precnapprox:\"⪹\",precneqq:\"⪵\",precnsim:\"⋨\",precsim:\"≾\",Prime:\"″\",prime:\"′\",primes:\"ℙ\",prnap:\"⪹\",prnE:\"⪵\",prnsim:\"⋨\",prod:\"∏\",Product:\"∏\",profalar:\"⌮\",profline:\"⌒\",profsurf:\"⌓\",prop:\"∝\",Proportion:\"∷\",Proportional:\"∝\",propto:\"∝\",prsim:\"≾\",prurel:\"⊰\",Pscr:\"𝒫\",pscr:\"𝓅\",Psi:\"Ψ\",psi:\"ψ\",puncsp:\" \",Qfr:\"𝔔\",qfr:\"𝔮\",qint:\"⨌\",Qopf:\"ℚ\",qopf:\"𝕢\",qprime:\"⁗\",Qscr:\"𝒬\",qscr:\"𝓆\",quaternions:\"ℍ\",quatint:\"⨖\",quest:\"?\",questeq:\"≟\",QUOT:'\"',quot:'\"',rAarr:\"⇛\",race:\"∽̱\",Racute:\"Ŕ\",racute:\"ŕ\",radic:\"√\",raemptyv:\"⦳\",Rang:\"⟫\",rang:\"⟩\",rangd:\"⦒\",range:\"⦥\",rangle:\"⟩\",raquo:\"»\",Rarr:\"↠\",rArr:\"⇒\",rarr:\"→\",rarrap:\"⥵\",rarrb:\"⇥\",rarrbfs:\"⤠\",rarrc:\"⤳\",rarrfs:\"⤞\",rarrhk:\"↪\",rarrlp:\"↬\",rarrpl:\"⥅\",rarrsim:\"⥴\",Rarrtl:\"⤖\",rarrtl:\"↣\",rarrw:\"↝\",rAtail:\"⤜\",ratail:\"⤚\",ratio:\"∶\",rationals:\"ℚ\",RBarr:\"⤐\",rBarr:\"⤏\",rbarr:\"⤍\",rbbrk:\"❳\",rbrace:\"}\",rbrack:\"]\",rbrke:\"⦌\",rbrksld:\"⦎\",rbrkslu:\"⦐\",Rcaron:\"Ř\",rcaron:\"ř\",Rcedil:\"Ŗ\",rcedil:\"ŗ\",rceil:\"⌉\",rcub:\"}\",Rcy:\"Р\",rcy:\"р\",rdca:\"⤷\",rdldhar:\"⥩\",rdquo:\"”\",rdquor:\"”\",rdsh:\"↳\",Re:\"ℜ\",real:\"ℜ\",realine:\"ℛ\",realpart:\"ℜ\",reals:\"ℝ\",rect:\"▭\",REG:\"®\",reg:\"®\",ReverseElement:\"∋\",ReverseEquilibrium:\"⇋\",ReverseUpEquilibrium:\"⥯\",rfisht:\"⥽\",rfloor:\"⌋\",Rfr:\"ℜ\",rfr:\"𝔯\",rHar:\"⥤\",rhard:\"⇁\",rharu:\"⇀\",rharul:\"⥬\",Rho:\"Ρ\",rho:\"ρ\",rhov:\"ϱ\",RightAngleBracket:\"⟩\",RightArrow:\"→\",Rightarrow:\"⇒\",rightarrow:\"→\",RightArrowBar:\"⇥\",RightArrowLeftArrow:\"⇄\",rightarrowtail:\"↣\",RightCeiling:\"⌉\",RightDoubleBracket:\"⟧\",RightDownTeeVector:\"⥝\",RightDownVector:\"⇂\",RightDownVectorBar:\"⥕\",RightFloor:\"⌋\",rightharpoondown:\"⇁\",rightharpoonup:\"⇀\",rightleftarrows:\"⇄\",rightleftharpoons:\"⇌\",rightrightarrows:\"⇉\",rightsquigarrow:\"↝\",RightTee:\"⊢\",RightTeeArrow:\"↦\",RightTeeVector:\"⥛\",rightthreetimes:\"⋌\",RightTriangle:\"⊳\",RightTriangleBar:\"⧐\",RightTriangleEqual:\"⊵\",RightUpDownVector:\"⥏\",RightUpTeeVector:\"⥜\",RightUpVector:\"↾\",RightUpVectorBar:\"⥔\",RightVector:\"⇀\",RightVectorBar:\"⥓\",ring:\"˚\",risingdotseq:\"≓\",rlarr:\"⇄\",rlhar:\"⇌\",rlm:\"‏\",rmoust:\"⎱\",rmoustache:\"⎱\",rnmid:\"⫮\",roang:\"⟭\",roarr:\"⇾\",robrk:\"⟧\",ropar:\"⦆\",Ropf:\"ℝ\",ropf:\"𝕣\",roplus:\"⨮\",rotimes:\"⨵\",RoundImplies:\"⥰\",rpar:\")\",rpargt:\"⦔\",rppolint:\"⨒\",rrarr:\"⇉\",Rrightarrow:\"⇛\",rsaquo:\"›\",Rscr:\"ℛ\",rscr:\"𝓇\",Rsh:\"↱\",rsh:\"↱\",rsqb:\"]\",rsquo:\"’\",rsquor:\"’\",rthree:\"⋌\",rtimes:\"⋊\",rtri:\"▹\",rtrie:\"⊵\",rtrif:\"▸\",rtriltri:\"⧎\",RuleDelayed:\"⧴\",ruluhar:\"⥨\",rx:\"℞\",Sacute:\"Ś\",sacute:\"ś\",sbquo:\"‚\",Sc:\"⪼\",sc:\"≻\",scap:\"⪸\",Scaron:\"Š\",scaron:\"š\",sccue:\"≽\",scE:\"⪴\",sce:\"⪰\",Scedil:\"Ş\",scedil:\"ş\",Scirc:\"Ŝ\",scirc:\"ŝ\",scnap:\"⪺\",scnE:\"⪶\",scnsim:\"⋩\",scpolint:\"⨓\",scsim:\"≿\",Scy:\"С\",scy:\"с\",sdot:\"⋅\",sdotb:\"⊡\",sdote:\"⩦\",searhk:\"⤥\",seArr:\"⇘\",searr:\"↘\",searrow:\"↘\",sect:\"§\",semi:\";\",seswar:\"⤩\",setminus:\"∖\",setmn:\"∖\",sext:\"✶\",Sfr:\"𝔖\",sfr:\"𝔰\",sfrown:\"⌢\",sharp:\"♯\",SHCHcy:\"Щ\",shchcy:\"щ\",SHcy:\"Ш\",shcy:\"ш\",ShortDownArrow:\"↓\",ShortLeftArrow:\"←\",shortmid:\"∣\",shortparallel:\"∥\",ShortRightArrow:\"→\",ShortUpArrow:\"↑\",shy:\"­\",Sigma:\"Σ\",sigma:\"σ\",sigmaf:\"ς\",sigmav:\"ς\",sim:\"∼\",simdot:\"⩪\",sime:\"≃\",simeq:\"≃\",simg:\"⪞\",simgE:\"⪠\",siml:\"⪝\",simlE:\"⪟\",simne:\"≆\",simplus:\"⨤\",simrarr:\"⥲\",slarr:\"←\",SmallCircle:\"∘\",smallsetminus:\"∖\",smashp:\"⨳\",smeparsl:\"⧤\",smid:\"∣\",smile:\"⌣\",smt:\"⪪\",smte:\"⪬\",smtes:\"⪬︀\",SOFTcy:\"Ь\",softcy:\"ь\",sol:\"/\",solb:\"⧄\",solbar:\"⌿\",Sopf:\"𝕊\",sopf:\"𝕤\",spades:\"♠\",spadesuit:\"♠\",spar:\"∥\",sqcap:\"⊓\",sqcaps:\"⊓︀\",sqcup:\"⊔\",sqcups:\"⊔︀\",Sqrt:\"√\",sqsub:\"⊏\",sqsube:\"⊑\",sqsubset:\"⊏\",sqsubseteq:\"⊑\",sqsup:\"⊐\",sqsupe:\"⊒\",sqsupset:\"⊐\",sqsupseteq:\"⊒\",squ:\"□\",Square:\"□\",square:\"□\",SquareIntersection:\"⊓\",SquareSubset:\"⊏\",SquareSubsetEqual:\"⊑\",SquareSuperset:\"⊐\",SquareSupersetEqual:\"⊒\",SquareUnion:\"⊔\",squarf:\"▪\",squf:\"▪\",srarr:\"→\",Sscr:\"𝒮\",sscr:\"𝓈\",ssetmn:\"∖\",ssmile:\"⌣\",sstarf:\"⋆\",Star:\"⋆\",star:\"☆\",starf:\"★\",straightepsilon:\"ϵ\",straightphi:\"ϕ\",strns:\"¯\",Sub:\"⋐\",sub:\"⊂\",subdot:\"⪽\",subE:\"⫅\",sube:\"⊆\",subedot:\"⫃\",submult:\"⫁\",subnE:\"⫋\",subne:\"⊊\",subplus:\"⪿\",subrarr:\"⥹\",Subset:\"⋐\",subset:\"⊂\",subseteq:\"⊆\",subseteqq:\"⫅\",SubsetEqual:\"⊆\",subsetneq:\"⊊\",subsetneqq:\"⫋\",subsim:\"⫇\",subsub:\"⫕\",subsup:\"⫓\",succ:\"≻\",succapprox:\"⪸\",succcurlyeq:\"≽\",Succeeds:\"≻\",SucceedsEqual:\"⪰\",SucceedsSlantEqual:\"≽\",SucceedsTilde:\"≿\",succeq:\"⪰\",succnapprox:\"⪺\",succneqq:\"⪶\",succnsim:\"⋩\",succsim:\"≿\",SuchThat:\"∋\",Sum:\"∑\",sum:\"∑\",sung:\"♪\",Sup:\"⋑\",sup:\"⊃\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",supdot:\"⪾\",supdsub:\"⫘\",supE:\"⫆\",supe:\"⊇\",supedot:\"⫄\",Superset:\"⊃\",SupersetEqual:\"⊇\",suphsol:\"⟉\",suphsub:\"⫗\",suplarr:\"⥻\",supmult:\"⫂\",supnE:\"⫌\",supne:\"⊋\",supplus:\"⫀\",Supset:\"⋑\",supset:\"⊃\",supseteq:\"⊇\",supseteqq:\"⫆\",supsetneq:\"⊋\",supsetneqq:\"⫌\",supsim:\"⫈\",supsub:\"⫔\",supsup:\"⫖\",swarhk:\"⤦\",swArr:\"⇙\",swarr:\"↙\",swarrow:\"↙\",swnwar:\"⤪\",szlig:\"ß\",Tab:\"\\t\",target:\"⌖\",Tau:\"Τ\",tau:\"τ\",tbrk:\"⎴\",Tcaron:\"Ť\",tcaron:\"ť\",Tcedil:\"Ţ\",tcedil:\"ţ\",Tcy:\"Т\",tcy:\"т\",tdot:\"⃛\",telrec:\"⌕\",Tfr:\"𝔗\",tfr:\"𝔱\",there4:\"∴\",Therefore:\"∴\",therefore:\"∴\",Theta:\"Θ\",theta:\"θ\",thetasym:\"ϑ\",thetav:\"ϑ\",thickapprox:\"≈\",thicksim:\"∼\",ThickSpace:\"  \",thinsp:\" \",ThinSpace:\" \",thkap:\"≈\",thksim:\"∼\",THORN:\"Þ\",thorn:\"þ\",Tilde:\"∼\",tilde:\"˜\",TildeEqual:\"≃\",TildeFullEqual:\"≅\",TildeTilde:\"≈\",times:\"×\",timesb:\"⊠\",timesbar:\"⨱\",timesd:\"⨰\",tint:\"∭\",toea:\"⤨\",top:\"⊤\",topbot:\"⌶\",topcir:\"⫱\",Topf:\"𝕋\",topf:\"𝕥\",topfork:\"⫚\",tosa:\"⤩\",tprime:\"‴\",TRADE:\"™\",trade:\"™\",triangle:\"▵\",triangledown:\"▿\",triangleleft:\"◃\",trianglelefteq:\"⊴\",triangleq:\"≜\",triangleright:\"▹\",trianglerighteq:\"⊵\",tridot:\"◬\",trie:\"≜\",triminus:\"⨺\",TripleDot:\"⃛\",triplus:\"⨹\",trisb:\"⧍\",tritime:\"⨻\",trpezium:\"⏢\",Tscr:\"𝒯\",tscr:\"𝓉\",TScy:\"Ц\",tscy:\"ц\",TSHcy:\"Ћ\",tshcy:\"ћ\",Tstrok:\"Ŧ\",tstrok:\"ŧ\",twixt:\"≬\",twoheadleftarrow:\"↞\",twoheadrightarrow:\"↠\",Uacute:\"Ú\",uacute:\"ú\",Uarr:\"↟\",uArr:\"⇑\",uarr:\"↑\",Uarrocir:\"⥉\",Ubrcy:\"Ў\",ubrcy:\"ў\",Ubreve:\"Ŭ\",ubreve:\"ŭ\",Ucirc:\"Û\",ucirc:\"û\",Ucy:\"У\",ucy:\"у\",udarr:\"⇅\",Udblac:\"Ű\",udblac:\"ű\",udhar:\"⥮\",ufisht:\"⥾\",Ufr:\"𝔘\",ufr:\"𝔲\",Ugrave:\"Ù\",ugrave:\"ù\",uHar:\"⥣\",uharl:\"↿\",uharr:\"↾\",uhblk:\"▀\",ulcorn:\"⌜\",ulcorner:\"⌜\",ulcrop:\"⌏\",ultri:\"◸\",Umacr:\"Ū\",umacr:\"ū\",uml:\"¨\",UnderBar:\"_\",UnderBrace:\"⏟\",UnderBracket:\"⎵\",UnderParenthesis:\"⏝\",Union:\"⋃\",UnionPlus:\"⊎\",Uogon:\"Ų\",uogon:\"ų\",Uopf:\"𝕌\",uopf:\"𝕦\",UpArrow:\"↑\",Uparrow:\"⇑\",uparrow:\"↑\",UpArrowBar:\"⤒\",UpArrowDownArrow:\"⇅\",UpDownArrow:\"↕\",Updownarrow:\"⇕\",updownarrow:\"↕\",UpEquilibrium:\"⥮\",upharpoonleft:\"↿\",upharpoonright:\"↾\",uplus:\"⊎\",UpperLeftArrow:\"↖\",UpperRightArrow:\"↗\",Upsi:\"ϒ\",upsi:\"υ\",upsih:\"ϒ\",Upsilon:\"Υ\",upsilon:\"υ\",UpTee:\"⊥\",UpTeeArrow:\"↥\",upuparrows:\"⇈\",urcorn:\"⌝\",urcorner:\"⌝\",urcrop:\"⌎\",Uring:\"Ů\",uring:\"ů\",urtri:\"◹\",Uscr:\"𝒰\",uscr:\"𝓊\",utdot:\"⋰\",Utilde:\"Ũ\",utilde:\"ũ\",utri:\"▵\",utrif:\"▴\",uuarr:\"⇈\",Uuml:\"Ü\",uuml:\"ü\",uwangle:\"⦧\",vangrt:\"⦜\",varepsilon:\"ϵ\",varkappa:\"ϰ\",varnothing:\"∅\",varphi:\"ϕ\",varpi:\"ϖ\",varpropto:\"∝\",vArr:\"⇕\",varr:\"↕\",varrho:\"ϱ\",varsigma:\"ς\",varsubsetneq:\"⊊︀\",varsubsetneqq:\"⫋︀\",varsupsetneq:\"⊋︀\",varsupsetneqq:\"⫌︀\",vartheta:\"ϑ\",vartriangleleft:\"⊲\",vartriangleright:\"⊳\",Vbar:\"⫫\",vBar:\"⫨\",vBarv:\"⫩\",Vcy:\"В\",vcy:\"в\",VDash:\"⊫\",Vdash:\"⊩\",vDash:\"⊨\",vdash:\"⊢\",Vdashl:\"⫦\",Vee:\"⋁\",vee:\"∨\",veebar:\"⊻\",veeeq:\"≚\",vellip:\"⋮\",Verbar:\"‖\",verbar:\"|\",Vert:\"‖\",vert:\"|\",VerticalBar:\"∣\",VerticalLine:\"|\",VerticalSeparator:\"❘\",VerticalTilde:\"≀\",VeryThinSpace:\" \",Vfr:\"𝔙\",vfr:\"𝔳\",vltri:\"⊲\",vnsub:\"⊂⃒\",vnsup:\"⊃⃒\",Vopf:\"𝕍\",vopf:\"𝕧\",vprop:\"∝\",vrtri:\"⊳\",Vscr:\"𝒱\",vscr:\"𝓋\",vsubnE:\"⫋︀\",vsubne:\"⊊︀\",vsupnE:\"⫌︀\",vsupne:\"⊋︀\",Vvdash:\"⊪\",vzigzag:\"⦚\",Wcirc:\"Ŵ\",wcirc:\"ŵ\",wedbar:\"⩟\",Wedge:\"⋀\",wedge:\"∧\",wedgeq:\"≙\",weierp:\"℘\",Wfr:\"𝔚\",wfr:\"𝔴\",Wopf:\"𝕎\",wopf:\"𝕨\",wp:\"℘\",wr:\"≀\",wreath:\"≀\",Wscr:\"𝒲\",wscr:\"𝓌\",xcap:\"⋂\",xcirc:\"◯\",xcup:\"⋃\",xdtri:\"▽\",Xfr:\"𝔛\",xfr:\"𝔵\",xhArr:\"⟺\",xharr:\"⟷\",Xi:\"Ξ\",xi:\"ξ\",xlArr:\"⟸\",xlarr:\"⟵\",xmap:\"⟼\",xnis:\"⋻\",xodot:\"⨀\",Xopf:\"𝕏\",xopf:\"𝕩\",xoplus:\"⨁\",xotime:\"⨂\",xrArr:\"⟹\",xrarr:\"⟶\",Xscr:\"𝒳\",xscr:\"𝓍\",xsqcup:\"⨆\",xuplus:\"⨄\",xutri:\"△\",xvee:\"⋁\",xwedge:\"⋀\",Yacute:\"Ý\",yacute:\"ý\",YAcy:\"Я\",yacy:\"я\",Ycirc:\"Ŷ\",ycirc:\"ŷ\",Ycy:\"Ы\",ycy:\"ы\",yen:\"¥\",Yfr:\"𝔜\",yfr:\"𝔶\",YIcy:\"Ї\",yicy:\"ї\",Yopf:\"𝕐\",yopf:\"𝕪\",Yscr:\"𝒴\",yscr:\"𝓎\",YUcy:\"Ю\",yucy:\"ю\",Yuml:\"Ÿ\",yuml:\"ÿ\",Zacute:\"Ź\",zacute:\"ź\",Zcaron:\"Ž\",zcaron:\"ž\",Zcy:\"З\",zcy:\"з\",Zdot:\"Ż\",zdot:\"ż\",zeetrf:\"ℨ\",ZeroWidthSpace:\"​\",Zeta:\"Ζ\",zeta:\"ζ\",Zfr:\"ℨ\",zfr:\"𝔷\",ZHcy:\"Ж\",zhcy:\"ж\",zigrarr:\"⇝\",Zopf:\"ℤ\",zopf:\"𝕫\",Zscr:\"𝒵\",zscr:\"𝓏\",zwj:\"‍\",zwnj:\"‌\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,tn=new RegExp(\"[\\\\-\\\\.0-9\"+en.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\"),sn=new RegExp(\"^\"+en.source+tn.source+\"*(?::\"+en.source+tn.source+\"*)?$\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\"Attribute \"+e+\" redefined\"),i.addValue(e,t.replace(/[\\t\\n\\r]/g,\" \").replace(/&#?\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\"=\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\"attribute equal must after attrName\");c=3}break;case\"'\":case'\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \"=\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\"attribute value no end '\"+d+\"' match\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \"=\"');a(o,u=e.slice(t,l),t),r.warning('attribute \"'+o+'\" missed start quot('+d+\")!!\"),t=l+1,c=5}break;case\"/\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\"attribute invalid close char('/')\")}break;case\"\":return r.error(\"unexpected end of input\"),0==c&&i.setTagName(e.slice(t,l)),l;case\">\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\"/\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \"'+u+'\" missed quot(\")!'),a(o,u,t)):(Zs.isHTML(s[\"\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \"'+u+'\" missed value!! \"'+u+'\" instead!!'),a(u,u,t));break;case 3:throw new Error(\"attribute value missed!!\")}return l;case\"\":d=\" \";default:if(d<=\" \")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \"'+u+'\" missed quot(\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\"\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \"'+o+'\" missed value!! \"'+o+'\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\"'+o+'\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\"elements closed character '/' and '>' must be connected to\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\":\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\"xmlns\"===c&&d;else d=o,c=null,u=\"xmlns\"===o&&\"\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\"xml\"===c&&(a.uri=Zs.XML),\"xmlns\"!==c&&(a.uri=i[c||\"\"]))}var h;(h=s.indexOf(\":\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\"\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\"</\"+i+\">\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\"</\"+i+\">\"))<t&&(n=e.lastIndexOf(\"</\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\"-\"===e.charAt(t+2))return\"-\"===e.charAt(t+3)?(n=e.indexOf(\"--\\x3e\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\"Unclosed comment\"),-1):-1;if(\"CDATA[\"==e.substr(t+3,6)){var n=e.indexOf(\"]]>\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\"?>\",t);if(s){var n=e.substring(t,s).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\"#\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\"x\",\"0x\"))):(n.error(\"entity not found:\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\r\\n?|\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\"<\",g);if(f<0){if(!e.substr(g).match(/^\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\"/\":var b=e.indexOf(\">\",f+3),_=e.substring(f+2,b).replace(/[ \\t\\n\\r]+$/g,\"\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\s<].*/,\"\"),n.error(\"end tag name: \"+_+\" is not complete:\"+T.tagName),b=f+1+_.length):_.match(/\\s</)&&(_=_.replace(/[\\s<].*/,\"\"),n.error(\"end tag name: \"+_+\" maybe not complete\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\"end tag name: \"+_+\" is not match the current start tagName:\"+T.tagName)}else p.push(T);b++;break;case\"?\":h&&l(f),b=pn(e,f,s);break;case\"!\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\"unclosed xml attribute\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\"element parse error: \"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\"invalid tagName:\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\"invalid attribute:\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\r[\\n\\u0085]/g,\"\\n\").replace(/[\\r\\u0085\\u2028]/g,\"\\n\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\"\\n@\"+(e.systemId||\"\")+\"#[line:\"+e.lineNumber+\",col:\"+e.columnNumber+\"]\"}function Cn(e,t,i){return\"string\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\"\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\"[xmldom \"+t+\"]\\t\"+e+En(i))}||function(){}}return i=i||{},r(\"warning\"),r(\"error\"),r(\"fatalError\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\"\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\"string\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\"invalid doc source\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\"[xmldom warning]\\t\"+e,En(this.locator))},error:function(e){console.error(\"[xmldom error]\\t\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\"object\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\"object\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\"INVALID_NUMBER_OF_PERIOD\",Mn=\"DASH_EMPTY_MANIFEST\",Rn=\"DASH_INVALID_XML\",Un=\"NO_BASE_URL\",Bn=\"SEGMENT_TIME_UNSPECIFIED\",Fn=\"UNSUPPORTED_UTC_TIMING_SCHEME\";const qn=({baseUrl:e=\"\",source:t=\"\",range:i=\"\",indexRange:s=\"\"})=>{const n={uri:t,resolvedUri:Gt(e||\"\",t)};if(i||s){const e=(i||s).split(\"-\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\"bigint\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\"bigint\"==typeof a&&(a=Number(a)),t=\"bigint\"==typeof a||\"bigint\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\"bigint\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\"number\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\"number\"==typeof r?{start:0,end:r}:\"number\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\"number\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\"static\"===t){const e=l.length-1,t=\"number\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\"\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\"static\":\"dynamic\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\"bigint\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\"bigint\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\"bigint\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\"AUDIO\",\"SUBTITLES\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\"-\"+(e=>{let t;return t=\"bigint\"==typeof e.offset||\"bigint\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\"\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\"discontinuity\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\"audio\",SUBTITLES:\"subs\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\"PROGRAM-ID\":1},uri:\"\",endList:\"static\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\"\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\"FRAME-RATE\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\"video/mp4\"===e.mimeType||\"video/webm\"===e.mimeType||\"video\"===e.contentType,rr=({attributes:e})=>\"audio/mp4\"===e.mimeType||\"audio/webm\"===e.mimeType||\"audio\"===e.contentType,ar=({attributes:e})=>\"text/vtt\"===e.mimeType||\"text\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\"CLOSED-CAPTIONS\":{},SUBTITLES:{}},uri:\"\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\"dynamic\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\"\",a=n.attributes.lang||\"\";let o=n.attributes.label||\"main\";if(a&&!n.attributes.label){const e=r?` (${r})`:\"\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\"main\"===r,playlists:[],uri:\"\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\"PROGRAM-ID\":1},uri:\"\",endList:\"static\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\"\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\"audio\",o.attributes.SUBTITLES=\"subs\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\"main\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\"text\",n=i.attributes.lang||\"und\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\"\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\"\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\"PROGRAM-ID\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\"\",endList:\"static\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\"\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\"CLOSED-CAPTIONS\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\"aspectRatio\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\"easyReader\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\"3D\")&&(e[s][\"3D\"]=t[\"3D\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\"\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\"dynamic\"===i&&s>0&&n.indexOf(\"$Number$\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\"$$\"===t)return\"$\";if(void 0===e[i])return t;const r=\"\"+e[i];return\"RepresentationID\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\"0\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\"\",range:\"\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\"\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\"\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/.test(t=e)&&(t+=\"Z\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\"/\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\":\"org.w3.clearkey\",\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\":\"com.widevine.alpha\",\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\":\"com.microsoft.playready\",\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\":\"com.adobe.primetime\",\"urn:mpeg:dash:mp4protection:2011\":\"mp4protection\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\"SegmentTemplate\")[0],i=fr(e,\"SegmentList\")[0],s=i&&fr(i,\"SegmentURL\").map((e=>Dn({tag:\"SegmentURL\"},_r(e)))),n=fr(e,\"SegmentBase\")[0],r=i||t,a=r&&fr(r,\"SegmentTimeline\")[0],o=i||n||t,l=o&&fr(o,\"Initialization\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\"S\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\"EventStream\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\"Event\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\"BaseURL\")),a=fr(s,\"Role\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\"Accessibility\")[0],d=(e=>{if(\"urn:scte:dash:cc:cea-608:2015\"===e.schemeIdUri)return(\"string\"!=typeof e.value?[]:e.value.split(\";\")).map((e=>{let t,i;return i=e,/^CC\\d=/.test(e)?[t,i]=e.split(\"=\"):/^CC\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\"urn:scte:dash:cc:cea-708:2015\"===e.schemeIdUri)return(\"string\"!=typeof e.value?[]:e.value.split(\";\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\"3D\":0};if(/=/.test(e)){const[i,s=\"\"]=e.split(\"=\");t.channel=i,t.language=e,s.split(\",\").forEach((e=>{const[i,s]=e.split(\":\");\"lang\"===i?t.language=s:\"er\"===i?t.easyReader=Number(s):\"war\"===i?t.aspectRatio=Number(s):\"3D\"===i&&(t[\"3D\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\"SERVICE\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\"Label\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\"ContentProtection\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\"cenc:pssh\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\"Representation\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\"BaseURL\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\"BaseURL\")),r=Dn(e,{periodStart:i.attributes.start});\"number\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\"AdaptationSet\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\"warn\",message:\"The MPD manifest should contain no more than one ContentSteering tag\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\"true\"===i.queryBeforeStart,i},Ar=e=>{if(\"\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\"application/xml\"),s=i&&\"MPD\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\"parsererror\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\"\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\"Period\");if(!a.length)throw new Error(Nn);const o=fr(e,\"Location\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\"BaseURL\")),d=fr(e,\"ContentSteering\");l.type=l.type||\"static\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\"number\"==typeof e.start?e.start:t&&\"number\"==typeof t.start&&\"number\"==typeof t.duration?t.start+t.duration:t||\"static\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\"UTCTiming\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\"urn:mpeg:dash:utc:http-head:2014\":case\"urn:mpeg:dash:utc:http-head:2012\":i.method=\"HEAD\";break;case\"urn:mpeg:dash:utc:http-xsdate:2014\":case\"urn:mpeg:dash:utc:http-iso:2014\":case\"urn:mpeg:dash:utc:http-xsdate:2012\":case\"urn:mpeg:dash:utc:http-iso:2012\":i.method=\"GET\";break;case\"urn:mpeg:dash:utc:direct:2014\":case\"urn:mpeg:dash:utc:direct:2012\":i.method=\"DIRECT\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\"string\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\"string\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\"number\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\"h264\"===t?l=31&e[r+o]:\"h265\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\"h264\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\"3gp\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\"3gp\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\"3gp\":function(e){return Ci(e,Yr[\"3gp\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\"h264\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\"h265\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\"ts\"!==e&&\"h264\"!==e&&\"h265\"!==e})).concat([\"ts\",\"h264\",\"h265\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\"\"},ea={},ta=\"8.23.3\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\"requestFullscreen\",\"exitFullscreen\",\"fullscreenElement\",\"fullscreenEnabled\",\"fullscreenchange\",\"fullscreenerror\",\"fullscreen\"],[\"webkitRequestFullscreen\",\"webkitExitFullscreen\",\"webkitFullscreenElement\",\"webkitFullscreenEnabled\",\"webkitfullscreenchange\",\"webkitfullscreenerror\",\"-webkit-full-screen\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\":\",s=\"\"){let n,r=\"info\";function a(...e){n(\"log\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\"log\"!==s&&r.unshift(s.toUpperCase()+\":\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\":\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\"debug\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\"apply\":\"call\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\"debug|log|warn|error\",off:\"\",debug:\"debug|log|warn|error\",info:\"log|warn|error\",warn:\"warn|error\",error:\"error\",DEFAULT:r},a.level=e=>{if(\"string\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\"${e}\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\"error\",r,e),a.warn=(...e)=>n(\"warn\",r,e),a.debug=(...e)=>n(\"debug\",r,e),a}(\"VIDEOJS\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\"object\"==typeof e}function ya(e){return fa(e)&&\"[object Object]\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\"ontouchstart\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\"Android\"===$a.platform,Ca=Boolean($a.brands.find((e=>\"Microsoft Edge\"===e.brand))),Aa=Boolean($a.brands.find((e=>\"Chromium\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\"Chromium\"===e.brand))||{}).version||null,Na=\"Windows\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\"\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\".\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\/(\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\s(\\d+)\\.\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\"string\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\"div\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\"textContent\"===e?Ja(n,i):n[e]===i&&\"tabIndex\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\" \")>=0)throw new Error(\"class has illegal whitespace characters\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\s+/))),[])),e):(da.warn(\"removeClass was called with an element that doesn't exist\"),null)}function so(e,t,i){return\"function\"==typeof i&&(i=i(e,t)),\"boolean\"!=typeof i&&(i=void 0),t.split(/\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\"\":s)}))}function ro(e){const t={},i=[\"autoplay\",\"controls\",\"playsinline\",\"loop\",\"muted\",\"default\",\"defaultMuted\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\"bottom\",\"height\",\"left\",\"right\",\"top\",\"width\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\"height\"))),i.width||(i.width=parseFloat(wo(e,\"width\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\"html\"!==t.nodeName.toLowerCase();){const e=wo(t,\"transform\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\"function\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\"function\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\"string\"==typeof e&&/\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\"mouseup\"===e.type&&0===e.button&&0===e.buttons||(\"mousedown\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\"querySelector\"),So=Ka(\"querySelectorAll\");function wo(e,t){if(!e||!t)return\"\";if(\"function\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\"\"}return i?i.getPropertyValue(t)||i[t]:\"\"}return\"\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\"\"),s=Re.createElement(\"style\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\"link\");s.rel=\"stylesheet\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\"video\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\"audio\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\"video-js\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\"data-setup\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\"load\",jo)}Ga()&&(\"complete\"===Re.readyState?jo():Le.addEventListener(\"load\",jo));const Do=function(e){const t=Re.createElement(\"style\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\"on\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\"layerX\",\"layerY\",\"keyLocation\",\"path\",\"webkitMovementX\",\"webkitMovementY\",\"mozPressure\",\"mozInputSource\"];for(const t in s)n.includes(t)||\"returnValue\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\"touchstart\",\"touchmove\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\"boolean\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\"passive\",{get(){Oo=!0}});Le.addEventListener(\"test\",null,e),Le.removeEventListener(\"test\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\"on\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\"string\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\"function\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\"_\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\"string\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\"on\"+t]&&this[\"on\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\"function\"==typeof e.name?e.name():\"string\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\"on\",\"one\",\"off\",\"trigger\"].every((t=>\"function\"==typeof e[t])),il=e=>\"string\"==typeof e&&/\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\"function\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\"on\");if(ol(i,\"on\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\"dispose\",e);t.guid=n.guid,ol(this,\"on\",\"dispose\",e),ol(i,\"on\",\"dispose\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\"one\");if(t)ol(i,\"one\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\"one\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\"any\");if(t)ol(i,\"any\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\"any\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\"off\"),nl(n,this,\"off\"),rl(i,this,\"off\"),i=Xo(this,i),this.off(\"dispose\",i),s.nodeName?($o(s,n,i),$o(s,\"dispose\",i)):tl(s)&&(s.off(n,i),s.off(\"dispose\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\"trigger\");const i=e&&\"string\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \"${i}\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\"span\",{className:\"vjs-event-bus\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\"dispose\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\"function\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\"statechanged\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\"function\"==typeof e.handleStateChanged&&tl(e)&&e.on(\"statechanged\",e.handleStateChanged),e}const hl=function(e){return\"string\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\"string\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\"no_player\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\" \").forEach((e=>this.addClass(e))),[\"on\",\"off\",\"one\",\"any\",\"trigger\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\"el_\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\"languagechange\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\"dispose\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\"-\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\{(\\d+)\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\"http://www.w3.org/2000/svg\",s=Qa(\"span\",{className:\"vjs-icon-placeholder vjs-svg-icon\"},{\"aria-hidden\":\"true\"}),n=Re.createElementNS(i,\"svg\");n.setAttributeNS(null,\"viewBox\",\"0 0 512 512\");const r=Re.createElementNS(i,\"use\");return n.appendChild(r),r.setAttributeNS(null,\"href\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\".vjs-icon-placeholder\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\"string\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\"function\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\"function\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\"function\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\"string\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\"Tech\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\"string\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\"string\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\"\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\"ready\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\"vjs-hidden\")}hide(){this.addClass(\"vjs-hidden\")}lockShowing(){this.addClass(\"vjs-lock-showing\")}unlockShowing(){this.removeClass(\"vjs-lock-showing\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\"width\",e,t)}height(e,t){return this.dimension(\"height\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\"\"+t).indexOf(\"%\")||-1!==(\"\"+t).indexOf(\"px\")?this.el_.style[e]=t:this.el_.style[e]=\"auto\"===t?\"\":t+\"px\",void(i||this.trigger(\"componentresize\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\"px\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\"offset\"+pl(e)],10)}currentDimension(e){let t=0;if(\"width\"!==e&&\"height\"!==e)throw new Error(\"currentDimension only accepts width or height value\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\"width\"),height:this.currentDimension(\"height\")}}currentWidth(){return this.currentDimension(\"width\")}currentHeight(){return this.currentDimension(\"height\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\"Tab\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\"touchstart\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\"touchmove\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\"touchleave\",s),this.on(\"touchcancel\",s),this.on(\"touchend\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\"tap\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\"touchstart\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\"touchmove\",e),this.on(\"touchend\",i),this.on(\"touchcancel\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\"dispose\",(()=>{[[\"namedRafs_\",\"cancelNamedAnimationFrame\"],[\"rafIds_\",\"cancelAnimationFrame\"],[\"setTimeoutIds_\",\"clearTimeout\"],[\"setIntervalIds_\",\"clearInterval\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\"visibility\");return\"none\"!==t.getPropertyValue(\"display\")&&![\"hidden\",\"collapse\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\"0\"===e.style.opacity||\"0px\"===Le.getComputedStyle(e).height||\"0px\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\"string\"!=typeof e||!e)throw new Error(`Illegal component name, \"${e}\"; must be a non-empty string.`);const i=fl.getComponent(\"Tech\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\"techs must be registered using Tech.registerTech()\":\"must be a Component subclass\",new Error(`Illegal component, \"${e}\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\"Player\");if(\"Player\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\"Can not register Player component after player has been created.\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\"number\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\"This TimeRanges object is empty\")},end(){throw new Error(\"This TimeRanges object is empty\")}}:{length:e.length,start:yl.bind(null,\"start\",0,e),end:yl.bind(null,\"end\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\"Component\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\"-\"),n=n>0||a>0?n+\":\":\"\",s=((n||r>=10)&&s<10?\"0\"+s:s)+\":\",i=i<10?\"0\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\"number\"==typeof e?this.code=e:\"string\"==typeof e?this.message=e:fa(e)&&(\"number\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\"\")}function Al(e){return null!=e&&\"function\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\"\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\"MEDIA_ERR_CUSTOM\",\"MEDIA_ERR_ABORTED\",\"MEDIA_ERR_NETWORK\",\"MEDIA_ERR_DECODE\",\"MEDIA_ERR_SRC_NOT_SUPPORTED\",\"MEDIA_ERR_ENCRYPTED\"],Cl.defaultMessages={1:\"You aborted the media playback\",2:\"A network error caused the media download to fail part-way.\",3:\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\",4:\"The media could not be loaded, either because the server or network failed or because the format is not supported.\",5:\"The media is encrypted and we do not have the keys to decrypt it.\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\"kind\",\"label\",\"language\",\"id\",\"inBandMetadataTrackDispatchType\",\"mode\",\"src\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\"track\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\"vjs-modal-dialog\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\"div\",{className:`${Ol}-content`},{role:\"document\"}),this.descEl_=Qa(\"p\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\"aria-describedby\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\"div\",{className:this.buildCSSClass(),tabIndex:-1},{\"aria-describedby\":`${this.id()}_description`,\"aria-hidden\":\"true\",\"aria-label\":this.label(),role:\"dialog\",\"aria-live\":\"polite\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\"Modal Window\")}description(){let e=this.options_.description||this.localize(\"This is a modal window.\");return this.closeable()&&(e+=\" \"+this.localize(\"This modal can be closed by pressing the Escape key or activating the close button.\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\"beforemodalopen\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\"keydown\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\"aria-hidden\",\"false\"),this.trigger(\"modalopen\"),this.hasBeenOpened_=!0}opened(e){return\"boolean\"==typeof e&&this[e?\"open\":\"close\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\"beforemodalclose\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\"keydown\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\"aria-hidden\",\"true\"),this.trigger({type:\"modalclose\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\"boolean\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\"closeButton\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\"closeButton\",{controlText:\"Close Modal Dialog\"}),this.contentEl_=e,this.on(i,\"close\",this.close_)}!t&&i&&(this.off(i,\"close\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\"beforemodalfill\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\"modalfill\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\"closeButton\");n&&i.appendChild(n.el_),this.trigger(\"aftermodalfill\")}empty(){this.trigger(\"beforemodalempty\"),fo(this.contentEl()),this.trigger(\"modalempty\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\"modalKeydown\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\"Escape\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\"Tab\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\":focus\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\"*\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\"href\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\"disabled\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\"tabindex\")&&-1!==e.getAttribute(\"tabindex\")||e.hasAttribute(\"contenteditable\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\"ModalDialog\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\"length\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\"\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\"addtrack\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\"labelchange\",target:this})},tl(e)&&e.addEventListener(\"labelchange\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\"removetrack\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\"change\",addtrack:\"addtrack\",removetrack:\"removetrack\",labelchange:\"labelchange\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\"on\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\"change\"))},e.addEventListener(\"enabledchange\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\"enabledchange\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\"selectedIndex\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\"change\"))},e.addEventListener(\"selectedchange\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\"selectedchange\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\"change\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\"selectedlanguagechange\")),e.addEventListener(\"modechange\",this.queueChange_);-1===[\"metadata\",\"chapters\"].indexOf(e.kind)&&e.addEventListener(\"modechange\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\"modechange\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\"modechange\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\"length\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\"\"+e in this||Object.defineProperty(this,\"\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\"alternative\",captions:\"captions\",main:\"main\",sign:\"sign\",subtitles:\"subtitles\",commentary:\"commentary\"},Hl={alternative:\"alternative\",descriptions:\"descriptions\",main:\"main\",\"main-desc\":\"main-desc\",translation:\"translation\",commentary:\"commentary\"},Vl={subtitles:\"subtitles\",captions:\"captions\",descriptions:\"descriptions\",chapters:\"chapters\",metadata:\"metadata\"},Wl={disabled:\"disabled\",hidden:\"hidden\",showing:\"showing\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\"vjs_track_\"+Mo(),kind:e.kind||\"\",language:e.language||\"\"};let i=e.label||\"\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\"label\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\"labelchange\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\"string\"==typeof e){const t=e.split(\"?\")[0].replace(/\\/+$/,\"\").match(/\\.([^.\\/]+)$/);return t?t[1].toLowerCase():\"\"}return\"\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\"loadeddata\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\"use-credentials\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\"function\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\"vttjsloaded\",\"vttjserror\"],(e=>{if(\"vttjserror\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\"A tech was not provided.\");const t=va(e,{kind:Vl[e.kind]||\"subtitles\",language:e.language||e.srclang||\"\"});let i=Wl[t.mode]||\"disabled\";const s=t.default;\"metadata\"!==t.kind&&\"chapters\"!==t.kind||(i=\"hidden\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\"cuechange\"),a=!1),\"timeupdate\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\"timeupdate\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\"dispose\",(()=>{this.stopTracking()})),\"disabled\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\"disabled\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\"disabled\"!==i&&this.startTracking(),this.trigger(\"modechange\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\"subtitles\"!==t.kind&&\"captions\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\"timeupdate\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\"timeupdate\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\"getCueAsHTML\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\"cuechange\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\"\"});super(t);let i=!1;Object.defineProperty(this,\"enabled\",{get:()=>i,set(e){\"boolean\"==typeof e&&e!==i&&(i=e,this.trigger(\"enabledchange\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\"\"});super(t);let i=!1;Object.defineProperty(this,\"selected\",{get:()=>i,set(e){\"boolean\"==typeof e&&e!==i&&(i=e,this.trigger(\"selectedchange\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\"loadeddata\",(()=>{t=nc.LOADED,this.trigger({type:\"load\",target:this})}))}}nc.prototype.allowedEvents_={load:\"load\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\"Audio\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\"Video\"},text:{ListClass:ql,TrackClass:tc,capitalName:\"Text\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\"RemoteText\",getterName:\"remoteTextTracks\",privateName:\"remoteTextTracks_\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\"length\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\"\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\"function\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\"function\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\"RemoteTextTrackEls\",getterName:\"remoteTextTrackEls\",privateName:\"remoteTextTrackEls_\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\"playing\",(function(){this.hasStarted_=!0})),this.on(\"loadstart\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\"Text\",\"Audio\",\"Video\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\"Unknown Tech\")}triggerSourceset(e){this.isReady_||this.one(\"ready\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\"sourceset\"})}manualProgressOn(){this.on(\"durationchange\",this.onDurationChange_),this.manualProgress=!0,this.one(\"ready\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\"durationchange\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\"progress\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\"play\",this.trackCurrentTime_),this.on(\"pause\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\"play\",this.trackCurrentTime_),this.off(\"pause\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\"text\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\"error\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\"removetrack\",i),s.addEventListener(\"addtrack\",i),this.on(\"dispose\",(()=>{s.removeEventListener(\"removetrack\",i),s.removeEventListener(\"addtrack\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\"vtt.js\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\"vttjsloaded\");const e=Re.createElement(\"script\");e.src=this.options_[\"vtt.js\"]||\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\",e.onload=()=>{this.trigger(\"vttjsloaded\")},e.onerror=()=>{this.trigger(\"vttjserror\")},this.on(\"dispose\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\"addtrack\",i),t.on(\"removetrack\",s),this.addWebVttScript_();const n=()=>this.trigger(\"texttrackchange\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\"cuechange\",n),\"showing\"===i.mode&&i.addEventListener(\"cuechange\",n)}};r(),e.addEventListener(\"change\",r),e.addEventListener(\"addtrack\",r),e.addEventListener(\"removetrack\",r),this.on(\"dispose\",(function(){t.off(\"addtrack\",i),t.off(\"removetrack\",s),e.removeEventListener(\"change\",r),e.removeEventListener(\"addtrack\",r),e.removeEventListener(\"removetrack\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\"cuechange\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\"TextTrack kind is required but was not provided\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\"boolean\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\"playing\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\"\"}static canPlayType(e){return\"\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\"Techs must have a static canPlayType method on them\");if(!lc.canPlaySource)throw new Error(\"Techs must have a static canPlaySource method on them\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\"Tech\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\"\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\"\"};[\"seekable\",\"seeking\",\"duration\"].forEach((function(e){const t=this[e];\"function\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\"No source handler found for the current source.\")),this.disposeSourceHandler(),this.off(\"dispose\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\"dispose\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\"audio\",\"video\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\"Tech\",lc),lc.registerTech(\"Tech\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\"call\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\"string\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\"*\"],i,s,n,!0)}const bc={opus:\"video/ogg\",ogv:\"video/ogg\",mp4:\"video/mp4\",mov:\"video/mp4\",m4v:\"video/mp4\",mkv:\"video/x-matroska\",m4a:\"audio/mp4\",mp3:\"audio/mpeg\",aac:\"audio/aac\",caf:\"audio/x-caf\",flac:\"audio/flac\",oga:\"audio/ogg\",wav:\"audio/wav\",m3u8:\"application/x-mpegURL\",mpd:\"application/dash+xml\",jpg:\"image/jpeg\",jpeg:\"image/jpeg\",gif:\"image/gif\",png:\"image/png\",svg:\"image/svg+xml\",webp:\"image/webp\"},_c=function(e=\"\"){const t=Kl(e);return bc[t.toLowerCase()]||\"\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\"string\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\"string\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\"play\",19:\"pause\",417:\"ff\",412:\"rw\",[wc]:\"back\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\"keydown\",this.onKeyDown_),this.player_.on(\"modalKeydown\",this.onKeyDown_),this.player_.on(\"loadedmetadata\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\"modalclose\",(()=>{this.refocusComponent()})),this.player_.on(\"focusin\",this.handlePlayerFocus_.bind(this)),this.player_.on(\"focusout\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\"aftermodalfill\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\"keydown\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\"ArrowLeft\",\"ArrowRight\",\"ArrowUp\",\"ArrowDown\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\"play\")||kc.isEventKey(t,\"pause\")||kc.isEventKey(t,\"ff\")||kc.isEventKey(t,\"rw\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\"Back\")&&e.target&&\"function\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\"play\":this.player_.paused()&&this.player_.play();break;case\"pause\":this.player_.paused()||this.player_.pause();break;case\"ff\":this.userSeek_(this.player_.currentTime()+5);break;case\"rw\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\".video-js\")),t.classList.contains(\"vjs-text-track-settings\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\"CloseButton\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\"el_\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\"children_\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\"el_\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\"children_\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\"items\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\"ErrorDisplay\"===e.name_&&e.opened_){const i=e.el_.querySelector(\".vjs-errors-ok-button-container\");if(i){i.querySelectorAll(\"button\").forEach(((e,i)=>{t.push({name:()=>\"ModalButton\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\"el_\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\"focusableComponentsChanged\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\"focusableComponentsChanged\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\"focusableComponentsChanged\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\"endOfFocusableComponents\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\"right\":return t.left>=e.right;case\"left\":return t.right<=e.left;case\"down\":return t.top>=e.bottom;case\"up\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\"object\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\"right\":case\"left\":r=s+100*n;break;case\"up\":r=2*n+.5*s;break;case\"down\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\"TextTrackSelect\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\"MediaLoader\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\"div\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\"button\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\"button\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\"span\",{className:\"vjs-icon-placeholder\"},{\"aria-hidden\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\"span\",{className:\"vjs-control-text\"},{\"aria-live\":\"polite\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\"Need Text\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\"title\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\"vjs-disabled\"),this.el_.setAttribute(\"aria-disabled\",\"false\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\"tabIndex\",this.tabIndex_),this.on([\"tap\",\"click\"],this.handleClick_),this.on(\"keydown\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\"vjs-disabled\"),this.el_.setAttribute(\"aria-disabled\",\"true\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\"tabIndex\"),this.off(\"mouseover\",this.handleMouseOver_),this.off(\"mouseout\",this.handleMouseOut_),this.off([\"tap\",\"click\"],this.handleClick_),this.off(\"keydown\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\" \"===e.key||\"Enter\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\"click\")):super.handleKeyDown(e)}}fl.registerComponent(\"ClickableComponent\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\"posterchange\",this.update_)}dispose(){this.player().off(\"posterchange\",this.update_),super.dispose()}createEl(){return Qa(\"div\",{className:\"vjs-poster\"})}crossOrigin(e){if(void 0===e)return this.$(\"img\")?this.$(\"img\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\"anonymous\"===e||\"use-credentials\"===e?this.$(\"img\")&&(this.$(\"img\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${e}\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\"img\")||this.el_.appendChild(Qa(\"picture\",{className:\"vjs-poster\",tabIndex:-1},{},Qa(\"img\",{loading:\"lazy\",crossOrigin:this.crossOrigin()},{alt:\"\"}))),this.$(\"img\").src=e):this.el_.textContent=\"\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\"PosterImage\",Cc);const Ac=\"#222\",Ic=\"#ccc\",jc={monospace:\"monospace\",sansSerif:\"sans-serif\",serif:\"serif\",monospaceSansSerif:'\"Andale Mono\", \"Lucida Console\", monospace',monospaceSerif:'\"Courier New\", monospace',proportionalSansSerif:\"sans-serif\",proportionalSerif:\"serif\",casual:'\"Comic Sans MS\", Impact, fantasy',script:'\"Monotype Corsiva\", cursive',smallcaps:'\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\"Invalid color code provided, \"+e+\"; must be formatted as e.g. #f0e or #f604e2.\");i=e.slice(1)}return\"rgba(\"+parseInt(i.slice(0,2),16)+\",\"+parseInt(i.slice(2,4),16)+\",\"+parseInt(i.slice(4,6),16)+\",\"+t+\")\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\"\"}fl.registerComponent(\"TextTrackDisplay\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\"loadstart\",(e=>this.toggleDisplay(e))),e.on(\"useractive\",s),e.on(\"userinactive\",s),e.on(\"texttrackchange\",s),e.on(\"loadedmetadata\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\"fullscreenchange\",n),e.on(\"playerresize\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\"change\":\"orientationchange\";t.addEventListener(i,n),e.on(\"dispose\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\"descriptions\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\"showing\":n?n.mode=\"showing\":s&&(s.mode=\"showing\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\"div\",{className:\"vjs-text-track-display\"},{translate:\"yes\",\"aria-live\":\"off\",\"aria-atomic\":\"true\"})}clearDisplay(){\"function\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\"showing\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\"showing\"===t.mode&&(\"descriptions\"===t.kind?i=t:s=t)}if(s?(\"off\"!==this.getAttribute(\"aria-live\")&&this.setAttribute(\"aria-live\",\"off\"),this.updateForTrack(s)):i&&(\"assertive\"!==this.getAttribute(\"aria-live\")&&this.setAttribute(\"aria-live\",\"assertive\"),this.updateForTrack(i)),!Le.CSS.supports(\"inset\",\"10px\")){const e=this.el_,t=e.querySelectorAll(\".vjs-text-track-cue\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\"\",Pc(e,\"position\",\"relative\"),Pc(e,\"height\",s-i+\"px\"),Pc(e,\"top\",\"unset\"),Pc(e,\"bottom\",Fa?s+\"px\":\"0px\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\" \");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\"unset\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\"inset-inline: 10px\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\"insetInline\",Lc(n)),Pc(this.el_,\"insetBlock\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\"color\",Dc(t.color||\"#fff\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\"backgroundColor\",Dc(t.backgroundColor||\"#000\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\"backgroundColor\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\"dropshadow\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\"raised\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\"depressed\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\"uniform\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\"px\",n.style.height=\"auto\",n.style.top=\"auto\"}t.fontFamily&&\"default\"!==t.fontFamily&&(\"small-caps\"===t.fontFamily?n.firstChild.style.fontVariant=\"small-caps\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\"function\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\"vjs-text-track-cue\",\"vjs-text-track-cue-\"+(i.language?i.language:t)),i.language&&oo(s,\"lang\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\"LoadingSpinner\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\"Audio Player\":\"Video Player\"),i=Qa(\"span\",{className:\"vjs-control-text\",textContent:this.localize(\"{1} is loading.\",[t])}),s=super.createEl(\"div\",{className:\"vjs-loading-spinner\",dir:\"ltr\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\".vjs-control-text\").textContent=this.localize(\"{1} is loading.\",[this.player_.isAudio()?\"Audio Player\":\"Video Player\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\"button\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\"button\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\"span\",{className:\"vjs-icon-placeholder\"},{\"aria-hidden\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\"disabled\")}disable(){super.disable(),this.el_.setAttribute(\"disabled\",\"disabled\")}handleKeyDown(e){\" \"!==e.key&&\"Enter\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\"Button\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\"play\"),this.on(\"mousedown\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\"vjs-big-play-button\"}handleClick(e){const t=this.player_.play();if(\"tap\"===e.type||this.mouseused_&&\"clientX\"in e&&\"clientY\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\"controlBar\"),s=i&&i.getChild(\"playToggle\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\"Play Video\",fl.registerComponent(\"BigPlayButton\",Nc);fl.registerComponent(\"CloseButton\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\"cancel\"),this.controlText(t&&t.controlText||this.localize(\"Close\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\"close\",bubbles:!1})}handleKeyDown(e){\"Escape\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\"click\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\"play\"),this.on(e,\"play\",(e=>this.handlePlay(e))),this.on(e,\"pause\",(e=>this.handlePause(e))),t.replay&&this.on(e,\"ended\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\"vjs-ended\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\"vjs-ended\",\"vjs-paused\"),this.addClass(\"vjs-playing\"),this.setIcon(\"pause\"),this.controlText(\"Pause\")}handlePause(e){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-paused\"),this.setIcon(\"play\"),this.controlText(\"Play\")}handleEnded(e){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-ended\"),this.setIcon(\"replay\"),this.controlText(\"Replay\"),this.one(this.player_,\"seeked\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\"Play\",fl.registerComponent(\"PlayToggle\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\"timeupdate\",\"ended\",\"seeking\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\"div\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\"span\",{className:\"vjs-control-text\",textContent:`${this.localize(this.labelText_)} `},{role:\"presentation\"});return t.appendChild(i),this.contentEl_=Qa(\"span\",{className:`${e}-display`},{role:\"presentation\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\"seeking\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\"TimeDisplay#updateTextNode_\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\"Time\",Rc.prototype.controlText_=\"Time\",fl.registerComponent(\"TimeDisplay\",Rc);class Uc extends Rc{buildCSSClass(){return\"vjs-current-time\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\"function\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\"Current Time\",Uc.prototype.controlText_=\"Current Time\",fl.registerComponent(\"CurrentTimeDisplay\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\"durationchange\",i),this.on(e,\"loadstart\",i),this.on(e,\"loadedmetadata\",i)}buildCSSClass(){return\"vjs-duration\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\"Duration\",Bc.prototype.controlText_=\"Duration\",fl.registerComponent(\"DurationDisplay\",Bc);fl.registerComponent(\"TimeDivider\",class extends fl{createEl(){const e=super.createEl(\"div\",{className:\"vjs-time-control vjs-time-divider\"},{\"aria-hidden\":!0}),t=super.createEl(\"div\"),i=super.createEl(\"span\",{textContent:\"/\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\"durationchange\",(e=>this.updateContent(e)))}buildCSSClass(){return\"vjs-remaining-time\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\"span\",{},{\"aria-hidden\":!0},\"-\"),this.contentEl_),e}updateContent(e){if(\"number\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\"Remaining Time\",Fc.prototype.controlText_=\"Remaining Time\",fl.registerComponent(\"RemainingTimeDisplay\",Fc);fl.registerComponent(\"LiveDisplay\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\"durationchange\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\"div\",{className:\"vjs-live-control vjs-control\"});return this.contentEl_=Qa(\"div\",{className:\"vjs-live-display\"},{\"aria-live\":\"off\"}),this.contentEl_.appendChild(Qa(\"span\",{className:\"vjs-control-text\",textContent:`${this.localize(\"Stream Type\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\"LIVE\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\"liveedgechange\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\"button\",{className:\"vjs-seek-to-live-control vjs-control\"});return this.setIcon(\"circle\",e),this.textEl_=Qa(\"span\",{className:\"vjs-seek-to-live-text\",textContent:this.localize(\"LIVE\")},{\"aria-hidden\":\"true\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\"aria-disabled\",!0),this.addClass(\"vjs-at-live-edge\"),this.controlText(\"Seek to live, currently playing live\")):(this.setAttribute(\"aria-disabled\",!1),this.removeClass(\"vjs-at-live-edge\"),this.controlText(\"Seek to live, currently behind live\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\"liveedgechange\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\"Seek to live, currently playing live\",fl.registerComponent(\"SeekToLive\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\"mousedown\",this.handleMouseDown_),this.on(\"touchstart\",this.handleMouseDown_),this.on(\"keydown\",this.handleKeyDown_),this.on(\"click\",this.handleClick_),this.on(this.player_,\"controlsvisible\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\"disabled\"),this.setAttribute(\"tabindex\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\"mousedown\",this.handleMouseDown_),this.off(\"touchstart\",this.handleMouseDown_),this.off(\"keydown\",this.handleKeyDown_),this.off(\"click\",this.handleClick_),this.off(this.player_,\"controlsvisible\",this.update_),this.off(e,\"mousemove\",this.handleMouseMove_),this.off(e,\"mouseup\",this.handleMouseUp_),this.off(e,\"touchmove\",this.handleMouseMove_),this.off(e,\"touchend\",this.handleMouseUp_),this.removeAttribute(\"tabindex\"),this.addClass(\"disabled\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\" vjs-slider\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\"slider\",\"aria-valuenow\":0,\"aria-valuemin\":0,\"aria-valuemax\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\"mousedown\"===e.type&&e.preventDefault(),\"touchstart\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\"vjs-sliding\"),this.trigger(\"slideractive\"),this.on(t,\"mousemove\",this.handleMouseMove_),this.on(t,\"mouseup\",this.handleMouseUp_),this.on(t,\"touchmove\",this.handleMouseMove_),this.on(t,\"touchend\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\"vjs-sliding\"),this.trigger(\"sliderinactive\"),this.off(t,\"mousemove\",this.handleMouseMove_),this.off(t,\"mouseup\",this.handleMouseUp_),this.off(t,\"touchmove\",this.handleMouseMove_),this.off(t,\"touchend\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\"Slider#update\",(()=>{const t=this.vertical()?\"height\":\"width\";this.bar.el().style[t]=(100*e).toFixed(2)+\"%\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\"ArrowLeft\"===e.key||!s&&\"ArrowDown\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\"ArrowRight\"===e.key||!s&&\"ArrowUp\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\"ArrowLeft\"===e.key||\"ArrowDown\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\"ArrowUp\"===e.key||\"ArrowRight\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\"vjs-slider-vertical\"):this.addClass(\"vjs-slider-horizontal\")}}fl.registerComponent(\"Slider\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\"%\";fl.registerComponent(\"LoadProgressBar\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\"progress\",(e=>this.update(e)))}createEl(){const e=super.createEl(\"div\",{className:\"vjs-load-progress\"}),t=Qa(\"span\",{className:\"vjs-control-text\"}),i=Qa(\"span\",{textContent:this.localize(\"Loaded\")}),s=Re.createTextNode(\": \");return this.percentageEl_=Qa(\"span\",{className:\"vjs-control-text-loaded-percentage\",textContent:\"0%\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\"LoadProgressBar#update\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\"TimeTooltip\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\"div\",{className:\"vjs-time-tooltip\"},{\"aria-hidden\":\"true\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\"TimeTooltip#updateTime\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\"\":\"-\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\"circle\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\"div\",{className:\"vjs-play-progress vjs-slider-bar\"},{\"aria-hidden\":\"true\"})}update(e,t,i){const s=this.getChild(\"timeTooltip\");if(!s)return;const n=i&&i.target&&\"function\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\"timeTooltip\"),fl.registerComponent(\"PlayProgressBar\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\"div\",{className:\"vjs-mouse-display\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\"timeTooltip\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\"px\"}))}}Gc.prototype.options_={children:[\"timeTooltip\"]},fl.registerComponent(\"MouseTimeDisplay\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\"mouseTimeDisplay\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\"durationchange\",\"timeupdate\"],this.update),this.on(this.player_,[\"ended\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\"liveedgechange\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\"playing\"],this.enableIntervalHandler_),this.on(this.player_,[\"ended\",\"pause\",\"waiting\"],this.disableIntervalHandler_),\"hidden\"in Re&&\"visibilityState\"in Re&&this.on(Re,\"visibilitychange\",this.toggleVisibility_)}toggleVisibility_(e){\"hidden\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\"SeekBar#update\"),this.cancelNamedAnimationFrame(\"Slider#update\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\"ended\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\"div\",{className:\"vjs-progress-holder\"},{\"aria-label\":this.localize(\"Progress Bar\")})}update(e){if(\"hidden\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\"SeekBar#update\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\"aria-valuenow\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\"aria-valuetext\",this.localize(\"progress bar timing: currentTime={1} duration={2}\",[kl(i,n),kl(n,n)],\"{1} of {2}\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\"mouseTimeDisplay\");e&&e.show()}disable(){super.disable();const e=this.getChild(\"mouseTimeDisplay\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\" \"===e.key||\"Enter\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\"Home\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\"End\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\"PageDown\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\"PageUp\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\"durationchange\",\"timeupdate\"],this.update),this.off(this.player_,[\"ended\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\"liveedgechange\",this.update),this.off(this.player_,[\"playing\"],this.enableIntervalHandler_),this.off(this.player_,[\"ended\",\"pause\",\"waiting\"],this.disableIntervalHandler_),\"hidden\"in Re&&\"visibilityState\"in Re&&this.off(Re,\"visibilitychange\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\"loadProgressBar\",\"playProgressBar\"],barName:\"playProgressBar\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\"SeekBar\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\"div\",{className:\"vjs-progress-control vjs-control\"})}handleMouseMove(e){const t=this.getChild(\"seekBar\");if(!t)return;const i=t.getChild(\"playProgressBar\"),s=t.getChild(\"mouseTimeDisplay\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\"seekBar\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\"mousedown\",\"touchstart\"],this.handleMouseDownHandler_),this.off(this.el_,[\"mousemove\",\"touchmove\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\"disabled\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\"seekBar\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\"mousedown\",\"touchstart\"],this.handleMouseDownHandler_),this.on(this.el_,[\"mousemove\",\"touchmove\"],this.handleMouseMove),this.removeClass(\"disabled\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\"mousemove\",this.throttledHandleMouseSeek),this.off(e,\"touchmove\",this.throttledHandleMouseSeek),this.off(e,\"mouseup\",this.handleMouseUpHandler_),this.off(e,\"touchend\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\"seekBar\");i&&i.handleMouseDown(e),this.on(t,\"mousemove\",this.throttledHandleMouseSeek),this.on(t,\"touchmove\",this.throttledHandleMouseSeek),this.on(t,\"mouseup\",this.handleMouseUpHandler_),this.on(t,\"touchend\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\"seekBar\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\"seekBar\"]},fl.registerComponent(\"ProgressControl\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\"picture-in-picture-enter\"),this.on(e,[\"enterpictureinpicture\",\"leavepictureinpicture\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\"disablepictureinpicturechanged\",\"loadedmetadata\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\"loadedmetadata\",\"audioonlymodechange\",\"audiopostermodechange\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\"audio\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\"documentPictureInPicture\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\"picture-in-picture-exit\"),this.controlText(\"Exit Picture-in-Picture\")):(this.setIcon(\"picture-in-picture-enter\"),this.controlText(\"Picture-in-Picture\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\"function\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\"Picture-in-Picture\",fl.registerComponent(\"PictureInPictureToggle\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\"fullscreen-enter\"),this.on(e,\"fullscreenchange\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\"Exit Fullscreen\"),this.setIcon(\"fullscreen-exit\")):(this.controlText(\"Fullscreen\"),this.setIcon(\"fullscreen-enter\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\"Fullscreen\",fl.registerComponent(\"FullscreenToggle\",Qc);fl.registerComponent(\"VolumeLevel\",class extends fl{createEl(){const e=super.createEl(\"div\",{className:\"vjs-volume-level\"});return this.setIcon(\"circle\",e),e.appendChild(super.createEl(\"span\",{className:\"vjs-control-text\"})),e}});fl.registerComponent(\"VolumeLevelTooltip\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\"div\",{className:\"vjs-volume-tooltip\"},{\"aria-hidden\":\"true\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\"VolumeLevelTooltip#updateVolume\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\"div\",{className:\"vjs-mouse-display\"})}update(e,t,i){const s=100*t;this.getChild(\"volumeLevelTooltip\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\"px\":this.el_.style.left=e.width*t+\"px\"}))}}Jc.prototype.options_={children:[\"volumeLevelTooltip\"]},fl.registerComponent(\"MouseVolumeLevelDisplay\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\"slideractive\",(e=>this.updateLastVolume_(e))),this.on(e,\"volumechange\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\"div\",{className:\"vjs-volume-bar vjs-slider-bar\"},{\"aria-label\":this.localize(\"Volume Level\"),\"aria-live\":\"polite\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\"mouseVolumeLevelDisplay\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\"aria-valuenow\",t),this.el_.setAttribute(\"aria-valuetext\",t+\"%\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\"sliderinactive\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\"volumeLevel\"],barName:\"volumeLevel\"},za||xa||Zc.prototype.options_.children.splice(0,0,\"mouseVolumeLevelDisplay\"),Zc.prototype.playerEvent=\"volumechange\",fl.registerComponent(\"VolumeBar\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\"vjs-hidden\"),e.on(t,\"loadstart\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\"vjs-hidden\"):e.addClass(\"vjs-hidden\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\"mousedown\",(e=>this.handleMouseDown(e))),this.on(\"touchstart\",(e=>this.handleMouseDown(e))),this.on(\"mousemove\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\"focus\",\"slideractive\"],(()=>{this.volumeBar.addClass(\"vjs-slider-active\"),this.addClass(\"vjs-slider-active\"),this.trigger(\"slideractive\")})),this.on(this.volumeBar,[\"blur\",\"sliderinactive\"],(()=>{this.volumeBar.removeClass(\"vjs-slider-active\"),this.removeClass(\"vjs-slider-active\"),this.trigger(\"sliderinactive\")}))}createEl(){let e=\"vjs-volume-horizontal\";return this.options_.vertical&&(e=\"vjs-volume-vertical\"),super.createEl(\"div\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\"mousemove\",this.throttledHandleMouseMove),this.on(t,\"touchmove\",this.throttledHandleMouseMove),this.on(t,\"mouseup\",this.handleMouseUpHandler_),this.on(t,\"touchend\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\"mousemove\",this.throttledHandleMouseMove),this.off(t,\"touchmove\",this.throttledHandleMouseMove),this.off(t,\"mouseup\",this.handleMouseUpHandler_),this.off(t,\"touchend\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\"volumeBar\"]},fl.registerComponent(\"VolumeControl\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\"vjs-hidden\"),e.on(t,\"loadstart\",(function(){t.tech_.featuresMuteControl?e.removeClass(\"vjs-hidden\"):e.addClass(\"vjs-hidden\")}))}(this,e),this.on(e,[\"loadstart\",\"volumechange\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\"volume-high\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\"volume-mute\"),t=0):e<.33?(this.setIcon(\"volume-low\"),t=1):e<.67&&(this.setIcon(\"volume-medium\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\" \":\"\"}vjs-vol-${t}`),\"\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\"Unmute\":\"Mute\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\"Mute\",fl.registerComponent(\"MuteToggle\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\"loadstart\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\"keyup\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\"keyup\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\"keydown\",(e=>this.handleKeyPress(e))),this.on(\"mouseover\",(e=>this.handleMouseOver(e))),this.on(\"mouseout\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\"slideractive\"],this.sliderActive_),this.on(this.volumeControl,[\"sliderinactive\"],this.sliderInactive_)}sliderActive_(){this.addClass(\"vjs-slider-active\")}sliderInactive_(){this.removeClass(\"vjs-slider-active\")}volumePanelState_(){this.volumeControl.hasClass(\"vjs-hidden\")&&this.muteToggle.hasClass(\"vjs-hidden\")&&this.addClass(\"vjs-hidden\"),this.volumeControl.hasClass(\"vjs-hidden\")&&!this.muteToggle.hasClass(\"vjs-hidden\")&&this.addClass(\"vjs-mute-toggle-only\")}createEl(){let e=\"vjs-volume-panel-horizontal\";return this.options_.inline||(e=\"vjs-volume-panel-vertical\"),super.createEl(\"div\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\"Escape\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\"vjs-hover\"),qo(Re,\"keyup\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\"vjs-hover\"),$o(Re,\"keyup\",this.handleKeyPressHandler_)}handleKeyPress(e){\"Escape\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\"muteToggle\",\"volumeControl\"]},fl.registerComponent(\"VolumePanel\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\"Skip forward {1} seconds\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\"Skip forward {1} seconds\",[this.skipTime]))}}sd.prototype.controlText_=\"Skip Forward\",fl.registerComponent(\"SkipForward\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\"Skip backward {1} seconds\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\"Skip backward {1} seconds\",[this.skipTime]))}}nd.prototype.controlText_=\"Skip Backward\",fl.registerComponent(\"SkipBackward\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\"keydown\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\"blur\",this.boundHandleBlur_),this.on(e,[\"tap\",\"click\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\"blur\",this.boundHandleBlur_),this.off(e,[\"tap\",\"click\"],this.boundHandleTapClick_))}removeChild(e){\"string\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\"ul\";this.contentEl_=Qa(e,{className:\"vjs-menu-content\"}),this.contentEl_.setAttribute(\"role\",\"menu\");const t=super.createEl(\"div\",{append:this.contentEl_,className:\"vjs-menu\"});return t.appendChild(this.contentEl_),qo(t,\"click\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\"CaptionSettingsMenuItem\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\"ArrowLeft\"===e.key||\"ArrowDown\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\"ArrowRight\"!==e.key&&\"ArrowUp\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\"vjs-menu-title\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\"Menu\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\"aria-haspopup\",\"true\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\" \"+i,this.menuButton_.removeClass(\"vjs-control\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\"tap\",s),this.on(this.menuButton_,\"click\",s),this.on(this.menuButton_,\"keydown\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\"mouseenter\",(()=>{this.addClass(\"vjs-hover\"),this.menu.show(),qo(Re,\"keyup\",this.handleMenuKeyUp_)})),this.on(\"mouseleave\",(e=>this.handleMouseLeave(e))),this.on(\"keydown\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\"aria-expanded\",\"false\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\"role\")):(this.show(),this.menu.contentEl_.setAttribute(\"role\",\"menu\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\"li\",{className:\"vjs-menu-title\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\"div\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\"vjs-menu-button\";!0===this.options_.inline?e+=\"-inline\":e+=\"-popup\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\"vjs-menu-button\";return!0===this.options_.inline?e+=\"-inline\":e+=\"-popup\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\"vjs-hover\"),$o(Re,\"keyup\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\"Escape\"===e.key||\"Tab\"===e.key?(this.buttonPressed_&&this.unpressButton(),\"Tab\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\"Up\"!==e.key&&(\"Down\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\"Escape\"!==e.key&&\"Tab\"!==e.key||this.removeClass(\"vjs-hover\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\"Escape\"!==e.key&&\"Tab\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\"Tab\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\"aria-expanded\",\"true\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\"aria-expanded\",\"false\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\"vjs-disabled\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\"vjs-disabled\"),this.menuButton_.enable()}}fl.registerComponent(\"MenuButton\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\"removetrack\",s),i.addEventListener(\"addtrack\",s),i.addEventListener(\"labelchange\",s),this.player_.on(\"ready\",s),this.player_.on(\"dispose\",(function(){i.removeEventListener(\"removetrack\",s),i.removeEventListener(\"addtrack\",s),i.removeEventListener(\"labelchange\",s)}))}}fl.registerComponent(\"TrackButton\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\"role\",\"menuitemcheckbox\"):this.el_.setAttribute(\"role\",\"menuitemradio\"):this.el_.setAttribute(\"role\",\"menuitem\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\"li\",Object.assign({className:\"vjs-menu-item\",tabIndex:-1},t),i),n=Qa(\"span\",{className:\"vjs-menu-item-text\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\".vjs-icon-placeholder\")),s}handleKeyDown(e){[\"Tab\",\"Escape\",\"ArrowUp\",\"ArrowLeft\",\"ArrowRight\",\"ArrowDown\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\"vjs-selected\"),this.el_.setAttribute(\"aria-checked\",\"true\"),this.controlText(\", selected\"),this.isSelected_=!0):(this.removeClass(\"vjs-selected\"),this.el_.setAttribute(\"aria-checked\",\"false\"),this.controlText(\"\"),this.isSelected_=!1))}}fl.registerComponent(\"MenuItem\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\"Unknown\",t.selected=\"showing\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\"loadstart\",\"texttrackchange\"],n),s.addEventListener(\"change\",n),s.addEventListener(\"selectedlanguagechange\",r),this.on(\"dispose\",(function(){e.off([\"loadstart\",\"texttrackchange\"],n),s.removeEventListener(\"change\",n),s.removeEventListener(\"selectedlanguagechange\",r)})),void 0===s.onchange){let e;this.on([\"tap\",\"click\"],(function(){if(\"object\"!=typeof Le.Event)try{e=new Le.Event(\"change\")}catch(e){}e||(e=Re.createEvent(\"Event\"),e.initEvent(\"change\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\"showing\"!==s.mode&&(s.mode=\"showing\"):\"disabled\"!==s.mode&&(s.mode=\"disabled\"))}}handleTracksChange(e){const t=\"showing\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\"showing\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\"TextTrackMenuItem\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\"disabled\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\" and \")+\" off\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\"showing\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\"captions\",\"descriptions\",\"subtitles\"].indexOf(s.kind)>-1&&\"showing\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\".vjs-menu-item-text\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\"OffTextTrackMenuItem\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\"TextTrackButton\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\"ChaptersTrackMenuItem\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\"chapters\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\"chapters\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\"load\",this.updateHandler_),this.track_.removeEventListener(\"cuechange\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\"hidden\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\"load\",this.updateHandler_),this.track_.addEventListener(\"cuechange\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\"chapters\",pd.prototype.controlText_=\"Chapters\",fl.registerComponent(\"ChaptersButton\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\"audio-description\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\"change\",n),this.on(\"dispose\",(function(){s.removeEventListener(\"change\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\"showing\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\"descriptions\",md.prototype.controlText_=\"Descriptions\",fl.registerComponent(\"DescriptionsButton\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\"subtitles\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\"subtitles\",gd.prototype.controlText_=\"Subtitles\",fl.registerComponent(\"SubtitlesButton\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\" settings\",selectable:!1,default:!1,mode:\"disabled\"},t.selectable=!1,t.name=\"CaptionSettingsMenuItem\",super(e,t),this.addClass(\"vjs-texttrack-settings\"),this.controlText(\", opens \"+t.kind+\" settings dialog\")}handleClick(e){this.player().getChild(\"textTrackSettings\").open()}handleLanguagechange(){this.$(\".vjs-menu-item-text\").textContent=this.player_.localize(this.options_.kind+\" settings\"),super.handleLanguagechange()}}fl.registerComponent(\"CaptionSettingsMenuItem\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\"captions\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\"textTrackSettings\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\"captions\",yd.prototype.controlText_=\"Captions\",fl.registerComponent(\"CaptionsButton\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\".vjs-menu-item-text\");return\"captions\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\"captions\",s):n.appendChild(Qa(\"span\",{className:\"vjs-icon-placeholder\"},{\"aria-hidden\":!0})),n.appendChild(Qa(\"span\",{className:\"vjs-control-text\",textContent:` ${this.localize(\"Captions\")}`}))),s}}fl.registerComponent(\"SubsCapsMenuItem\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\"subtitles\",this.setIcon(\"subtitles\"),[\"en\",\"en-us\",\"en-ca\",\"fr-ca\"].indexOf(this.player_.language_)>-1&&(this.label_=\"captions\",this.setIcon(\"captions\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\"textTrackSettings\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\"captions\",\"subtitles\"],bd.prototype.controlText_=\"Subtitles\",fl.registerComponent(\"SubsCapsButton\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\"Unknown\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\"change\",n),this.on(\"dispose\",(()=>{s.removeEventListener(\"change\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\".vjs-menu-item-text\");return[\"main-desc\",\"descriptions\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\"span\",{className:\"vjs-icon-placeholder\"},{\"aria-hidden\":!0})),n.appendChild(Qa(\"span\",{className:\"vjs-control-text\",textContent:\" \"+this.localize(\"Descriptions\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\"AudioTrackMenuItem\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\"audio\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\"Audio Track\",fl.registerComponent(\"AudioTrackButton\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\"ratechange\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\"button\",fl.registerComponent(\"PlaybackRateMenuItem\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\"aria-describedby\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\"loadstart\",(e=>this.updateVisibility(e))),this.on(e,\"ratechange\",(e=>this.updateLabel(e))),this.on(e,\"playbackrateschange\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\"vjs-playback-rate-value-label-\"+this.id_,this.labelEl_=Qa(\"div\",{className:\"vjs-playback-rate-value\",id:this.labelElId_,textContent:\"1x\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\"x\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\"vjs-hidden\"):this.addClass(\"vjs-hidden\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\"x\")}}wd.prototype.controlText_=\"Playback Rate\",fl.registerComponent(\"PlaybackRateMenuButton\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\"div\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\"Spacer\",kd);fl.registerComponent(\"CustomControlSpacer\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\"div\",{className:this.buildCSSClass(),textContent:\" \"})}});class xd extends fl{createEl(){return super.createEl(\"div\",{className:\"vjs-control-bar\",dir:\"ltr\"})}}xd.prototype.options_={children:[\"playToggle\",\"skipBackward\",\"skipForward\",\"volumePanel\",\"currentTimeDisplay\",\"timeDivider\",\"durationDisplay\",\"progressControl\",\"liveDisplay\",\"seekToLive\",\"remainingTimeDisplay\",\"customControlSpacer\",\"playbackRateMenuButton\",\"chaptersButton\",\"descriptionsButton\",\"subsCapsButton\",\"audioTrackButton\",\"pictureInPictureToggle\",\"fullscreenToggle\"]},fl.registerComponent(\"ControlBar\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\"error\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\"\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\"ErrorDisplay\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\"aria-labelledby\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\" \").trim();return Qa(\"select\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\"-\"+e[1].replace(/\\W+/g,\"\"),i=Qa(\"option\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\"aria-labelledby\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\"TextTrackSelect\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\"legend\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\"%s\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\"colors\"===this.options_.type){r=Qa(\"span\",{className:s});const e=Qa(\"label\",{id:n,className:\"vjs-label\",textContent:this.localize(i.label)});e.setAttribute(\"for\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\"colors\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\"fieldset\",{className:this.options_.className})}}fl.registerComponent(\"TextTrackFieldset\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\"Text\"),className:\"vjs-fg vjs-track-setting\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\"colors\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\"Text Background\"),className:\"vjs-bg vjs-track-setting\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\"colors\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\"Caption Area Background\"),className:\"vjs-window vjs-track-setting\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\"colors\"});this.addChild(r)}createEl(){return Qa(\"div\",{className:\"vjs-track-settings-colors\"})}}fl.registerComponent(\"TextTrackSettingsColors\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\"Font Size\",className:\"vjs-font-percent vjs-track-setting\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\"font\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\"Text Edge Style\"),className:\"vjs-edge-style vjs-track-setting\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\"font\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\"Font Family\"),className:\"vjs-font-family vjs-track-setting\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\"font\"});this.addChild(r)}createEl(){return Qa(\"div\",{className:\"vjs-track-settings-font\"})}}fl.registerComponent(\"TextTrackSettingsFont\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\"restore all settings to the default values\"),className:\"vjs-default-button\"});i.el().classList.remove(\"vjs-control\",\"vjs-button\"),i.el().textContent=this.localize(\"Reset\"),this.addChild(i);const s=this.localize(\"Done\"),n=new Oc(e,{controlText:s,className:\"vjs-done-button\"});n.el().classList.remove(\"vjs-control\",\"vjs-button\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\"div\",{className:\"vjs-track-settings-controls\"})}}fl.registerComponent(\"TrackSettingsControls\",Dd);const Pd=\"vjs-text-track-settings\",Ld=[\"#000\",\"Black\"],Od=[\"#00F\",\"Blue\"],Nd=[\"#0FF\",\"Cyan\"],Md=[\"#0F0\",\"Green\"],Rd=[\"#F0F\",\"Magenta\"],Ud=[\"#F00\",\"Red\"],Bd=[\"#FFF\",\"White\"],Fd=[\"#FF0\",\"Yellow\"],qd=[\"1\",\"Opaque\"],$d=[\"0.5\",\"Semi-Transparent\"],zd=[\"0\",\"Transparent\"],Hd={backgroundColor:{selector:\".vjs-bg-color > select\",id:\"captions-background-color-%s\",label:\"Color\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\"vjs-bg-color\"},backgroundOpacity:{selector:\".vjs-bg-opacity > select\",id:\"captions-background-opacity-%s\",label:\"Opacity\",options:[qd,$d,zd],className:\"vjs-bg-opacity vjs-opacity\"},color:{selector:\".vjs-text-color > select\",id:\"captions-foreground-color-%s\",label:\"Color\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\"vjs-text-color\"},edgeStyle:{selector:\".vjs-edge-style > select\",id:\"\",label:\"Text Edge Style\",options:[[\"none\",\"None\"],[\"raised\",\"Raised\"],[\"depressed\",\"Depressed\"],[\"uniform\",\"Uniform\"],[\"dropshadow\",\"Drop shadow\"]]},fontFamily:{selector:\".vjs-font-family > select\",id:\"\",label:\"Font Family\",options:[[\"proportionalSansSerif\",\"Proportional Sans-Serif\"],[\"monospaceSansSerif\",\"Monospace Sans-Serif\"],[\"proportionalSerif\",\"Proportional Serif\"],[\"monospaceSerif\",\"Monospace Serif\"],[\"casual\",\"Casual\"],[\"script\",\"Script\"],[\"small-caps\",\"Small Caps\"]]},fontPercent:{selector:\".vjs-font-percent > select\",id:\"\",label:\"Font Size\",options:[[\"0.50\",\"50%\"],[\"0.75\",\"75%\"],[\"1.00\",\"100%\"],[\"1.25\",\"125%\"],[\"1.50\",\"150%\"],[\"1.75\",\"175%\"],[\"2.00\",\"200%\"],[\"3.00\",\"300%\"],[\"4.00\",\"400%\"]],default:2,parser:e=>\"1.00\"===e?null:Number(e)},textOpacity:{selector:\".vjs-text-opacity > select\",id:\"captions-foreground-opacity-%s\",label:\"Opacity\",options:[qd,$d],className:\"vjs-text-opacity vjs-opacity\"},windowColor:{selector:\".vjs-window-color > select\",id:\"captions-window-color-%s\",label:\"Color\",className:\"vjs-window-color\"},windowOpacity:{selector:\".vjs-window-opacity > select\",id:\"captions-window-opacity-%s\",label:\"Opacity\",options:[zd,$d,qd],className:\"vjs-window-opacity vjs-opacity\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\"none\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\"TextTrackSettings\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\"p\",{className:\"vjs-control-text\",textContent:this.localize(\"End of dialog window.\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\"color\",\"textOpacity\"],[\"backgroundColor\",\"backgroundOpacity\"],[\"windowColor\",\"windowOpacity\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\"fontPercent\"],[\"edgeStyle\"],[\"fontFamily\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\".vjs-done-button\"),[\"click\",\"tap\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\".vjs-default-button\"),[\"click\",\"tap\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\"change\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\"Caption Settings Dialog\")}description(){return this.localize(\"Beginning of dialog window. Escape will cancel and close the window.\")}buildCSSClass(){return super.buildCSSClass()+\" vjs-text-track-settings\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\"default\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\"textTrackDisplay\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\"ResizeManager\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\"resize\",e),$o(this,\"unload\",t),t=null};qo(this.el_.contentWindow,\"unload\",t),qo(this.el_.contentWindow,\"resize\",e)},this.one(\"load\",this.loadListener_))}createEl(){return super.createEl(\"iframe\",{className:\"vjs-resize-manager\",tabIndex:-1,title:this.localize(\"No content\")},{\"aria-hidden\":\"true\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\"playerresize\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\"load\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\"LiveTracker\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\"durationchange\",(e=>this.handleDurationchange(e))),this.on(this.player_,\"canplay\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\"liveedgechange\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\"vjs-liveui\"),this.startTracking()):(this.player_.removeClass(\"vjs-liveui\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\"play\",\"pause\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\"seeked\",this.handleSeeked_):(this.one(this.player_,\"play\",this.handlePlay_),this.one(this.player_,\"timeupdate\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\"seeked\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\"timeupdate\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\"play\",\"pause\"],this.trackLiveHandler_),this.off(this.player_,\"seeked\",this.handleSeeked_),this.off(this.player_,\"play\",this.handlePlay_),this.off(this.player_,\"timeupdate\",this.handleFirstTimeupdate_),this.off(this.player_,\"timeupdate\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\"liveedgechange\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\"number\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\"TitleBar\",class extends fl{constructor(e,t){super(e,t),this.on(\"statechanged\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\"div\",{className:\"vjs-title-bar-title\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\"div\",{className:\"vjs-title-bar-description\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\"div\",{className:\"vjs-title-bar\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\"aria-labelledby\",description:\"aria-describedby\"};[\"title\",\"description\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\"aria-labelledby\"),t.removeAttribute(\"aria-describedby\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\"TransientButton\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\"useractive\",\"userinactive\"],(e=>{this.removeClass(\"force-display\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\" \")}`}createEl(){const e=Qa(\"button\",{},{type:\"button\",class:this.buildCSSClass()},Qa(\"span\"));return this.controlTextEl_=e.querySelector(\"span\"),e}show(){super.show(),this.addClass(\"force-display\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\"force-display\")}),this.options_.initialDisplay)}hide(){this.removeClass(\"force-display\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\"src\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\"source\"),s=[];let n=\"\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\"innerHTML\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\"\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\"innerHTML\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\"append\",\"appendChild\",\"insertAdjacentHTML\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\"innerHTML\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\"innerHTML\",s)},e.one(\"sourceset\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\"src\",{get(){return this.hasAttribute(\"src\")?Yl(Le.Element.prototype.getAttribute.call(this,\"src\")):\"\"},set(e){return Le.Element.prototype.setAttribute.call(this,\"src\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\"src\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\"src\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\"\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\"src\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\"VIDEO\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\"track\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\"crossorigin\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\nThis may prevent text tracks from loading.\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\"metadata\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\"change\",i),this.on(\"dispose\",(()=>e.removeEventListener(\"change\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\"disabled\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\"change\",s)};this.on(\"webkitbeginfullscreen\",(()=>{e.removeEventListener(\"change\",i),e.removeEventListener(\"change\",s),e.addEventListener(\"change\",s)})),this.on(\"webkitendfullscreen\",(()=>{e.removeEventListener(\"change\",i),e.addEventListener(\"change\",i),e.removeEventListener(\"change\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\"Audio\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\"Video\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\"change\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\"text\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\"Listeners_\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\"dispose\",(s=>i.removeEventListener(e,t)))})),this.on(\"loadstart\",r),this.on(\"dispose\",(e=>this.off(\"loadstart\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\"video\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\"vjs-tech\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\"preload\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\"loop\",\"muted\",\"playsinline\",\"autoplay\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\"loadstart\",t);const i=function(){e||this.trigger(\"loadstart\")};return this.on(\"loadedmetadata\",i),void this.ready((function(){this.off(\"loadstart\",t),this.off(\"loadedmetadata\",i),e||this.trigger(\"loadstart\")}))}const t=[\"loadstart\"];t.push(\"loadedmetadata\"),e.readyState>=2&&t.push(\"loadeddata\"),e.readyState>=3&&t.push(\"canplay\"),e.readyState>=4&&t.push(\"canplaythrough\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\"Video is not ready. (Video.js)\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\"durationchange\"),this.off(\"timeupdate\",e))};return this.on(\"timeupdate\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\"webkitDisplayingFullscreen\"in this.el_))return;const e=function(){this.trigger(\"fullscreenchange\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\"webkitPresentationMode\"in this.el_&&\"picture-in-picture\"!==this.el_.webkitPresentationMode&&(this.one(\"webkitendfullscreen\",e),this.trigger(\"fullscreenchange\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\"webkitbeginfullscreen\",t),this.on(\"dispose\",(()=>{this.off(\"webkitbeginfullscreen\",t),this.off(\"webkitendfullscreen\",e)}))}supportsFullScreen(){return\"function\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\"fullscreenerror\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\"fullscreenerror\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\"fullscreenerror\",new Error(\"The video is not fullscreen\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\"Invalid source URL.\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\"source\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\"Source URL is required to remove the source element.\"),!1;const t=this.el_.querySelectorAll(\"source\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\"track\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\"track\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\"function\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\"TEST_VID\",(function(){if(!Ga())return;const e=Re.createElement(\"video\"),t=Re.createElement(\"track\");return t.kind=\"captions\",t.srclang=\"en\",t.label=\"English\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\"muted\",\"muted\"):lo(eu.TEST_VID,\"muted\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\"video\"),\"src\",{get:e,set:e}),Object.defineProperty(Re.createElement(\"audio\"),\"src\",{get:e,set:e}),Object.defineProperty(Re.createElement(\"video\"),\"innerHTML\",{get:e,set:e}),Object.defineProperty(Re.createElement(\"audio\"),\"innerHTML\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\"loadstart\",\"suspend\",\"abort\",\"error\",\"emptied\",\"stalled\",\"loadedmetadata\",\"loadeddata\",\"canplay\",\"canplaythrough\",\"playing\",\"waiting\",\"seeking\",\"seeked\",\"ended\",\"durationchange\",\"timeupdate\",\"progress\",\"play\",\"pause\",\"ratechange\",\"resize\",\"volumechange\"],[[\"featuresMuteControl\",\"canMuteVolume\"],[\"featuresPlaybackRate\",\"canControlPlaybackRate\"],[\"featuresSourceset\",\"canOverrideAttributes\"],[\"featuresNativeTextTracks\",\"supportsNativeTextTracks\"],[\"featuresNativeVideoTracks\",\"supportsNativeVideoTracks\"],[\"featuresNativeAudioTracks\",\"supportsNativeAudioTracks\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\"src\"),\"function\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\"source\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\"src\"),\"function\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\"muted\",\"defaultMuted\",\"autoplay\",\"controls\",\"loop\",\"playsinline\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\"muted\",\"defaultMuted\",\"autoplay\",\"loop\",\"playsinline\"].forEach((function(e){eu.prototype[\"set\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\"paused\",\"currentTime\",\"buffered\",\"volume\",\"poster\",\"preload\",\"error\",\"seeking\",\"seekable\",\"ended\",\"playbackRate\",\"defaultPlaybackRate\",\"disablePictureInPicture\",\"played\",\"networkState\",\"readyState\",\"videoWidth\",\"videoHeight\",\"crossOrigin\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\"volume\",\"src\",\"poster\",\"preload\",\"playbackRate\",\"defaultPlaybackRate\",\"disablePictureInPicture\",\"crossOrigin\"].forEach((function(e){eu.prototype[\"set\"+pl(e)]=function(t){this.el_[e]=t}})),[\"pause\",\"load\",\"play\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\"\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\"\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\"Html5\",eu);const tu=[\"progress\",\"abort\",\"suspend\",\"emptied\",\"stalled\",\"loadedmetadata\",\"loadeddata\",\"timeupdate\",\"resize\",\"volumechange\",\"texttrackchange\"],iu={canplay:\"CanPlay\",canplaythrough:\"CanPlayThrough\",playing:\"Playing\",seeked:\"Seeked\"},su=[\"tiny\",\"xsmall\",\"small\",\"medium\",\"large\",\"xlarge\",\"huge\"],nu={};su.forEach((e=>{const t=\"x\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\"[lang]\");i&&(t.language=i.getAttribute(\"lang\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\"\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\"controls\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\"autoplay\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\"function\"!=typeof this[e])throw new Error(`plugin \"${e}\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\"el_\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\"playerreset\",\"resize\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\"http://www.w3.org/2000/svg\">\\n  <defs>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-play\">\\n      <path d=\"M16 10v28l22-14z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-pause\">\\n      <path d=\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-audio\">\\n      <path d=\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-captions\">\\n      <path d=\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-subtitles\">\\n      <path d=\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-fullscreen-enter\">\\n      <path d=\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-fullscreen-exit\">\\n      <path d=\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-play-circle\">\\n      <path d=\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-volume-mute\">\\n      <path d=\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-volume-low\">\\n      <path d=\"M14 18v12h8l10 10V8L22 18h-8z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-volume-medium\">\\n      <path d=\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-volume-high\">\\n      <path d=\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-spinner\">\\n      <path d=\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 24 24\" id=\"vjs-icon-hd\">\\n      <path d=\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-chapters\">\\n      <path d=\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 40 40\" id=\"vjs-icon-downloading\">\\n      <path d=\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-file-download\">\\n      <path d=\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-file-download-done\">\\n      <path d=\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-file-download-off\">\\n      <path d=\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-share\">\\n      <path d=\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-cog\">\\n      <path d=\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-square\">\\n      <path d=\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-circle\">\\n      <circle cx=\"24\" cy=\"24\" r=\"20\"></circle>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-circle-outline\">\\n      <path d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-circle-inner-circle\">\\n      <path d=\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-cancel\">\\n      <path d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-replay\">\\n      <path d=\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-repeat\">\\n      <path d=\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-replay-5\">\\n      <path d=\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-replay-10\">\\n      <path d=\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-replay-30\">\\n      <path d=\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-forward-5\">\\n      <path d=\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-forward-10\">\\n      <path d=\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 96 48 48\" id=\"vjs-icon-forward-30\">\\n      <path d=\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 512 512\" id=\"vjs-icon-audio-description\">\\n      <g fill-rule=\"evenodd\"><path d=\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\"></path><path d=\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\"></path><path d=\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\"></path><path d=\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\"></path></g>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-next-item\">\\n      <path d=\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-previous-item\">\\n      <path d=\"M12 12h4v24h-4zm7 12l17 12V12z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-shuffle\">\\n      <path d=\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-cast\">\\n      <path d=\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 48 48\" id=\"vjs-icon-picture-in-picture-enter\">\\n      <path d=\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 22 18\" id=\"vjs-icon-picture-in-picture-exit\">\\n      <path d=\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\"></path>\\n      <path fill=\"none\" d=\"M-1-3h24v24H-1z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 1792 1792\" id=\"vjs-icon-facebook\">\\n      <path d=\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 1792 1792\" id=\"vjs-icon-linkedin\">\\n      <path d=\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 1200 1227\" id=\"vjs-icon-twitter\">\\n      <path d=\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\"/>\\n    </symbol>\\n    <symbol viewBox=\"0 0 1792 1792\" id=\"vjs-icon-tumblr\">\\n      <path d=\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\"></path>\\n    </symbol>\\n    <symbol viewBox=\"0 0 1792 1792\" id=\"vjs-icon-pinterest\">\\n      <path d=\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\"></path>\\n    </symbol>\\n  </defs>\\n</svg>',\"image/svg+xml\");if(e.querySelector(\"parsererror\"))da.warn(\"Failed to load SVG Icons. Falling back to Font Icons.\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\"none\",this.el_.appendChild(t),this.addClass(\"vjs-svg-icons-enabled\")}}this.initChildren(),this.isAudio(\"audio\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\"vjs-controls-enabled\"):this.addClass(\"vjs-controls-disabled\"),this.el_.setAttribute(\"role\",\"region\"),this.isAudio()?this.el_.setAttribute(\"aria-label\",this.localize(\"Audio Player\")):this.el_.setAttribute(\"aria-label\",this.localize(\"Video Player\")),this.isAudio()&&this.addClass(\"vjs-audio\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\"vjs-spatial-navigation-enabled\")),qa&&this.addClass(\"vjs-touch-enabled\"),za||this.addClass(\"vjs-workinghover\"),au.players[this.id_]=this;const n=ta.split(\".\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\"play\",(e=>this.listenForUserActivity_(e))),this.on(\"keydown\",(e=>this.handleKeyDown(e))),this.on(\"languagechange\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\"ready\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\"dispose\"),this.off(\"dispose\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\"keydown\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\"\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\"data-vjs-player\");const s=\"video-js\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\"div\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\"video\");e.children.length;)t.appendChild(e.firstChild);eo(e,\"video-js\")||to(e,\"video-js\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\"tabindex\",\"-1\"),n.tabindex=\"-1\",Ia&&Na&&(t.setAttribute(\"role\",\"application\"),n.role=\"application\"),t.removeAttribute(\"width\"),t.removeAttribute(\"height\"),\"width\"in n&&delete n.width,\"height\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\"class\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\"_html5_api\",t.className=\"vjs-tech\",t.player=e.player=this,this.addClass(\"vjs-paused\");const r=[\"IS_SMART_TV\",\"IS_TIZEN\",\"IS_WEBOS\",\"IS_ANDROID\",\"IS_IPAD\",\"IS_IPHONE\",\"IS_CHROMECAST_RECEIVER\"].filter((e=>Va[e])).map((e=>\"vjs-device-\"+e.substring(3).toLowerCase().replace(/\\_/g,\"-\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\"vjs-styles-dimensions\");const e=To(\".vjs-styles-defaults\"),t=To(\"head\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\"a\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\"vjs-hidden\"),t.setAttribute(\"hidden\",\"hidden\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\"lang\",this.language_),this.el_.setAttribute(\"translate\",\"no\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\"crossOrigin\");null===e||\"anonymous\"===e||\"use-credentials\"===e?(this.techCall_(\"setCrossOrigin\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${e}\"`)}width(e){return this.dimension(\"width\",e)}height(e){return this.dimension(\"height\",e)}dimension(e,t){const i=e+\"_\";if(void 0===t)return this[i]||0;if(\"\"===t||\"auto\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \"${t}\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\"playerreset\",\"resize\"],this.boundUpdateStyleEl_),e?(this.addClass(\"vjs-fluid\"),this.fill(!1),i=()=>{this.on([\"playerreset\",\"resize\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\"vjs-fluid\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\"vjs-fill\"),this.fluid(!1)):this.removeClass(\"vjs-fill\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\d+\\:\\d+$/.test(e))throw new Error(\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\"number\"==typeof this.width_?this.width_:this.options_.width,t=\"number\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\"auto\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\":\"+this.videoHeight():\"16:9\";const n=i.split(\":\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\"dimensions-\"+this.id():this.id()+\"-dimensions\",this.addClass(s),Po(this.styleEl_,`\\n      .${s} {\\n        width: ${e}px;\\n        height: ${t}px;\\n      }\\n\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\n        padding-top: ${100*r}%;\\n      }\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\"Html5\"!==i&&this.tag&&(lc.getTech(\"Html5\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\"string\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\"vtt.js\":this.options_[\"vtt.js\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\"loadstart\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\"sourceset\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\"waiting\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\"ended\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\"seeking\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\"play\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\"pause\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\"durationchange\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\"fullscreenchange\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\"fullscreenerror\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\"enterpictureinpicture\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\"leavepictureinpicture\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\"error\",(e=>this.handleTechError_(e))),this.on(this.tech_,\"posterchange\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\"textdata\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\"ratechange\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\"loadedmetadata\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\"controls\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\"Html5\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\"\",this.trigger(\"posterchange\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\"Using the tech directly can be dangerous. I hope you know what you're doing.\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\n\"),this.tech_}version(){return{\"video.js\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\"click\",this.boundHandleTechClick_),this.on(this.tech_,\"dblclick\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\"touchstart\",this.boundHandleTechTouchStart_),this.on(this.tech_,\"touchmove\",this.boundHandleTechTouchMove_),this.on(this.tech_,\"touchend\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\"tap\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\"tap\",this.boundHandleTechTap_),this.off(this.tech_,\"touchstart\",this.boundHandleTechTouchStart_),this.off(this.tech_,\"touchmove\",this.boundHandleTechTouchMove_),this.off(this.tech_,\"touchend\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\"click\",this.boundHandleTechClick_),this.off(this.tech_,\"dblclick\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\"setVolume\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\"vjs-ended\",\"vjs-seeking\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\"loadstart\")):this.trigger(\"loadstart\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\"play\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\"string\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\"\"}`)}))};let i;return\"any\"!==e||this.muted()?i=\"muted\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\"autoplay-success\",autoplay:e})})).catch((()=>{this.trigger({type:\"autoplay-failure\",autoplay:e})})):void 0}updateSourceCaches_(e=\"\"){let t=e,i=\"\";\"string\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\"\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\"source\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\"source\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\"sourceset\",\"loadstart\"],(e=>{if(\"sourceset\"===e.type)return;const t=this.techGet_(\"currentSrc\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\"sourceset\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\"vjs-has-started\"):this.removeClass(\"vjs-has-started\"))}handleTechPlay_(){this.removeClass(\"vjs-ended\",\"vjs-paused\"),this.addClass(\"vjs-playing\"),this.hasStarted(!0),this.trigger(\"play\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\"ratechange\")}handleTechWaiting_(){this.addClass(\"vjs-waiting\"),this.trigger(\"waiting\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\"vjs-waiting\"),this.off(\"timeupdate\",t))};this.on(\"timeupdate\",t)}handleTechCanPlay_(){this.removeClass(\"vjs-waiting\"),this.trigger(\"canplay\")}handleTechCanPlayThrough_(){this.removeClass(\"vjs-waiting\"),this.trigger(\"canplaythrough\")}handleTechPlaying_(){this.removeClass(\"vjs-waiting\"),this.trigger(\"playing\")}handleTechSeeking_(){this.addClass(\"vjs-seeking\"),this.trigger(\"seeking\")}handleTechSeeked_(){this.removeClass(\"vjs-seeking\",\"vjs-ended\"),this.trigger(\"seeked\")}handleTechPause_(){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-paused\"),this.trigger(\"pause\")}handleTechEnded_(){this.addClass(\"vjs-ended\"),this.removeClass(\"vjs-waiting\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\"ended\")}handleTechDurationChange_(){this.duration(this.techGet_(\"duration\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\"function\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\".vjs-control-bar, .vjs-modal-dialog\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\"function\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\"vjs-fullscreen\"):this.removeClass(\"vjs-fullscreen\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\":\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\"vjs-ios-native-fs\"),this.tech_.one(\"webkitendfullscreen\",(()=>{this.removeClass(\"vjs-ios-native-fs\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\"fullscreenerror\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\"vjs-picture-in-picture\"):this.removeClass(\"vjs-picture-in-picture\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\"textdata\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\"\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\"TypeError\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\"ready\",\"loadstart\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\"ready\",\"loadstart\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\"play\");i&&this.hasClass(\"vjs-ended\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\"pause\")}paused(){return!1!==this.techGet_(\"paused\")}played(){return this.techGet_(\"played\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\"setScrubbing\",this.scrubbing_),e?this.addClass(\"vjs-scrubbing\"):this.removeClass(\"vjs-scrubbing\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\"currentTime\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\"setCurrentTime\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\"canplay\",this.boundApplyInitTime_),void this.one(\"canplay\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\"vjs-live\"):this.removeClass(\"vjs-live\"),isNaN(e)||this.trigger(\"durationchange\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\"buffered\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\"seekable\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\"seeking\")}ended(){return this.techGet_(\"ended\")}networkState(){return this.techGet_(\"networkState\")}readyState(){return this.techGet_(\"readyState\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\"setVolume\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\"volume\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\"muted\")||!1;this.techCall_(\"setMuted\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\"setDefaultMuted\",e),this.techGet_(\"defaultMuted\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\"supportsFullScreen\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\"fullscreenchange\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\"fullscreenerror\",a),t.off(\"fullscreenchange\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\"fullscreenchange\",r),t.one(\"fullscreenerror\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\"enterFullScreen\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\"fullscreenerror\",r),e.off(\"fullscreenchange\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\"fullscreenchange\",n),e.one(\"fullscreenerror\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\"exitFullScreen\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\"keydown\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\"hidden\",to(Re.body,\"vjs-full-window\"),this.trigger(\"enterFullWindow\")}fullWindowOnEscKey(e){\"Escape\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\"keydown\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\"vjs-full-window\"),this.trigger(\"exitFullWindow\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\"disablePictureInPicture\");this.techCall_(\"setDisablePictureInPicture\",e),this.options_.disablePictureInPicture=e,this.trigger(\"disablepictureinpicturechanged\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\"vjs-pip-container\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\"p\",{className:\"vjs-pip-text\"},{},this.localize(\"Playing in picture-in-picture\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\"vjs-pip-window\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\"enterpictureinpicture\",pipWindow:t}),t.addEventListener(\"pagehide\",(t=>{const i=t.target.querySelector(\".video-js\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\"leavepictureinpicture\")})),t)))}return\"pictureInPictureEnabled\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\"requestPictureInPicture\"):Promise.reject(\"No PiP mode is available\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\"pictureInPictureEnabled\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\"input\"===t)return-1===[\"button\",\"checkbox\",\"hidden\",\"radio\",\"reset\",\"submit\"].indexOf(e.type);return-1!==[\"textarea\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\"function\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\"f\"===e.key.toLowerCase(),muteKey:s=t=>\"m\"===e.key.toLowerCase(),playPauseKey:n=t=>\"k\"===e.key.toLowerCase()||\" \"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\"FullscreenToggle\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\"MuteToggle\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\"PlayToggle\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \"${n}\" tech is undefined. Skipped browser support check for that tech.`)}return\"\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \"${e}\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\"\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\"error\",e)};this.one(\"error\",e),this.one(\"playing\",t),this.resetRetryOnError_=()=>{this.off(\"error\",e),this.off(\"playing\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\"setSource\")?this.techCall_(\"setSource\",e):this.techCall_(\"src\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\"load\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\"text\"),this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-paused\"),this.resetCache_(),this.poster(\"\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\"reset\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\"playerreset\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\"volumechange\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\"\"}currentType(){return this.currentSource()&&this.currentSource().type||\"\"}preload(e){return void 0!==e?(this.techCall_(\"setPreload\",e),void(this.options_.preload=e)):this.techGet_(\"preload\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\"string\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\"string\"==typeof e?e:\"play\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\"setAutoplay\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\"setPlaysinline\",e),this.options_.playsinline=e),this.techGet_(\"playsinline\")}loop(e){return void 0!==e?(this.techCall_(\"setLoop\",e),void(this.options_.loop=e)):this.techGet_(\"loop\")}poster(e){if(void 0===e)return this.poster_;e||(e=\"\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\"setPoster\",e),this.isPosterFromTech_=!1,this.trigger(\"posterchange\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\"\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\"posterchange\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\"setControls\",e),this.controls_?(this.removeClass(\"vjs-controls-disabled\"),this.addClass(\"vjs-controls-enabled\"),this.trigger(\"controlsenabled\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\"vjs-controls-enabled\"),this.addClass(\"vjs-controls-disabled\"),this.trigger(\"controlsdisabled\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\"vjs-using-native-controls\"),this.trigger(\"usingnativecontrols\")):(this.removeClass(\"vjs-using-native-controls\"),this.trigger(\"usingcustomcontrols\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\"beforeerror\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\"string\"==typeof i||\"number\"==typeof i||null===i?e=i:this.log.error(\"please return a value that MediaError expects in beforeerror hooks\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\"click\",\"touchstart\"],t),void this.one(\"loadstart\",(function(){this.off([\"click\",\"touchstart\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\"vjs-error\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\"vjs-error\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\"error\"),sa(\"error\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\"vjs-user-inactive\"),this.addClass(\"vjs-user-active\"),void this.trigger(\"useractive\");this.tech_&&this.tech_.one(\"mousemove\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\"vjs-user-active\"),this.addClass(\"vjs-user-inactive\"),this.trigger(\"userinactive\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\"mousedown\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\"mousemove\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\"mouseup\",n),this.on(\"mouseleave\",n);const r=this.getChild(\"controlBar\");let a;!r||za||xa||(r.on(\"mouseenter\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\"mouseleave\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\"keydown\",s),this.on(\"keyup\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\"playbackRate\"):1;this.techCall_(\"setPlaybackRate\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\"setDefaultPlaybackRate\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\"defaultPlaybackRate\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\"ControlBar\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\"vjs-audio-only-mode\");const e=this.children(),t=this.getChild(\"ControlBar\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\"vjs-hidden\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\"playerresize\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\"audioonlymodechange\")}disableAudioOnlyUI_(){this.removeClass(\"vjs-audio-only-mode\"),this.off(\"playerresize\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\"audioonlymodechange\")}audioOnlyMode(e){if(\"boolean\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\"vjs-audio-poster-mode\"),this.trigger(\"audiopostermodechange\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\"vjs-audio-poster-mode\"),this.trigger(\"audiopostermodechange\")}audioPosterMode(e){if(\"boolean\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\"getVideoPlaybackQuality\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\"languagechange\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\"\";const i=new Nl(this,t);return this.addChild(i),i.on(\"dispose\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\"\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\"\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\"playerresize\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\"playerresize\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\"\"}loadMedia(e,t){if(!e||\"object\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\"\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\"data-setup\"];if(eo(e,\"vjs-fill\")&&(i.fill=!0),eo(e,\"vjs-fluid\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\"{}\"))}catch(e){da.error(\"data-setup\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\"source\"===n?t.sources.push(ro(s)):\"track\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\"debugon\"),this.previousLogLevel_=this.log.level,this.log.level(\"debug\"),this.debugEnabled_=!0):(this.trigger(\"debugoff\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\"number\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\"playbackrateschange\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\"mediaLoader\",\"posterImage\",\"titleBar\",\"textTrackDisplay\",\"loadingSpinner\",\"bigPlayButton\",\"liveTracker\",\"controlBar\",\"errorDisplay\",\"textTrackSettings\",\"resizeManager\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\"en\",languages:{},notSupportedMessage:\"No compatible source was found for this media.\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\"hide\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\"Player\",au);const lu=\"plugin\",cu=\"activePlugins_\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\"before\":\"\")+\"pluginsetup\";e.trigger(s,t),e.trigger(s+\":\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\"Plugin must be sub-classed; not directly instantiated.\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\"dispose\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\"dispose\"),this.off(),t.off(\"dispose\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\"string\"==typeof e?hu(e):e;return\"function\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\"string\"!=typeof e)throw new Error(`Illegal plugin name, \"${e}\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \"${e}\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \"${e}\", cannot share a name with an existing player method!`);if(\"function\"!=typeof t)throw new Error(`Illegal plugin for \"${e}\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\"Cannot de-register base plugin.\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\"\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\"#\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \"${e}\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\"string\"==typeof e?To(\"#\"+vu(e)):e;if(!Xa(n))throw new TypeError(\"The element or ID supplied is not valid. (videojs)\");const r=\"getRootNode\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\"The element supplied is not included in the DOM\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\"data-vjs-player\")?n.parentNode:n).cloneNode(!0)),sa(\"beforesetup\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\"please return an object in beforesetup hooks\")}));const a=fl.getComponent(\"Player\");return s=new a(n,t,i),sa(\"setup\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\".vjs-styles-defaults\");if(!mb){mb=Do(\"vjs-styles-defaults\");const gb=To(\"head\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\"\\n      .video-js {\\n        width: 300px;\\n        height: 150px;\\n      }\\n\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\n        padding-top: 56.25%\\n      }\\n    \")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\"string\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\"#\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\"middleware\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\"TERMINATOR\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\"videojs.mergeOptions\",\"videojs.obj.merge\",va),bu.defineLazyProperty=yu(9,\"videojs.defineLazyProperty\",\"videojs.obj.defineLazyProperty\",_a),bu.bind=yu(9,\"videojs.bind\",\"native Function.prototype.bind\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\"\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\"videojs.createTimeRange\",\"videojs.time.createTimeRanges\",bl),bu.createTimeRanges=yu(9,\"videojs.createTimeRanges\",\"videojs.time.createTimeRanges\",bl),bu.formatTime=yu(9,\"videojs.formatTime\",\"videojs.time.formatTime\",kl),bu.setFormatTime=yu(9,\"videojs.setFormatTime\",\"videojs.time.setFormatTime\",Sl),bu.resetFormatTime=yu(9,\"videojs.resetFormatTime\",\"videojs.time.resetFormatTime\",wl),bu.parseUrl=yu(9,\"videojs.parseUrl\",\"videojs.url.parseUrl\",Xl),bu.isCrossOrigin=yu(9,\"videojs.isCrossOrigin\",\"videojs.url.isCrossOrigin\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\"isEl\",\"isTextNode\",\"createEl\",\"hasClass\",\"addClass\",\"removeClass\",\"toggleClass\",\"setAttributes\",\"getAttributes\",\"emptyEl\",\"appendContent\",\"insertContent\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\"videojs.computedStyle\",\"videojs.dom.computedStyle\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\"networkbadstatus\",NetworkRequestFailed:\"networkrequestfailed\",NetworkRequestAborted:\"networkrequestaborted\",NetworkRequestTimeout:\"networkrequesttimeout\",NetworkBodyParserFailed:\"networkbodyparserfailed\",StreamingHlsPlaylistParserError:\"streaminghlsplaylistparsererror\",StreamingDashManifestParserError:\"streamingdashmanifestparsererror\",StreamingContentSteeringParserError:\"streamingcontentsteeringparsererror\",StreamingVttParserError:\"streamingvttparsererror\",StreamingFailedToSelectNextSegment:\"streamingfailedtoselectnextsegment\",StreamingFailedToDecryptSegment:\"streamingfailedtodecryptsegment\",StreamingFailedToTransmuxSegment:\"streamingfailedtotransmuxsegment\",StreamingFailedToAppendSegment:\"streamingfailedtoappendsegment\",StreamingCodecsChangeError:\"streamingcodecschangeerror\"};\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\"enabled\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\"selectedIndex\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\"length\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\"\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\"addqualitylevel\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\"removequalitylevel\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\"change\",addqualitylevel:\"addqualitylevel\",removequalitylevel:\"removequalitylevel\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\"on\"+fb]=null;var Su=\"4.1.0\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\"dispose\",s)};return e.on(\"dispose\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\"qualityLevels\",wu),wu.VERSION=Su;\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\"VHS:\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\"\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\" => \"+e.end(i));return t.join(\", \")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\"PART\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\"PART\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\"number\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\"number\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\",\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\"number\"!=typeof s||\"number\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\"BANDWIDTH\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\"AUDIO\",\"SUBTITLES\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\"AUDIO\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\"CodecUtils\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\", \")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\"MAP\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\"A non-empty playlist URL or object is required\");this.logger_=Eu(\"PlaylistLoader\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\"HAVE_NOTHING\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\"mediaupdatetimeout\",this.handleMediaupdatetimeout_),this.on(\"loadedplaylist\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\"HAVE_METADATA\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\"v2\":\"YES\"),Object.keys(i).length){const t=new Le.URL(e);[\"_HLS_skip\",\"_HLS_msn\",\"_HLS_part\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\"HAVE_CURRENT_METADATA\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\"hls-playlist\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\"HAVE_METADATA\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\"error\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\"warn\",e),t&&a.on(\"info\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\"preloadSegment\",\"skip\",\"serverControl\",\"renditionReports\",\"partInf\",\"partTargetDuration\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\"parts\",\"preloadHints\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\"HAVE_METADATA\";const n={playlistInfo:{type:\"media\",uri:i}};this.trigger({type:\"playlistparsestart\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\"playlistunchanged\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\"playlistparsecomplete\",metadata:n}),this.trigger(\"loadedplaylist\")}dispose(){this.trigger(\"dispose\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\"HAVE_NOTHING\"===this.state)throw new Error(\"Cannot switch media playlist from \"+this.state);if(\"string\"==typeof e){if(!this.main.playlists[e])throw new Error(\"Unknown playlist URI: \"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\"HAVE_METADATA\",this.media_=e,void(s&&(this.trigger(\"mediachanging\"),\"HAVE_MAIN_MANIFEST\"===i?this.trigger(\"loadedmetadata\"):this.trigger(\"mediachange\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\"SWITCHING_MEDIA\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\"mediachanging\"),this.pendingMedia_=e;const r={playlistInfo:{type:\"media\",uri:e.uri}};this.trigger({type:\"playlistrequeststart\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\"hls-playlist\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\"playlistrequestcomplete\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\"HAVE_MAIN_MANIFEST\"===i?this.trigger(\"loadedmetadata\"):this.trigger(\"mediachange\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\"HAVE_NOTHING\"===this.state&&(this.started=!1),\"SWITCHING_MEDIA\"===this.state?this.media_?this.state=\"HAVE_METADATA\":this.state=\"HAVE_MAIN_MANIFEST\":\"HAVE_CURRENT_METADATA\"===this.state&&(this.state=\"HAVE_METADATA\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\"mediaupdatetimeout\"):this.trigger(\"loadedplaylist\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\"mediaupdatetimeout\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\"object\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\"multivariant\",uri:this.src}};this.trigger({type:\"playlistrequeststart\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\"hls-playlist\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\"HAVE_NOTHING\"===this.state&&(this.started=!1),this.trigger(\"error\");this.trigger({type:\"playlistrequestcomplete\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\"playlistparsestart\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\"playlistparsecomplete\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\"string\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\"HAVE_MAIN_MANIFEST\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\"loadedplaylist\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\"CLOSED-CAPTIONS\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\"loadedmetadata\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\"PATHWAY-ID\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\"BASE-ID\"],s=this.main;[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\"URI-REPLACEMENT\"].HOST;const s=t[\"URI-REPLACEMENT\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\"PATHWAY-ID\":e};return[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\"arraybuffer\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\"ETIMEDOUT\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\"XHR Failed with a response of: \"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\"function\"==typeof s&&(bu.log.warn(\"beforeRequest is deprecated, use onRequest instead.\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\"bigint\"==typeof e.offset||\"bigint\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\"bytes=\"+i+\"-\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\"-\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\"00\".substring(0,2-i.length)+i+(t%2?\" \":\"\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\".\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\",\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\"\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\"\"),n=t.slice(e*i,e*i+i).map(jh).join(\"\"),r+=s+\" \"+n+\"\\n\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\"\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\" \";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\"getProgramTime: callback must be provided\");if(!e||void 0===t)return i({message:\"getProgramTime: playlist and time must be provided\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\"accurate\":\"estimate\"}})(t,e);if(!s)return i({message:\"valid programTime was not found\"});if(\"estimate\"===s.type)return i({message:\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\"seekToProgramTime: callback must be provided\");if(void 0===e||!t||!s)return a({message:\"seekToProgramTime: programTime, seekTo and playlist must be provided\"});if(!t.endList&&!r.hasStarted_)return a({message:\"player must be playing a live stream to start buffering\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\"programDateTime tags must be provided in the manifest \"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\"accurate\":\"estimate\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\"estimate\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\"seeked\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\"seeked\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\"\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\"string\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\"\",r)));const l=Zr(r);return\"ts\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\"\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\"text/plain; charset=x-user-defined\"),e.addEventListener(\"progress\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\"A non-empty playlist URL or object is required\");this.on(\"minimumUpdatePeriod\",(()=>{this.refreshXml_()})),this.on(\"mediaupdatetimeout\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\"HAVE_NOTHING\",this.loadedPlaylists_={},this.logger_=Eu(\"DashPlaylistLoader\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\"object\"!=typeof e||e instanceof Error?{status:t.status,message:\"DASH request error at URL: \"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\"error\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\"mp4\"!==s){const t=s||\"unknown\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\"\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\"arraybuffer\",requestType:\"dash-sidx\",headers:Ch({byterange:e.sidx.byterange})},r)}),\"dash-sidx\")}dispose(){this.isPaused_=!0,this.trigger(\"dispose\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\"loadedmetadata\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\"HAVE_NOTHING\"===this.state)throw new Error(\"Cannot switch media playlist from \"+this.state);const t=this.state;if(\"string\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\"Unknown playlist URI: \"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\"HAVE_METADATA\",this.media_=e,void(i&&(this.trigger(\"mediachanging\"),this.trigger(\"mediachange\")));i&&(this.media_&&this.trigger(\"mediachanging\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\"HAVE_METADATA\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\"HAVE_MAIN_MANIFEST\"===e?this.trigger(\"loadedmetadata\"):this.trigger(\"mediachange\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\"loadedmetadata\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\"HAVE_NOTHING\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\"minimumUpdatePeriod\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\"mediaupdatetimeout\")):this.trigger(\"loadedplaylist\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\"manifestrequeststart\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\"dash-manifest\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\"HAVE_NOTHING\"===this.state&&(this.started=!1));this.trigger({type:\"manifestrequestcomplete\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\"DIRECT\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\"dash-clock-sync\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\"HEAD\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\"HAVE_MAIN_MANIFEST\",this.isMain_?this.trigger(\"loadedplaylist\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\"manifestparsestart\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\"error\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\"manifestparsecomplete\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\"loadedmetadata\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\"loadedmetadata\",e.createMupOnMedia_))),\"number\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\"minimumUpdatePeriod\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\"refreshMedia_ must take a media id\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\"playlistunchanged\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\"mediaupdatetimeout\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\"loadedplaylist\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\"EventStream\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\"cenc:default_KID\"];s&&t.add(s.replace(/-/g,\"\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\"application/javascript\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\nbrowserWorkerPolyFill(self);\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\"\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\"data\",(function(t){e.push(t)})),this.on(\"done\",(function(t){e.flush(t)})),this.on(\"partialdone\",(function(t){e.partialFlush(t)})),this.on(\"endedtimeline\",(function(t){e.endTimeline(t)})),this.on(\"reset\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\"data\",e)},t.prototype.flush=function(e){this.trigger(\"done\",e)},t.prototype.partialFlush=function(e){this.trigger(\"partialdone\",e)},t.prototype.endTimeline=function(e){this.trigger(\"endedtimeline\",e)},t.prototype.reset=function(e){this.trigger(\"reset\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\"undefined\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\"i\".charCodeAt(0),\"s\".charCodeAt(0),\"o\".charCodeAt(0),\"m\".charCodeAt(0)]),E=new Uint8Array([\"a\".charCodeAt(0),\"v\".charCodeAt(0),\"c\".charCodeAt(0),\"1\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\"video\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\"video\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\"audio\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\"video\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\"audio\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\"access_unit_delimiter_rbsp\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\"slice_layer_without_partitioning_rbsp_idr\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\"audio\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\"number\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\"number\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\"GA94\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\"GA94\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\"boolean\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\"data\",this.trigger.bind(this,\"data\")),e.on(\"partialdone\",this.trigger.bind(this,\"partialdone\")),e.on(\"done\",this.trigger.bind(this,\"done\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\"data\",this.trigger.bind(this,\"data\")),this.cc708Stream_.on(\"partialdone\",this.trigger.bind(this,\"partialdone\")),this.cc708Stream_.on(\"done\",this.trigger.bind(this,\"done\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\"sei_rbsp\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\"flush\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\"flush\")},fe.prototype.partialFlush=function(){return this.flushStream(\"partialFlush\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\"\\n\")},be.prototype.clearText=function(){this.rows=[\"\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\"function\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\"\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\"\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\"\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\"string\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\"function\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\"undefined\"==typeof TextDecoder)this.stream.trigger(\"log\",{level:\"warn\",message:\"The `encoding` option is unsupported without TextDecoder support\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\"log\",{level:\"warn\",message:\"TextDecoder could not be created with \"+e+\" encoding. \"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\"SERVICE\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\"0\"+(255&e).toString(16)).slice(-2))).join(\"\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\"\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\"\\n\\n\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\"\"!==e.text&&(this.trigger(\"data\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\"cc708_\"+e.serviceNum}),e.text=\"\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\"\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\"\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\"CC\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\"popOn\";else if(t===this.END_OF_CAPTION_)this.mode_=\"popOn\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\"popOn\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\"paintOn\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\"paintOn\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\"popOn\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\" \"),this.column_++,14&~n||this.addFormatting(e.pts,[\"i\"]),1&~n||this.addFormatting(e.pts,[\"u\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\"rollUp\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\"u\")&&this.addFormatting(e.pts,[\"u\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\"i\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\"log\",{level:\"warn\",message:\"Skipping a malformed 608 caption at index \"+e+\".\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\"data\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\"popOn\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\"rollUp\"!==this.mode_&&(this.row_=14,this.mode_=\"rollUp\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\"\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\"<\"+t+\">\"}),\"\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\"</\"+t+\">\"}),\"\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\"\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\"\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\"\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\"shared\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\"metadata\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\"data\",e)):this.trigger(\"data\",e)},this.flush=function(){i=t,this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\"reset\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\"\";for(s=t;s<i;s++)n+=\"%\"+(\"00\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\"--\\x3e\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\"T*\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\0*$/,\"\"),e.values=e.value.split(\"\\0\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\0*$/,\"\"),e.data=e.value)},\"W*\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\0.*$/,\"\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\0.*$/,\"\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\"I\".charCodeAt(0)||e[1]!==\"D\".charCodeAt(0)||e[2]!==\"3\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\"T\"===r.id[0]?$e[\"T*\"](r):\"W\"===r.id[0]&&$e[\"W*\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\"00\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\"timed-metadata\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\"I\".charCodeAt(0)||e.data[1]!==\"D\".charCodeAt(0)||e.data[2]!==\"3\".charCodeAt(0)))this.trigger(\"log\",{level:\"warn\",message:\"Skipping unrecognized metadata packet\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\"log\",{level:\"warn\",message:\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\"T\"===o.id[0]?Ve.frameParsers[\"T*\"](o):\"W\"===o.id[0]&&Ve.frameParsers[\"W*\"](o),\"com.apple.streaming.transportStreamTimestamp\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\"timestamp\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\"data\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\"data\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\"data\",e),t=0),this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")},this.reset=function(){t=0,this.trigger(\"reset\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\"pat\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\"timed-metadata\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\"timed-metadata\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\"pat\",e(t.subarray(s),i),this.trigger(\"data\",i);else if(i.pid===this.pmtPid)for(i.type=\"pmt\",e(t.subarray(s),i),this.trigger(\"data\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\"timed-metadata\"][i.pid],i.type=\"pes\",i.data=e.subarray(t),this.trigger(\"data\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\"video\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\"data\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\"video\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\"audio\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\"timed-metadata\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\"metadata\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\"avc\",type:\"video\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\"adts\",type:\"audio\"}),i=!0,t.trigger(\"data\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\"reset\")},this.flushStreams_=function(){a(s,\"video\"),a(n,\"audio\"),a(r,\"timed-metadata\")},this.flush=function(){if(!i&&e){var s={type:\"metadata\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\"avc\",type:\"video\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\"adts\",type:\"audio\"}),t.trigger(\"data\",s)}i=!1,this.flushStreams_(),this.trigger(\"done\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\"log\",{level:\"warn\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\"audio\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\"number\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\"data\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\"number\"!=typeof d&&(d=c),c++;\"number\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\"done\")},this.reset=function(){t=void 0,this.trigger(\"reset\")},this.endTimeline=function(){t=void 0,this.trigger(\"endedtimeline\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\"no bytes available\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\"data\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\"data\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\"reset\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\"data\",t.subarray(i+3)),t=null,i=0,this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\"video\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\"data\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\"slice_layer_without_partitioning_rbsp_idr\";break;case 6:o.nalUnitType=\"sei_rbsp\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\"seq_parameter_set_rbsp\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\"pic_parameter_set_rbsp\";break;case 9:o.nalUnitType=\"access_unit_delimiter_rbsp\"}e.trigger(\"data\",o)})),o.on(\"done\",(function(){e.trigger(\"done\")})),o.on(\"partialdone\",(function(){e.trigger(\"partialdone\")})),o.on(\"reset\",(function(){e.trigger(\"reset\")})),o.on(\"endedtimeline\",(function(){e.trigger(\"endedtimeline\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\"I\".charCodeAt(0)||e[t+1]!==\"D\".charCodeAt(0)||e[t+2]!==\"3\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\"I\".charCodeAt(0)&&e[t+1]===\"D\".charCodeAt(0)&&e[t+2]===\"3\".charCodeAt(0)?\"timed-metadata\":!0&e[t]&&!(240&~e[t+1])?\"audio\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\"PRIV\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\"\";for(s=t;s<i;s++)n+=\"%\"+(\"00\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\"com.apple.streaming.transportStreamTimestamp\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\"I\".charCodeAt(0)||e[l+1]!==\"D\".charCodeAt(0)||e[l+2]!==\"3\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\"audio\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\"data\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\"timed-metadata\",data:e.subarray(l,l+o)},this.trigger(\"data\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\"reset\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\"endedtimeline\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\"audioobjecttype\",\"channelcount\",\"samplerate\",\"samplingfrequencyindex\",\"samplesize\"],Bt=[\"width\",\"height\",\"profileIdc\",\"levelIdc\",\"profileCompatibility\",\"sarRatio\"],Ft=function(e,t){t.stream=e,this.trigger(\"log\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\"headOfPipeline\"!==n&&t[n].on&&t[n].on(\"log\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\"segmentTimingInfo\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\"timingInfo\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\"data\",{track:e,boxes:d}),this.trigger(\"done\",\"AudioSegmentStream\")):this.trigger(\"done\",\"AudioSegmentStream\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\"reset\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\"seq_parameter_set_rbsp\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\"pic_parameter_set_rbsp\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\"access_unit_delimiter_rbsp\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\"done\",\"VideoSegmentStream\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\"done\",\"VideoSegmentStream\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\"processedGopsInfo\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\"segmentTimingInfo\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\"timingInfo\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\"baseMediaDecodeTime\",e.baseMediaDecodeTime),this.trigger(\"timelineStartInfo\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\"data\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\"done\",\"VideoSegmentStream\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\"reset\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\"boolean\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\"video\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\"audio\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\"VideoSegmentStream\"!==e&&\"AudioSegmentStream\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\"done\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\"combined\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\"data\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\"caption\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\"id3Frame\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\"done\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\"aac\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\"audio\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\"timed-metadata\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\"timestamp\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\"data\",(function(r){\"timed-metadata\"!==r.type&&\"audio\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\"adts\",type:\"audio\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\"log\",s.getLogTrigger_(\"audioSegmentStream\")),n.audioSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"audioTimingInfo\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\"trackinfo\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\"data\",this.trigger.bind(this,\"data\")),n.coalesceStream.on(\"done\",this.trigger.bind(this,\"done\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\"ts\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\"data\",(function(r){var a;if(\"metadata\"===r.type){for(a=r.tracks.length;a--;)t||\"video\"!==r.tracks[a].type?i||\"audio\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\"log\",s.getLogTrigger_(\"videoSegmentStream\")),n.videoSegmentStream.on(\"timelineStartInfo\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\"processedGopsInfo\",s.trigger.bind(s,\"gopInfo\")),n.videoSegmentStream.on(\"segmentTimingInfo\",s.trigger.bind(s,\"videoSegmentTimingInfo\")),n.videoSegmentStream.on(\"baseMediaDecodeTime\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"videoTimingInfo\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\"log\",s.getLogTrigger_(\"audioSegmentStream\")),n.audioSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"audioTimingInfo\")),n.audioSegmentStream.on(\"segmentTimingInfo\",s.trigger.bind(s,\"audioSegmentTimingInfo\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\"trackinfo\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\"data\",this.trigger.bind(this,\"data\")),n.coalesceStream.on(\"id3Frame\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\"id3Frame\",e)})),n.coalesceStream.on(\"caption\",this.trigger.bind(this,\"caption\")),n.coalesceStream.on(\"done\",this.trigger.bind(this,\"done\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\"log\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\"aac\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\"ts\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\"\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\"\";\"\\0\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\"\\0\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\"undefined\"!=typeof window?window:void 0!==e?e:\"undefined\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\"00\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\"moov\",\"trak\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\"tkhd\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\"mdia\",\"mdhd\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\"moof\",\"traf\"]).reduce((function(t,i){var s,n=_i(i,[\"tfhd\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\"tfdt\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\"bigint\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\"number\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\"bigint\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\"moof\",\"traf\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\"tfhd\"])[0],o=_i(s[0],[\"trun\"])[0],l=_i(s[0],[\"tfdt\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\"bigint\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\"bigint\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\"moov\",\"trak\"]),i=[];return t.forEach((function(e){var t=_i(e,[\"mdia\",\"hdlr\"]),s=_i(e,[\"tkhd\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\"vide\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\"moov\",\"trak\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\"tkhd\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\"mdia\",\"hdlr\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\"vide\"===o?\"video\":\"soun\"===o?\"audio\":o}var l=_i(e,[\"mdia\",\"minf\",\"stbl\",\"stsd\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\"avcC\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\".\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\"avc1.4d400d\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\"esds\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\".\"+bi(d[19]),n.codec+=\".\"+bi(d[20]>>>2&63).replace(/^0/,\"\")):n.codec=\"mp4a.40.2\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\"mdia\",\"mdhd\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\"emsg\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\"moof\",\"traf\"]),i=Di(e,[\"mdat\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\"bigint\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\"tfhd\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\"tfdt\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\"trun\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\"sei_rbsp\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\"warn\",message:\"We've encountered a nal unit without data at \"+n+\" for trackId \"+i+\". See mux.js#223.\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\"data\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\"log\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\"object\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\"moov\",\"trak\",\"mdia\",\"mdhd\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\"tfdt\"])[0],o=Vi(r,[\"tfhd\"])[0],l=Vi(r,[\"trun\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\"utf-8\"),a=s.slice(r,r+t.size);if(Vi(a,[\"vtte\"])[0])return void(r+=t.size);Vi(a,[\"vttc\"]).forEach((function(s){const r=Vi(s,[\"payl\"])[0],a=Vi(s,[\"sttg\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\"slice_layer_without_partitioning_rbsp_idr\";case 6:return\"sei_rbsp\";case 7:return\"seq_parameter_set_rbsp\";case 8:return\"pic_parameter_set_rbsp\";case 9:return\"access_unit_delimiter_rbsp\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\"pat\":i===t?\"pmt\":t?\"pes\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\"video\";case Ki.ADTS_STREAM_TYPE:return\"audio\";case Ki.METADATA_STREAM_TYPE:return\"timed-metadata\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\"slice_layer_without_partitioning_rbsp_idr\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\"slice_layer_without_partitioning_rbsp_idr\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\"slice_layer_without_partitioning_rbsp_idr\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\"pes\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\"audio\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\"audio\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\"pes\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\"audio\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\"audio\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\"pes\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\"video\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\"video\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\"video\"):console.warn(\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\"pes\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\"video\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\"video\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\"pat\":t.pid=ns.ts.parsePat(i);break;case\"pmt\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\"timed-metadata\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\"audio\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\"audio\",dts:r,pts:r},{type:\"audio\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\"data\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\"data\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\"done\",(function(t){e.postMessage({action:\"done\"})})),t.on(\"gopInfo\",(function(t){e.postMessage({action:\"gopInfo\",gopInfo:t})})),t.on(\"videoSegmentTimingInfo\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\"videoSegmentTimingInfo\",videoSegmentTimingInfo:i})})),t.on(\"audioSegmentTimingInfo\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\"audioSegmentTimingInfo\",audioSegmentTimingInfo:i})})),t.on(\"id3Frame\",(function(t){e.postMessage({action:\"id3Frame\",id3Frame:t})})),t.on(\"caption\",(function(t){e.postMessage({action:\"caption\",caption:t})})),t.on(\"trackinfo\",(function(t){e.postMessage({action:\"trackinfo\",trackInfo:t})})),t.on(\"audioTimingInfo\",(function(t){e.postMessage({action:\"audioTimingInfo\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\"videoTimingInfo\",(function(t){e.postMessage({action:\"videoTimingInfo\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\"log\",(function(t){e.postMessage({action:\"log\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\"mp4Captions\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\"getMp4WebVttText\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\"probeMp4StartTime\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\"probeMp4Tracks\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\"probeEmsgID3\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\"number\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\"probeTs\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\"done\",type:\"transmuxed\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\"endedtimeline\",type:\"transmuxed\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\"init\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\"init\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\"data\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\"trackinfo\"===i.data.action&&o(i.data.trackInfo),\"gopInfo\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\"audioTimingInfo\"===i.data.action&&l(i.data.audioTimingInfo),\"videoTimingInfo\"===i.data.action&&c(i.data.videoTimingInfo),\"videoSegmentTimingInfo\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\"audioSegmentTimingInfo\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\"id3Frame\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\"caption\"===i.data.action&&p(i.data.caption),\"endedtimeline\"===i.data.action&&(T=!1,g()),\"log\"===i.data.action&&f(i.data.log),\"transmuxed\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\"Received an error message from the transmuxer worker\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\"setAudioAppendStart\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\"alignGopsWith\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\"setRemux\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\"segmenttransmuxingstart\",segment:v}),t.postMessage({action:\"push\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\"endTimeline\"}),t.postMessage({action:\"flush\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\"function\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\"reset\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\"init\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\"message\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\"message\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\"wvtt\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\"HLS request timed-out at URL: \"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\"HLS request aborted at URL: \"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\"HLS request errored at URL: \"+t.uri,code:lp,xhr:t,metadata:s}:\"arraybuffer\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\"Empty HLS response at URL: \"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\"Invalid HLS key at URL: \"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\"segmentkeyloadcomplete\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\"mp4\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\"unknown\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\"probeMp4Tracks\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\"number\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\"text\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\"initMp4WebVttParser\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\"segmentloaded\",segment:e});const o=\"arraybuffer\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\"audio\",\"start\");const y=s.bind(null,e,\"audio\",\"end\");let v=s.bind(null,e,\"video\",\"start\");const b=s.bind(null,e,\"video\",\"end\");op({action:\"probeTs\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\"combined\"===t.type?\"video\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\"segmenttransmuxingtiminginfoavailable\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\"segmenttransmuxingtiminginfoavailable\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\"combined\"===t.type?\"video\":t.type,p({type:\"segmenttransmuxingcomplete\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\"moof\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\"text\"}),void((e,t,i)=>{t===up&&op({action:\"getMp4WebVttText\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\"enca\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\"encv\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\"audio\":\"video\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\"probeMp4StartTime\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\"audio\",\"start\",a),r.hasVideo&&s(e,\"video\",\"start\",a),op({action:\"probeEmsgID3\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\"pushMp4Captions\",endAction:\"mp4Captions\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\"mp4CaptionParser\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\"ts\"!==e.container&&\"aac\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\"message\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\"An error occurred in the decryption worker\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\"message\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\"segmentdecryptionstart\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\"segmentdecryptioncomplete\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\"segmentdecryptionstart\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\"-init\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\"segmentdecryptioncomplete\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\"arraybuffer\",requestType:\"segment-key\"}),r=mp(s,i,b,y);y({type:\"segmentkeyloadstart\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\"arraybuffer\",requestType:\"segment-key\"}),n=mp(s,[s.map.key],b,y);y({type:\"segmentkeyloadstart\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\"arraybuffer\",headers:Ch(s.map),requestType:\"segment-media-initialization\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\"segmentloaded\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\"segmentloadstart\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\"arraybuffer\",headers:Ch(s),requestType:\"segment\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\"segmentloadstart\",segment:s});const S=e(_,T);S.addEventListener(\"progress\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\"loadend\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\"PlaylistSelector\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\"\"})},xp=function(e,t){if(!e)return\"\";const i=Le.getComputedStyle(e);return i?i[t]:\"\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\"sortedPlaylistReps\";return m&&(t=\"bandwidthBestRep\"),u[0]&&(t=\"enabledPlaylistReps\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\"could not choose a playlist with options\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\"cover\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\"sortedPlaylistReps\";return T?e=\"leastPixelDiffRep\":_?e=\"resolutionPlusOneRep\":y?e=\"resolutionBestRep\":m?e=\"bandwidthBestRep\":u[0]&&(e=\"enabledPlaylistReps\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\"could not choose a playlist with options\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\"width\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\"height\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\"objectFit\"):\"\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\"/\").slice(-2).join(\"/\")}catch(e){return\"\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\"number\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\"\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\"cue.frame.id is deprecated. Use cue.value.key instead.\"),e.value.key)},value:{get:()=>(bu.log.warn(\"cue.frame.value is deprecated. Use cue.value.data instead.\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\"cue.frame.privateData is deprecated. Use cue.value.data instead.\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\"ID\",class:\"CLASS\",startDate:\"START-DATE\",duration:\"DURATION\",endDate:\"END-DATE\",endOnNext:\"END-ON-NEXT\",plannedDuration:\"PLANNED-DURATION\",scte35Out:\"SCTE35-OUT\",scte35In:\"SCTE35-IN\"},Lp=new Set([\"id\",\"class\",\"startDate\",\"duration\",\"endDate\",\"endOnNext\",\"startTime\",\"endTime\",\"processDateRange\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\"metadata\",label:\"Timed Metadata\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\"number\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\"mediaIndex/partIndex increment\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\"getSyncSegmentCandidate (isSyncRequest)\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\"number\"==typeof c,m=e.segment.uri?\"segment\":\"pre-segment\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\"\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\"\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\"audio\"===s){const t=e.lastTimelineChange({type:\"main\"});return!t||t.to!==i}if(\"main\"===s&&n){const t=e.pendingTimelineChange({type:\"audio\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\"audio\"}),i=e.pendingTimelineChange({type:\"main\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\"audio\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\"main\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\"audioTimelineBehind\");e.timelineChangeController_.trigger(\"fixBadTimelineChange\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\"hls\"!==t)return null;const i=(e=>{let t=0;return[\"video\",\"audio\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\"bigint\"==typeof n||\"bigint\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\"number\"==typeof n&&\"number\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\"bigint\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\"warn\":\"info\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\"Initialization settings are required\");if(\"function\"!=typeof e.currentTime)throw new TypeError(\"No currentTime getter specified\");if(!e.mediaSource)throw new TypeError(\"No MediaSource specified\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\"INIT\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\"syncinfoupdate\"),this.syncController_.on(\"syncinfoupdate\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\"sourceopen\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\"state\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\"statechange\"))}}),this.sourceUpdater_.on(\"ready\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\"codecschange\",(e=>{this.trigger(Vt({type:\"codecschange\"},e))})),\"main\"===this.loaderType_&&this.timelineChangeController_.on(\"pendingtimelinechange\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\"audio\"===this.loaderType_&&this.timelineChangeController_.on(\"timelinechange\",(e=>{this.trigger(Vt({type:\"timelinechange\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\"dispose\"),this.state=\"DISPOSED\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\"syncinfoupdate\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\"WAITING\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\"READY\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\"APPENDING\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\"READY\",!0)}error(e){return void 0!==e&&(this.logger_(\"error occurred:\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\"ended\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\"main\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\"INIT\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\"READY\"!==this.state&&\"INIT\"!==this.state||(this.state=\"READY\"))}init_(){return this.state=\"READY\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\"INIT\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\"main\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\ncurrentTime: ${this.currentTime_()}\\nbufferedEnd: ${Mu(this.buffered_())}\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\"syncinfoupdate\"),\"INIT\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\"number\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\"playlistupdate\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\"clearAllMp4Captions\"}),this.transmuxer_.postMessage({action:\"reset\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\"hls\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearParsedMp4Captions\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\"skipping remove because end ${end} is <= start ${start}\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\"skipping remove because no source updater or starting media info\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\"main\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\"READY\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\"segmentselected\",metadata:t}),\"number\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\"number\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\"open\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\"number\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\nFor TargetTime: ${n}.\\nCurrentTime: ${this.currentTime_()}\\nBufferedEnd: ${t}\\nFetch At Buffer: ${this.fetchAtBuffer_}\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\"No sync info found while using media sequence sync\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\"chooseNextRequest_ - no sync info found using media sequence sync\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\"number\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\"number\"==typeof a.partIndex&&!l)return null;\"number\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\"previous segment\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\"previous part\");const d=this.mediaSource_&&\"ended\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\"choose next request. Force timestamp offset after loader resync\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\"number\"==typeof a&&c.parts[a],u={requestId:\"segment-loader-\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\"number\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\"BANDWIDTH\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\"earlyabort\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\"progress\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\"segmenttransmuxingtrackinfoavailable\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\"trackinfo update\",t),this.trigger(\"trackinfo\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\"SegmentLoader received no captions from a caption event\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\"usage\",name:\"vhs-608\"});let s=i;/^cc708_/.test(i)&&(s=\"SERVICE\"+i.split(\"_\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\"captions\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\"left\",a.position=r.position,a.positionAlign=\"line-left\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearParsedMp4Captions\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\"audio\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\"closed\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\"fmp4\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\"main\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\"main\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\"sync segment was incorrect, not appending\");this.logger_(\"sync segment was correct, appending\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\"main\"!==this.loaderType_||\"number\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \"+Nu(n).join(\", \")),r.length>1&&this.logger_(\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \"+Nu(r).join(\", \"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\", \")}, video buffer: ${Nu(r).join(\", \")}, `),this.error({message:\"Quota exceeded error with append of a single segment of content\",excludeUntil:1/0}),void this.trigger(\"error\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\"On QUOTA_EXCEEDED_ERR, re-processing call queue\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\"Received non QUOTA_EXCEEDED_ERR on append\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\"appenderror\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\"segmentappendstart\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\"audio\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\"WAITING\",this.pendingSegment_=e,this.trimBackBuffer_(e),\"number\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearAllMp4Captions\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\"reset\"}),this.transmuxer_.postMessage({action:\"setTimestampOffset\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\n${jp(e.uri)}\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\"going to request init segment.\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\"video\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\"audio\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\"received endedtimeline callback\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\"bandwidthupdated\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\"bandwidthupdate\"),this.trigger(\"timeout\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\"READY\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\"error\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\"APPENDING\",this.trigger(\"appending\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\"number\"==typeof e.start&&\"number\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\"main\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\"No starting media returned, likely due to an unsupported media format.\",playlistExclusionDuration:1/0}),void this.trigger(\"error\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\"main\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\"number\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\"main\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\":!t.hasVideo&&i.hasVideo?\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\":null:\"Neither audio nor video found in segment.\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\"error\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\"number\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\"main\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\"timestampoffset\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\"number\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\"number\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\"main\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\"number\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\"appendsdone\",metadata:e})}if(!this.pendingSegment_)return this.state=\"READY\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\"main\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\"warn\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\"READY\",e.isSyncRequest&&(this.trigger(\"syncinfoupdate\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\"main\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\"audio\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\"syncinfoupdate\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\"segment\":\"part\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\"bandwidthupdate\"),this.trigger(\"progress\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\"appended\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\"string\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\"video\",\"audio\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\"mediaSource\"!==s.type){if(\"mediaSource\"!==e&&t.ready()&&\"closed\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\"mediaSource\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\"closed\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\"audio\",t),Kp(\"video\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\"updateend\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\"error\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\"(QUOTA_EXCEEDED_ERR) \":\"\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\"open\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\"\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\"Failed to call media source endOfStream\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\"Failed to set media source duration\",e)}},rm=()=>(e,t)=>{if(\"open\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\"updateend\",i[`on${s}UpdateEnd_`]),r.addEventListener(\"error\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\".\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\".\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\"codecschange\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\"error\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\"Buffered Ranges are empty\";let t=\"Buffered Ranges: \\n\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\x3e ${n}. Duration (${n-s})\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \"updateend\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\"mediaSource\",this),this.mediaSource.addEventListener(\"sourceopen\",this.sourceopenListener_),this.logger_=Eu(\"SourceUpdater\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\"video\",this),this.onAudioUpdateEnd_=dm(\"audio\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\"createdsourcebuffers\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\"ready\"))}addSourceBuffer(e,t){cm({type:\"mediaSource\",sourceUpdater:this,action:am(e,t),name:\"addSourceBuffer\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\"abort\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\"mediaSource\",sourceUpdater:this,action:om(e),name:\"removeSourceBuffer\"}):bu.log.error(\"removeSourceBuffer is not supported!\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\"function\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\"function\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\"changeType\"}):bu.log.error(\"changeType is not supported!\")}addOrChangeSourceBuffers(e){if(!e||\"object\"!=typeof e||0===Object.keys(e).length)throw new Error(\"Cannot addOrChangeSourceBuffers to undefined codecs\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\"audio\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\"appendBuffer\"}),\"video\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\"start\"}),r.push({time:e.end(o),type:\"end\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\"start\"}),r.push({time:t.end(o),type:\"end\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\"start\"===r[o].type?(n++,2===n&&(i=r[o].time)):\"end\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\"mediaSource\",sourceUpdater:this,action:nm(e),name:\"duration\",doneFn:t})}endOfStream(e=null,t=Wp){\"string\"!=typeof e&&(e=void 0),cm({type:\"mediaSource\",sourceUpdater:this,action:sm(e),name:\"endOfStream\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\"audio\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\"remove\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\"video\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\"remove\"}):i()}updating(){return!(!Yp(\"audio\",this)&&!Yp(\"video\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\"audio\",sourceUpdater:this,action:tm(e),name:\"timestampOffset\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\"video\",sourceUpdater:this,action:tm(e),name:\"timestampOffset\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\"audio\",sourceUpdater:this,action:im(e),name:\"callback\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\"video\",sourceUpdater:this,action:im(e),name:\"callback\"})}dispose(){this.trigger(\"dispose\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\"sourceopen\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\"\\n\\n\".split(\"\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\"READY\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\"INIT\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\"READY\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\"timestampoffset\",e),void(this.state=\"WAITING_ON_TIMELINE\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\"READY\",this.pause(),this.trigger(\"error\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\"READY\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\"READY\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\"APPENDING\",this.trigger(\"appending\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\"function\"!=typeof Le.WebVTT&&\"function\"==typeof this.loadVttJs)return this.state=\"WAITING_ON_VTTJS\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\"Error loading vtt.js\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\"syncinfoupdate\"),this.pendingSegment_=null,void(this.state=\"READY\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\"vtt\"===e.type,s=t&&\"text\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\" \").forEach((e=>{const t=e.split(\":\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\"function\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\"function\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\"utf8\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\"Error encountered when parsing cues: \"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\"\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\"\\n\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\x3e ${o} | Appended: ${l}\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\x3e ${l} | Appended: ${c}\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\"VOD\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\"MediaSequence\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\"ProgramDateTime\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\"number\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\"Segment\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\"Discontinuity\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\"Playlist\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\"SyncController\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\"VOD\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\"Found sync point with exact match: \",i),i}return this.selectSyncPoint_(r,{key:\"time\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\"segmentIndex\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\"number\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\"\")+\"]\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\"syncinfoupdate\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\"number\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\"timestampoffset\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\"dispose\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\"pendingtimelinechange\")}pendingTimelineChange({type:e,from:t,to:i}){return\"number\"==typeof t&&\"number\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\"pendingtimelinechange\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\"number\"==typeof t&&\"number\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\"timelinechange\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\"dispose\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\"data\",(function(t){e.push(t)}))},e}();\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\"Invalid aes key size\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};a=\"undefined\"!=typeof window?window:void 0!==o?o:\"undefined\"!=typeof self?self:{};var l=a.BigInt||Number;l(\"0x1\"),l(\"0x100\"),l(\"0x10000\"),l(\"0x1000000\"),l(\"0x100000000\"),l(\"0x10000000000\"),l(\"0x1000000000000\"),l(\"0x100000000000000\"),l(\"0x10000000000000000\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\"function\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\"main\":\"alternative\";return e.characteristics&&e.characteristics.indexOf(\"public.accessibility.describes-video\")>=0&&(t=\"main-desc\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\"Problem encountered loading the alternate audio track.Switching back to default.\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\"Problem encountered loading the default audio track.\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\"Problem encountered loading the subtitle track.Disabling subtitle track.\");const s=i.activeTrack();s&&(s.mode=\"disabled\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\"loadedmetadata\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\"none\"!==s.preload())&&r.load()})),t.on(\"loadedplaylist\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\"error\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\"loadedmetadata\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\"none\"!==s.preload())&&r.load()})),t.on(\"loadedplaylist\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\"error\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\"vhs-json\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\"dash\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\"error\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\"hls\"===n)h=new kh(p.resolvedUri,s,a);else if(\"dash\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\"vhs-json\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\"subtitles\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\"error\",Im[e](e,t))},\"CLOSED-CAPTIONS\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\"captions\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\"showing\"===i[e].mode||\"hidden\"===i[e].mode)return i[e];return null}},Om=e=>{[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\"AUDIO\",\"SUBTITLES\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\"AUDIO\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\"AUDIO\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\"mediachange\",(()=>{[\"AUDIO\",\"SUBTITLES\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\"mediachanging\",(()=>{[\"AUDIO\",\"SUBTITLES\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\"usage\",name:\"vhs-audio-change\"})};s.audioTracks().addEventListener(\"change\",l),s.remoteTextTracks().addEventListener(\"change\",t.SUBTITLES.onTrackChanged),n.on(\"dispose\",(()=>{s.audioTracks().removeEventListener(\"change\",l),s.remoteTextTracks().removeEventListener(\"change\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\"audio\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\"Content Steering\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\"HLS\":\"DASH\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\"error\");i.startsWith(\"data:\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\",\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\"content-steering\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\"No valid content steering manifest URIs. Stopping content steering.\"),this.trigger(\"error\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\"contentsteeringloadstart\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\"content-steering-manifest\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\"retry-after\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\"contentsteeringloadcomplete\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\"error\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\"contentsteeringparsed\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\"url\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\"error\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\"RELOAD-URI\"],this.steeringManifest.priority=e[\"PATHWAY-PRIORITY\"]||e[\"SERVICE-LOCATION-PRIORITY\"],this.steeringManifest.pathwayClones=e[\"PATHWAY-CLONES\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\"There are no available pathways for content steering. Ending content steering.\"),this.trigger(\"error\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\"content-steering\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\"content-steering\"),this.off(\"error\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\"mediaRequests\",\"mediaRequestsAborted\",\"mediaRequestsTimedout\",\"mediaRequestsErrored\",\"mediaTransferDuration\",\"mediaBytesTransferred\",\"mediaAppends\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\"A non-empty playlist URL or JSON manifest string is required\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\"metadata\",\"ad-cues\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\"\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\"error\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\"Using ManagedMediaSource\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\"durationchange\",this.handleDurationChange_),this.mediaSource.addEventListener(\"sourceopen\",this.handleSourceOpen_),this.mediaSource.addEventListener(\"sourceended\",this.handleSourceEnded_),this.mediaSource.addEventListener(\"startstreaming\",this.load),this.mediaSource.addEventListener(\"endstreaming\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\"metadata\",label:\"segment-metadata\"},!1).track,this.segmentMetadataTrack_.mode=\"hidden\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\"dash\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\"main\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\"audio\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\"vtt\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\"vttjserror\",n),e()}function n(){s.off(\"vttjsloaded\",i),t()}s.one(\"vttjsloaded\",i),s.one(\"vttjserror\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\"loadedplaylist\",(()=>this.startABRTimer_())),this.tech_.on(\"pause\",(()=>this.stopABRTimer_())),this.tech_.on(\"play\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\"_\"]=Bm.bind(this,e)})),this.logger_=Eu(\"pc\"),this.triggeredFmp4Usage=!1,\"none\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\"play\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\"none\"===this.tech_.preload()?\"play\":\"loadstart\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\"loadeddata\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\"abr\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\"renditionselected\",metadata:i}),this.tech_.trigger({type:\"usage\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\"loadedmetadata\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\"none\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\"selectedinitialmedia\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\"loadedmetadata\",(()=>{this.trigger(\"selectedinitialmedia\")}))})),this.mainPlaylistLoader_.on(\"loadedplaylist\",(()=>{this.loadOnPlay_&&this.tech_.off(\"play\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\"initial\");if(!(\"vhs-json\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\"error\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\"mediachanging\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\"mediachange\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\"dash\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\"mediachange\",bubbles:!0})})),this.mainPlaylistLoader_.on(\"playlistunchanged\",(()=>{const e=this.mainPlaylistLoader_.media();if(\"playlist-unchanged\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\"Playlist no longer updating.\",reason:\"playlist-unchanged\"}}),this.tech_.trigger(\"playliststuck\"))})),this.mainPlaylistLoader_.on(\"renditiondisabled\",(()=>{this.tech_.trigger({type:\"usage\",name:\"vhs-rendition-disabled\"})})),this.mainPlaylistLoader_.on(\"renditionenabled\",(()=>{this.tech_.trigger({type:\"usage\",name:\"vhs-rendition-enabled\"})}));[\"manifestrequeststart\",\"manifestrequestcomplete\",\"manifestparsestart\",\"manifestparsecomplete\",\"playlistrequeststart\",\"playlistrequestcomplete\",\"playlistparsestart\",\"playlistparsecomplete\",\"renditiondisabled\",\"renditionenabled\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\"usage\",name:\"vhs-demuxed\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\"usage\",name:\"vhs-webvtt\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\"usage\",name:\"vhs-aes\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\"usage\",name:\"vhs-alternate-audio\"}),this.useCueTags_&&this.tech_.trigger({type:\"usage\",name:\"vhs-playlist-cue-tags\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\"We received no playlist to switch to. Please check your stream.\"),!1;const c=`allowing switch ${e&&e.id||\"null\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\"number\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\"bandwidthupdate\",(()=>{this.checkABR_(\"bandwidthupdate\"),this.tech_.trigger(\"bandwidthupdate\")})),this.mainSegmentLoader_.on(\"timeout\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\"progress\",(()=>{this.trigger(\"progress\")})),this.mainSegmentLoader_.on(\"error\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\"appenderror\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\"error\")})),this.mainSegmentLoader_.on(\"syncinfoupdate\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\"timestampoffset\",(()=>{this.tech_.trigger({type:\"usage\",name:\"vhs-timestamp-offset\"})})),this.audioSegmentLoader_.on(\"syncinfoupdate\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\"appenderror\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\"error\")})),this.mainSegmentLoader_.on(\"ended\",(()=>{this.logger_(\"main segment loader ended\"),this.onEndOfStream()})),this.timelineChangeController_.on(\"audioTimelineBehind\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\"fixBadTimelineChange\",(()=>{this.logger_(\"Fix bad timeline change. Restarting al segment loaders...\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\"earlyabort\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\"all\",[\"abort\"]),this.excludePlaylist({error:{message:\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\"trackinfo\",e),this.audioSegmentLoader_.on(\"trackinfo\",e),this.mainSegmentLoader_.on(\"fmp4\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\"usage\",name:\"vhs-fmp4\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\"fmp4\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\"usage\",name:\"vhs-fmp4\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\"ended\",(()=>{this.logger_(\"audioSegmentLoader ended\"),this.onEndOfStream()}));[\"segmentselected\",\"segmentloadstart\",\"segmentloaded\",\"segmentkeyloadstart\",\"segmentkeyloadcomplete\",\"segmentdecryptionstart\",\"segmentdecryptioncomplete\",\"segmenttransmuxingstart\",\"segmenttransmuxingcomplete\",\"segmenttransmuxingtrackinfoavailable\",\"segmenttransmuxingtiminginfoavailable\",\"segmentappendstart\",\"appendsdone\",\"bandwidthupdated\",\"timelinechange\",\"codecschange\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\"skipping fastQualityChange because new media is same as old\"):(this.switchMedia_(e,\"fast-quality\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\"firstplay\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\"function\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\"sourceopen\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\"durationchange\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\"open\"!==this.mediaSource.readyState?this.trigger(\"error\"):this.sourceUpdater_.endOfStream(\"network\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\"retryplaylist\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\"),this.tech_.trigger(\"retryplaylist\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\"excludeplaylist\"),this.tech_.trigger({type:\"usage\",name:\"vhs-rendition-excluded\"});const o=this.selectPlaylist();if(!o)return this.error=\"Playback cannot continue. No available working or supported playlists.\",void this.trigger(\"error\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\" \"+t.message:\"\";l(`${t.internal?\"Internal problem\":\"Problem\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\"audio\",[\"abort\",\"pause\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\"subtitle\",[\"abort\",\"pause\"]),this.delegateLoaders_(\"main\",[\"abort\",\"pause\"]);const d=o.targetDuration/2*1e3||5e3,u=\"number\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\"exclude\",r||u)}pauseLoading(){this.delegateLoaders_(\"all\",[\"abort\",\"pause\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\"all\"===e;(s||\"main\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\"audio\"===e)&&n.push(\"AUDIO\"),(s||\"subtitle\"===e)&&(n.push(\"CLOSED-CAPTIONS\"),n.push(\"SUBTITLES\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\"main\",\"audio\",\"subtitle\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\"all\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\"function\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\"main\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\"audio\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\"seekablerangeschanged\",metadata:s}),this.tech_.trigger(\"seekablechanged\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\"sourceopen\",this.updateDuration_),this.updateDuration_=null),\"open\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\"sourceopen\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\"dispose\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\"play\",this.loadOnPlay_),[\"AUDIO\",\"SUBTITLES\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\"sourceopen\",this.updateDuration_),this.mediaSource.removeEventListener(\"durationchange\",this.handleDurationChange_),this.mediaSource.removeEventListener(\"sourceopen\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\"sourceended\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\"avc1.4d400d\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\"Could not determine codecs for playlist.\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\"video\",\"audio\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\"browser\":\"muxer\";a[i]=a[i]||[],a[i].push(s[t]),\"audio\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \"${s.audio}\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\"video\",\"audio\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\"\")[0]||{}).type,n=(ui(s[t]||\"\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\"${this.sourceUpdater_.codecs[t]}\" -> \"${s[t]}\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\", \")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\", \"),e+=`${t} does not support codec(s): \"${a[t].join(\",\")}\"`)),\"\")+\".\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\"open\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\",\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\"stpp.ttml.im1t\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\", \")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \"${c}\" !== \"${n}\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \"${e.type}\" !== \"${r.type}\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \"${t.type}\" !== \"${a.type}\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\" && \")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\"cueIn\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\"cueOut\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\"cueOutCont\"in r){const[e,i]=r.cueOutCont.split(\"/\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\"\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\"com.apple.streaming\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\"\");n.id=e.id,n.type=\"com.apple.quicktime.HLS\",n.value={key:Pp[t],data:e[t]},\"scte35Out\"!==t&&\"scte35In\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\"PATHWAY-ID\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\"canplay\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\"content-steering\",this.excludeThenChangePathway_.bind(this));[\"contentsteeringloadstart\",\"contentsteeringloadcomplete\",\"contentsteeringparsed\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\"dash\"===this.sourceType_&&this.mainPlaylistLoader_.on(\"loadedplaylist\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\"content-steering\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\"content-steering\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\"DASH\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\"PATHWAY-ID\"]===n[\"BASE-ID\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\"BASE-ID\"]!==t[\"BASE-ID\"]||e.ID!==t.ID||e[\"URI-REPLACEMENT\"].HOST!==t[\"URI-REPLACEMENT\"].HOST)return!1;const i=e[\"URI-REPLACEMENT\"].PARAMS,s=t[\"URI-REPLACEMENT\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\"DASH\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\"content-steering\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\"non-usable\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\"usable\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\"string\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\"0\"))).join(\"\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\"loadedplaylist\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\"loadedplaylist\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\"FRAME-RATE\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\"fast-quality\"};return e===s||i||(e?(o(t),r.trigger({type:\"renditionenabled\",metadata:n})):r.trigger({type:\"renditiondisabled\",metadata:n})),e})}}const $m=[\"seeking\",\"seeked\",\"pause\",\"playing\",\"error\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\"PlaybackWatcher\"),this.logger_(\"initialize\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\"main\",\"subtitle\",\"audio\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\"appendsdone\",o[e].updateend),r[`${e}SegmentLoader_`].on(\"playlistupdate\",o[e].reset),this.tech_.on([\"seeked\",\"seeking\"],o[e].reset)}));const l=e=>{[\"main\",\"audio\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\"appended\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\"off\"))},this.clearSeekingAppendCheck_=()=>l(\"off\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\"on\")},this.tech_.on(\"seeked\",this.clearSeekingAppendCheck_),this.tech_.on(\"seeking\",this.watchForBadSeeking_),this.tech_.on(\"waiting\",s),this.tech_.on($m,n),this.tech_.on(\"canplay\",i),this.tech_.one(\"play\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\"dispose\"),this.tech_.off(\"waiting\",s),this.tech_.off($m,n),this.tech_.off(\"canplay\",i),this.tech_.off(\"play\",t),this.tech_.off(\"seeking\",this.watchForBadSeeking_),this.tech_.off(\"seeked\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\"appendsdone\",o[e].updateend),r[`${e}SegmentLoader_`].off(\"playlistupdate\",o[e].reset),this.tech_.off([\"seeked\",\"seeking\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\"bufferedrangeschanged\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\"usage\",name:`vhs-${e}-download-exclusion`}),\"subtitle\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\"playedrangeschanged\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\"usage\",name:\"vhs-unknown-waiting\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\"usage\",name:\"vhs-live-resync\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\"usage\",name:\"vhs-video-underflow\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\"number\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\"skipTheGap_:\",\"currentTime:\",i,\"scheduled currentTime:\",e,\"nextRange start:\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\"gapjumped\",metadata:n}),this.tech_.trigger({type:\"usage\",name:\"vhs-gap-skip\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\"usage\",name:\"vhs-error-reload-initialized\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\"loadedmetadata\",r),e.src(t),e.trigger({type:\"usage\",name:\"vhs-error-reload\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\"usage\",name:\"vhs-error-reload-canceled\"});else{if(n.getSource&&\"function\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\"ERROR: reloadSourceOnError - The option getSource must be a function!\")}},l=function(){e.off(\"loadedmetadata\",r),e.off(\"error\",o),e.off(\"dispose\",l)};e.on(\"error\",o),e.on(\"dispose\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\"3.17.0\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\"Moving average bandwidth decay must be between 0 and 1.\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\"width\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\"height\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\"objectFit\"):\"\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\"number\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\"videojs-vhs\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\"change\"})};Xm.canPlaySource=function(){return bu.log.warn(\"VHS is no longer a tech. Please remove it from your player's techOrder.\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\"keysessioncreated\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\"string\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\"DRM encrypted source cannot be decrypted without a DRM plugin\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\"video\");if(!bu.getTech(\"Html5\").isSupported())return!1;return[\"application/vnd.apple.mpegurl\",\"audio/mpegurl\",\"audio/x-mpegurl\",\"application/x-mpegurl\",\"video/x-mpegurl\",\"video/mpegurl\",\"application/mpegurl\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\"Html5\").isSupported())&&/maybe|probably/i.test(Re.createElement(\"video\").canPlayType(\"application/dash+xml\")),Xm.supportsTypeNatively=e=>\"hls\"===e?Xm.supportsNativeHls:\"dash\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\"VHS is no longer a tech. Please remove it from your player's techOrder.\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\"Component\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\"number\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\"VhsHandler\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\");this.on(Re,[\"fullscreenchange\",\"webkitfullscreenchange\",\"mozfullscreenchange\",\"MSFullscreenChange\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\"seeking\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\"error\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\"play\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\"number\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\"number\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\"usage\",name:\"vhs-bandwidth-from-local-storage\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\"usage\",name:\"vhs-throughput-from-local-storage\"}))}\"number\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\"withCredentials\",\"useDevicePixelRatio\",\"usePlayerObjectFit\",\"customPixelRatio\",\"limitRenditionByPlayerDimensions\",\"bandwidth\",\"customTagParsers\",\"customTagMappers\",\"cacheEncryptionKeys\",\"playlistSelector\",\"initialPlaylistSelector\",\"bufferBasedABR\",\"liveRangeSafeTimeDelta\",\"llhls\",\"useForcedSubtitles\",\"useNetworkInformationApi\",\"useDtsForTimestampOffset\",\"exactManifestTimings\",\"leastPixelDiffSelector\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\"number\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\"data:application/vnd.videojs.vhs+json,\")?JSON.parse(i.substring(i.indexOf(\",\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\"error\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\"object\"!=typeof t||t.code?\"string\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \"systemBandwidth\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\"canplay\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\"bandwidthupdate\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\"selectedinitialmedia\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\"createdsourcebuffers\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\"progress\",(function(){this.tech_.trigger(\"progress\")})),this.on(this.playlistController_,\"firstplay\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\"hls\"===this.options_.sourceType&&\"function\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\"waiting for EME key session creation\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\"created EME key session\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\"error while creating EME key session\",e),this.player_.error({message:\"Failed to initialize media keys for EME\",code:3})}))}handleWaitingForKey_(){this.logger_(\"waitingforkey fired, attempting to create any new key sessions\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\"keystatuschange\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\"waitingforkey\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\"selectedinitialmedia\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\"mediachange\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\"@videojs/http-streaming\":Gm,\"mux.js\":\"7.1.0\",\"mpd-parser\":\"1.3.1\",\"m3u8-parser\":\"7.2.0\",\"aes-decrypter\":\"4.0.2\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\"waitingforkey\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\"xhr-hooks-ready\")}attachStreamingEventListeners_(){[\"seekablerangeschanged\",\"bufferedrangeschanged\",\"contentsteeringloadstart\",\"contentsteeringloadcomplete\",\"contentsteeringparsed\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\"gapjumped\",\"playedrangeschanged\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\"videojs-http-streaming\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\"avc1.4d400d,mp4a.40.2\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\"\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\"maybe\":\"\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\"avc1.4d400d,mp4a.40.2\",!0)&&bu.getTech(\"Html5\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\"Vhs\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\"reloadSourceOnError\")||bu.registerPlugin(\"reloadSourceOnError\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\"div\"),s=f(\"video\"),n=f(\"source\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\"src\",r),S(n,\"type\",\"video/mp4\"),S(s,\"class\",\"video-js\"),s.playsInline=!0,S(s,\"allow\",\"fullscreen\"),s.controls=!0,S(i,\"class\",\"video-container svelte-xkosau\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\"src\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\"videoElement exists?\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\"Player initialized successfully\")}catch(e){console.error(\"Failed to initialize player:\",e)}}),0):console.error(\"Video element not found during mount\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\"videoData\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\"unshift\":\"push\"]((()=>{s=e,i(1,s)}))}]}ne(\".video-container.svelte-xkosau{width:500px}\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\"\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\"\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\"span\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\"data-index\",e[1]),S(t,\"role\",\"tooltip\"),S(t,\"class\",r=\"token-grid-item inline-block mt-2 border-b-2 \"+(e[0].special?\"text-gray-300 dark:text-gray-500\":\"\")),S(t,\"style\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\"\")&&w(s,o),2&i&&S(t,\"data-index\",e[1]),1&i&&r!==(r=\"token-grid-item inline-block mt-2 border-b-2 \"+(e[0].special?\"text-gray-300 dark:text-gray-500\":\"\"))&&S(t,\"class\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\"style\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\"\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\"span\"),a&&a.c(),i=v(\"\\n            \\\\n\"),n=b(),r=f(\"div\"),S(t,\"data-index\",e[1]),S(t,\"role\",\"tooltip\"),S(t,\"class\",\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\"),S(t,\"style\",s=`${e[2]} ${e[3]}`),S(r,\"class\",\"basis-full h-full\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\"data-index\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\"style\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\"\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\"span\"),n&&n.c(),i=v(\"\\n            \\\\t  \\n        \"),S(t,\"data-index\",e[1]),S(t,\"role\",\"tooltip\"),S(t,\"class\",\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\"),S(t,\"style\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\"data-index\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\"style\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\"\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\"span\"),n&&n.c(),i=v(\"\\n             \\n        \"),S(t,\"data-index\",e[1]),S(t,\"role\",\"tooltip\"),S(t,\"class\",\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\"),S(t,\"style\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\"data-index\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\"style\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\" \"===e[4]?mg:\"\\t\"===e[4]?pg:\"\\n\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\"\"}=t,{bgStyle:a=\"\"}=t;return e.$$set=e=>{\"token\"in e&&i(0,s=e.token),\"index\"in e&&i(1,n=e.index),\"underlineStyle\"in e&&i(2,r=e.underlineStyle),\"bgStyle\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\"longmouseover\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\"longmouseout\",{detail:t}))};return e.addEventListener(\"mouseover\",s),e.addEventListener(\"mouseout\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\"mouseover\",s),e.removeEventListener(\"mouseout\",n)}}}\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\"undefined\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\"string\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\"object\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\"function\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\"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\"]),Kg=xg([\"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\"]),Qg=xg([\"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\"]),Jg=xg([\"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\"]),Zg=xg([\"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\"]),ef=xg([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),tf=xg([\"#text\"]),sf=xg([\"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\"]),nf=xg([\"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\"]),rf=xg([\"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\"]),af=xg([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),of=Eg(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),lf=Eg(/<%[\\w\\W]*|[\\w\\W]*%>/gm),cf=Eg(/\\$\\{[\\w\\W]*/gm),df=Eg(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),uf=Eg(/^aria-[\\-\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),pf=Eg(/^(?:\\w+script|data):/i),mf=Eg(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\w]*(-[.\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\"undefined\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\"3.2.6\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\"cloneNode\"),y=Xg(g,\"remove\"),v=Xg(g,\"nextSibling\"),b=Xg(g,\"childNodes\"),_=Xg(g,\"parentNode\");if(\"function\"==typeof o){const e=s.createElement(\"template\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\"\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\"function\"==typeof _g&&\"function\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\"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 de=null;const ue=Vg({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]);let he=null;const pe=Vg({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),me=\"http://www.w3.org/1998/Math/MathML\",ge=\"http://www.w3.org/2000/svg\",fe=\"http://www.w3.org/1999/xhtml\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),Se=Vg({},[\"annotation-xml\"]);const we=Vg({},[\"title\",\"style\",\"font\",\"a\",\"script\"]);let ke=null;const xe=[\"application/xhtml+xml\",\"text/html\"];let Ee=null,Ce=null;const Ae=s.createElement(\"form\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\"object\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\"text/html\":e.PARSER_MEDIA_TYPE,Ee=\"application/xhtml+xml\"===ke?Mg:Ng,U=qg(e,\"ALLOWED_TAGS\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\"ALLOWED_ATTR\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\"ALLOWED_NAMESPACES\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\"ADD_URI_SAFE_ATTR\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\"ADD_DATA_URI_TAGS\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\"FORBID_CONTENTS\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\"FORBID_TAGS\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\"FORBID_ATTR\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\"USE_PROFILES\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\"#text\"]=!0),Q&&Vg(U,[\"html\",\"head\",\"body\"]),U.table&&(Vg(U,[\"tbody\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\"function\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');if(\"function\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\"\")}else void 0===T&&(T=function(e,t){if(\"object\"!=typeof e||\"function\"!=typeof e.createPolicy)return null;let i=null;const s=\"data-tt-policy-suffix\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\"dompurify\"+(i?\"#\"+i:\"\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\"TrustedTypes policy \"+n+\" could not be created.\"),null}}(m,r)),null!==T&&\"string\"==typeof S&&(S=T.createHTML(\"\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\"is\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\"\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\"<remove></remove>\"+e;else{const t=Rg(e,/^[\\r\\n\\t ]+/);i=t&&t[0]}\"application/xhtml+xml\"===ke&&ye===fe&&(e='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+e+\"</body></html>\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\"template\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\"html\":\"body\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\"string\"!=typeof e.nodeName||\"string\"!=typeof e.textContent||\"function\"!=typeof e.removeChild||!(e.attributes instanceof u)||\"function\"!=typeof e.removeAttribute||\"function\"!=typeof e.setAttribute||\"string\"!=typeof e.namespaceURI||\"function\"!=typeof e.insertBefore||\"function\"!=typeof e.hasChildNodes)},Ue=function(e){return\"function\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\w!]/g,e.innerHTML)&&$g(/<[/\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\"template\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\"svg\"===i:t.namespaceURI===me?\"svg\"===i&&(\"annotation-xml\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\"math\"===i:t.namespaceURI===ge?\"math\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\"application/xhtml+xml\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\"noscript\"!==s&&\"noembed\"!==s&&\"noframes\"!==s||!$g(/<\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\" \")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\"id\"===t||\"name\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\"is\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\"\")));else if(\"src\"!==t&&\"xlink:href\"!==t&&\"href\"!==t||\"script\"===e||0!==Bg(i,\"data:\")||!de[e]){if(G&&!$g(O,Ug(i,N,\"\")));else if(i)return!1}else;return!0},$e=function(e){return\"annotation-xml\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\"value\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\"id\"!==c&&\"name\"!==c||(Oe(a,e),u=\"user-content-\"+u),K&&$g(/((--!?|])>)|<\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\" \")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\"object\"==typeof m&&\"function\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\"TrustedHTML\":u=T.createHTML(u);break;case\"TrustedScriptURL\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\"\\x3c!--\\x3e\"),\"string\"!=typeof e&&!Ue(e)){if(\"function\"!=typeof e.toString)throw zg(\"toString is not a function\");if(\"string\"!=typeof(e=e.toString()))throw zg(\"dirty is not a string, aborting\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\"string\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\"root node is forbidden and cannot be sanitized in-place\")}}else if(e instanceof l)s=Ne(\"\\x3c!----\\x3e\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\"BODY\"===r.nodeName||\"HTML\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\"<\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\"\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\"!doctype\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\"<!DOCTYPE \"+s.ownerDocument.doctype.name+\">\\n\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\" \")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\"function\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\"#\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\"\\\\s*([+-]?\\\\d+)\\\\s*\",Pf=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",Lf=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\(${Df},${Df},${Df}\\\\)$`),Mf=new RegExp(`^rgb\\\\(${Lf},${Lf},${Lf}\\\\)$`),Rf=new RegExp(`^rgba\\\\(${Df},${Df},${Df},${Pf}\\\\)$`),Uf=new RegExp(`^rgba\\\\(${Lf},${Lf},${Lf},${Pf}\\\\)$`),Bf=new RegExp(`^hsl\\\\(${Pf},${Lf},${Lf}\\\\)$`),Ff=new RegExp(`^hsla\\\\(${Pf},${Lf},${Lf},${Pf}\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\"\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\"transparent\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\"rgb(\":\"rgba(\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\")\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\"0\":\"\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\"hsl(\":\"hsla(\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\")\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\"\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\"\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\"object\"==typeof e||(e={}),null!==t&&\"object\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,vy=new RegExp(yy.source,\"g\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\"\",t+=\"\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\"\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\"\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\"boolean\"===n?ay(t):(\"number\"===n?gy:\"string\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\"function\"!=typeof t.valueOf&&\"function\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\"deebf79ecae13182bd\",\"eff3ffbdd7e76baed62171b5\",\"eff3ffbdd7e76baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(xf)),ky=Sy(new Array(3).concat(\"e5f5e0a1d99b31a354\",\"edf8e9bae4b374c476238b45\",\"edf8e9bae4b374c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\"div\"),i.textContent=\"Missing tokens will show on completion.\",S(i,\"class\",\"text-sm border-b text-red-700 dark:text-red-400\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\"None\"!==e[2]&&jy(e),g=\"None\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\"div\"),i=f(\"div\"),s=f(\"div\"),J(n.$$.fragment),r=b(),a=f(\"table\"),o=f(\"tbody\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\"class\",\"mb-5 mt-1\"),S(o,\"class\",\"text-xs tracking-wider dark:text-white\"),S(a,\"class\",\"w-full\"),S(i,\"class\",\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\"),S(t,\"class\",\"col-1 flex flex-col items-center\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\"None\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\"None\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\"None\")+\"\";return{c(){t=f(\"tr\"),i=f(\"td\"),s=f(\"span\"),n=v(e[2]),a=b(),o=f(\"td\"),l=f(\"span\"),c=v(d),S(s,\"style\",r=e[7](e[11])),S(l,\"class\",\"pl-1\"),S(o,\"class\",\"text-right dark:text-white\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\"style\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\"None\")+\"\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\"None\")+\"\";return{c(){t=f(\"tr\"),i=f(\"td\"),s=f(\"span\"),n=v(e[3]),a=b(),o=f(\"td\"),l=f(\"span\"),c=v(d),S(s,\"class\",\"border-b-2\"),S(s,\"style\",r=e[6](e[11])),S(o,\"class\",\"text-right dark:text-white\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\"style\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\"None\")+\"\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\"hr\"),i=b(),s=f(\"table\"),n=f(\"thead\"),n.innerHTML='<tr><th class=\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\">Candidate</th> <th class=\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\">Prob</th></tr>',r=b(),a=f(\"tbody\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\"class\",\"bg-gray-400 dark:bg-gray-600 w-full my-2\"),S(s,\"class\",\"w-full\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\"\",u=e[50].prob?.toFixed(3)+\"\";return{c(){t=f(\"tr\"),i=f(\"td\"),s=f(\"span\"),r=b(),a=f(\"td\"),o=v(u),c=b(),S(s,\"class\",\"bg-gray-200 dark:bg-gray-700 dark:text-white\"),S(i,\"class\",n=\"px-1 text-left font-mono text-sm decoration-2 \"+(e[50].is_masked?\"line-through\":\"\")),S(a,\"class\",l=\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \"+(e[50].is_masked?\"line-through\":\"\")),S(t,\"class\",\"\"+(5===e[49]?\"border-t border-dashed border-gray-300 dark:border-gray-600\":\"\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\"\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\"px-1 text-left font-mono text-sm decoration-2 \"+(e[50].is_masked?\"line-through\":\"\"))&&S(i,\"class\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\"\")&&w(o,u),2048&t[0]&&l!==(l=\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \"+(e[50].is_masked?\"line-through\":\"\"))&&S(a,\"class\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\"div\"),S(n,\"class\",\"basis-full h-2\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\"div\"),S(e,\"class\",\"basis-full py-3\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\"div\"),S(i,\"class\",\"basis-full h-0\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\"\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\"\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\"span\"),t.textContent=\">\\n           \",S(t,\"class\",\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\"audio\"==e[44].data.type&&By(e),a=\"video\"==e[44].data.type&&Fy(e),o=\"image\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\"audio\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\"video\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\"image\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\"div\"),J(i.$$.fragment),S(t,\"class\",\"my-3\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\"div\"),J(i.$$.fragment),S(t,\"class\",\"my-3\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\"div\"),i=f(\"img\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\"src\",s),S(i,\"alt\",\"Image output\"),S(t,\"class\",\"my-3\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\"src\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\"media\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\"media\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\"div\"),i=f(\"div\"),r.c(),a=b(),o=f(\"div\"),l=f(\"div\"),c=f(\"span\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\"class\",\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\"),x(t,\"top\",e[10]+\"px\"),x(t,\"left\",e[9]+\"px\"),x(t,\"display\",\"none\"),S(c,\"class\",\"flex flex-wrap text-sm\"),S(c,\"role\",\"main\"),S(l,\"class\",\"px-4\"),S(o,\"class\",\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\"longmouseover\",e[13]),T(c,\"longmouseout\",e[15]),T(c,\"mouseover\",e[14]),T(c,\"mouseout\",e[16]),T(c,\"focus\",e[17]),T(c,\"blur\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\"top\",e[10]+\"px\"),(!_||512&s[0])&&x(t,\"left\",e[9]+\"px\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\"Token\"}=t,{underlineField:l=\"Probability\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\"\",p=e=>\"\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\(\\s*(\\d+),\\s*(\\d+),\\s*(\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\"Invalid RGBA format.\"),0)})(e);return t>186?\"rgba(0, 0, 0, 1)\":\"rgba(255, 255, 255, 1)\"},g=(e,t)=>{if(void 0===e)return\"\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\"\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\"\";return i=e.is_input?\"rgba(255, 255, 255, 0)\":e.is_force_forwarded?t?\"rgba(88, 119, 173, 1)\":\"rgba(243, 244, 246, 1)\":e.is_generated?t?\"rgba(88, 119, 173, 1)\":\"rgba(229, 231, 235, 1)\":\"rgba(255, 255, 254, 0)\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\"\",O=\"\";return e.$$set=e=>{\"components\"in e&&i(20,s=e.components),\"isCompleted\"in e&&i(0,n=e.isCompleted),\"isError\"in e&&i(21,r=e.isError),\"requireFullReplay\"in e&&i(1,a=e.requireFullReplay),\"bgField\"in e&&i(2,o=e.bgField),\"underlineField\"in e&&i(3,l=e.underlineField),\"backtrackCount\"in e&&i(22,c=e.backtrackCount),\"resetCount\"in e&&i(23,d=e.resetCount),\"isDarkMode\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\"media\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\"\");const t=e.name||\"\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\"audio\",e));else if(ue(e))_.push(t(\"image\",e));else if(pe(e))_.push(t(\"video\",e));else if(de(e)||ce(e)&&!e.value.includes(\"<|im_start|>\")&&!e.value.includes(\"<|im_end|>\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\"\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\"latency.max\"]=Math.max(t.latency_ms,A[\"latency.max\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\"\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\"latency.max\"]=Math.max(t.latency_ms,A[\"latency.max\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\"<|im_start|>\")||e.value.includes(\"<|im_end|>\"))k.add(e.value);else{const s=t.name||\"\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\"\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\"latency.max\"]=Math.max(a.latency_ms,A[\"latency.max\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\"border: none;\":\"Probability\"===l?e=>f(e.prob):\"Latency (ms)\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\"latency.max\"])):e=>\"border: none;\"),!n||r||\"Type\"===o?i(7,p=e=>y(e,u)):\"Probability\"===o?i(7,p=e=>g(e.prob)):\"Latency (ms)\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\"latency.max\"]))),console.log(A[\"latency.max\"])):i(7,p=e=>\"\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\"Probability\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\"Latency (ms)\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\"Type\"===t){if(e.is_input)return\"Input\";if(e.is_force_forwarded)return\"Forwarded\";if(e.is_generated)return\"Generated\"}else if(\"None\"===t)return\"\"},e=>{const t=e.detail.target;if(t.matches(\".token-grid-item\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\"block\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\".token-grid-item\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\"${e}\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\"rgb(249, 250, 251)\",t.style.backgroundColor=\"rgb(75, 85, 99)\"}}},e=>{e.detail.target.matches(\".token-grid-item\")&&i(8,v.style.display=\"none\",v)},e=>{var t;const i=e.target;if(i.matches(\".token-grid-item\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\"${e}\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\" \",\"&nbsp;\").replaceAll(\"\\t\",\"\\\\t\").replaceAll(\"\\n\",\"\\\\n\")),{text:\"...\",prob:1,latency_ms:0,role:\"\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\"unshift\":\"push\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\"html\"),window.addEventListener(\"load\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\"resize\",content:{height:`${e}px`,width:\"100%\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\"message\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\"*\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\"*\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\"type\"in e.data)if(\"kernelmsg\"===e.data.type){let t=e.data;ge.set(t)}else if(\"init_state\"===e.data.type){let t=e.data;ye.set(t);const i={type:\"clientmsg\",content:JSON.stringify({class_name:\"ClientReadyMessage\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\"e\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\"invalid format: \"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\" \":e.fill+\"\",this.align=void 0===e.align?\">\":e.align+\"\",this.sign=void 0===e.sign?\"-\":e.sign+\"\",this.symbol=void 0===e.symbol?\"\":e.symbol+\"\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\"\":e.type+\"\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\"\";var s=i[0],n=i[1];return n<0?\"0.\"+new Array(-n).join(\"0\")+s:s.length>n+1?s.slice(0,n+1)+\".\"+s.slice(n+1):s+new Array(n-s.length+2).join(\"0\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var kv={\"%\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\"\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\"en\").replace(/,/g,\"\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\"\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\"0\"):r>0?s.slice(0,r)+\".\"+s.slice(r):\"0.\"+new Array(1-r).join(\"0\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\"\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\"\":e.currency[0]+\"\",r=void 0===e.currency?\"\":e.currency[1]+\"\",a=void 0===e.decimal?\".\":e.decimal+\"\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\"%\":e.percent+\"\",c=void 0===e.minus?\"−\":e.minus+\"\",d=void 0===e.nan?\"NaN\":e.nan+\"\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\"n\"===v?(g=!0,v=\"g\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\"g\"),(p||\"0\"===t&&\"=\"===i)&&(p=!0,t=\"0\",i=\"=\");var b=\"$\"===h?n:\"#\"===h&&/[boxX]/.test(v)?\"0\"+v.toLowerCase():\"\",_=\"$\"===h?r:/[%p]/.test(v)?l:\"\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\"c\"===v)w=T(e)+w,e=\"\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\".\":n=t=s;break;case\"0\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\"+\"!==u&&(k=!1),h=(k?\"(\"===u?u:c:\"-\"===u||\"(\"===u?\"\":u)+h,w=(\"s\"===v?jv[8+bv/3]:\"\")+w+(k&&\"(\"===u?\")\":\"\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\"\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\"\"),i){case\"<\":e=h+e+w+E;break;case\"=\":e=h+E+e+w;break;case\"^\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\"\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\"f\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\",f\":s)).type){case\"s\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\"\":case\"e\":case\"g\":case\"p\":case\"r\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\"e\"===s.type));break;case\"f\":case\"%\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\"%\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\"div\"),s=y(\"svg\"),n=y(\"g\"),r=y(\"path\"),S(r,\"d\",a=t[3].map(Mv).join(\" \")),S(r,\"fill\",\"none\"),S(r,\"stroke-width\",\"1.25\"),S(r,\"stroke\",\"#374151\"),S(r,\"class\",\"stroke-gray-700 dark:stroke-gray-300\"),S(s,\"class\",t[0]),S(i,\"class\",\"inline-block font-medium text-gray-700 dark:text-gray-300\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\"static\"===getComputedStyle(e).position&&(e.style.position=\"relative\");const i=f(\"iframe\");i.setAttribute(\"style\",\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\"),i.setAttribute(\"aria-hidden\",\"true\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\/script>\",n=T(window,\"message\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\"about:blank\",i.onload=()=>{n=T(i.contentWindow,\"resize\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\" \"))&&S(r,\"d\",a),1&t&&S(s,\"class\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\",\",grouping:[3],currency:[\"$\",\"\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\"M\":\"L\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\"values\"in e&&i(4,o=e.values),\"svgClass\"in e&&i(0,l=e.svgClass),\"padding\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\"\";function o(e,t){return\"number\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\"span\"),s=v(a),n=b(),d.c(),r=_(),S(i,\"class\",c(\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\")+\" svelte-nqv7fo\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\"\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\"\";return n=new Uv({props:{values:e[1],svgClass:\"w-8 h-4 inline\",padding:e[2]}}),{c(){t=f(\"span\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\"class\",c(\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\")+\" svelte-nqv7fo\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\"\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\"\"!==e[0].units&&zv(e);return{c(){t=f(\"span\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\"class\",c(\"font-medium text-center text-gray-700 dark:text-gray-300 \")+\" svelte-nqv7fo\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\"\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\"\",r=\"\"!==e[0].units&&Hv(e);return{c(){t=f(\"span\"),i=v(n),s=b(),r&&r.c(),S(t,\"class\",c(\"font-medium text-gray-700 dark:text-gray-300 \")+\" svelte-nqv7fo\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\"\")&&w(i,n),\"\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\"\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\"\";return{c(){t=f(\"span\"),i=v(s),S(t,\"class\",\"\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\"\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\"span\"),i=f(\"span\"),n.c(),S(t,\"class\",c(\"dot-divider flex items-center text-xs whitespace-nowrap px-1\")+\" svelte-nqv7fo\"),S(t,\"title\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\"title\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\"metricDef\"in e&&i(0,s=e.metricDef),\"value\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\"•\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\"outclick\"))};return document.addEventListener(\"click\",t,!0),{destroy:function(){document.removeEventListener(\"click\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\"ul\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\"role\",\"listbox\"),S(t,\"class\",\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\"\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\"li\"),i=v(a),S(t,\"class\",`w-full px-4 py-1 ${0===e[12]?\"mt-1\":\"\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\"role\",\"option\"),S(t,\"aria-selected\",\"false\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\"click\",o),T(t,\"keypress\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\"\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\"div\"),n=f(\"button\"),r=f(\"span\"),a=f(\"span\"),o=v(t[2]),l=b(),c=y(\"svg\"),u=y(\"path\"),_=b(),E&&E.c(),S(a,\"class\",\"\"),S(u,\"fill-rule\",\"evenodd\"),S(u,\"d\",\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\"),S(u,\"clip-rule\",\"evenodd\"),S(c,\"xmlns\",\"http://www.w3.org/2000/svg\"),S(c,\"viewBox\",\"0 0 16 16\"),S(c,\"fill\",\"currentColor\"),S(c,\"class\",\"size-4\"),S(r,\"class\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\"class\",\"relative\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\"click\",t[4]),d(Xv.call(null,i)),T(i,\"outclick\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\"class\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\"\"}=t,{values:n=[]}=t,{defaultValue:r=\"\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\"select\",a)};return e.$$set=e=>{\"classes\"in e&&i(0,s=e.classes),\"values\"in e&&i(1,n=e.values),\"defaultValue\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\"\",units:\"\",description:\"Determines whether engine is running, completed or in error.\",isScalar:!0,precision:0},cpu:{name:\"CPU\",units:\"%\",description:\"Average utilization across CPU cores.\",isScalar:!1,precision:1},gpu:{name:\"GPU\",units:\"%\",description:\"Average utilization across GPUs.\",isScalar:!1,precision:1},ram:{name:\"RAM\",units:\"GB\",description:\"Utilization of RAM.\",isScalar:!0,precision:1},vram:{name:\"VRAM\",units:\"GB\",description:\"Utilization of video RAM.\",isScalar:!0,precision:1},\"wall time\":{name:\"Time\",units:\"s\",description:\"Time taken from initial display to engine completion.\",isScalar:!0,precision:1},\"avg latency\":{name:\"Latency\",units:\"ms\",description:\"Average roundtrip latency per token\",isScalar:!0,precision:0},consumed:{name:\"Used\",units:\"tkn\",description:\"Total tokens consumed by language model.\",isScalar:!0,precision:0},\"token reduction\":{name:\"Reduced\",units:\"%\",description:\"Total tokens consumed by language model divided by total tokens.\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\"None\",\"Type\",\"Probability\",\"Latency (ms)\"],classes:\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\",defaultValue:\"Type\"}}),y.$on(\"select\",e[6]),_=new tb({props:{values:[\"None\",\"Probability\",\"Latency (ms)\"],classes:\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\",defaultValue:\"Probability\"}}),_.$on(\"select\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\"Done\",\"Error\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\"meta\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\"div\"),l=f(\"nav\"),c=f(\"section\"),d=f(\"div\"),u=f(\"span\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\"span\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\"section\"),J(E.$$.fragment),sb.title=\"graphpaper\",S(t,\"name\",\"description\"),S(t,\"content\",\"graphpaper\"),S(u,\"class\",\"flex mr-2\"),S(w,\"class\",\"flex mr-4 text-gray-300 dark:text-gray-400\"),S(d,\"class\",\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\"),S(c,\"class\",\"\"),S(l,\"class\",\"sticky top-0 z-50 bg-white dark:bg-gray-900\"),S(x,\"class\",\"w-full min-h-40\"),S(o,\"class\",\"w-full\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\"Done\",\"Error\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\"wall time\":0,consumed:0,\"token reduction\":0,\"avg latency\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\"Type\",c=\"Probability\";let d=()=>{if(0===a.components.length){console.log(\"No messages received: requesting output.\");const e={type:\"clientmsg\",content:JSON.stringify({class_name:\"OutputRequestMessage\",identifier:\"\"})};fe.set(e)}};D((()=>{fe.set({type:\"init_stitch\",content:\"\"}),setTimeout(d,400);const e=e=>{var t,s;\"theme\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\"dark\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\"dark\"),console.log(\"[Guidance Widget] ✅ Dark mode applied via postMessage\"))};return window.addEventListener(\"message\",e),()=>{window.removeEventListener(\"message\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\"\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\"\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\"TraceMessage\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\"Backtrack\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\"ExecutionStartedMessage\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\"OutputRequestAckMessage\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\"ClientReadyAckMessage\"===e.class_name}(e));else if(function(e){return null!=e&&\"ResetDisplayMessage\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\"MetricMessage\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\"status\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\"ExecutionCompletedMessage\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\"state\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\"status\",\"cpu\",\"ram\",\"gpu\",\"vram\"],a):i(0,a.shownMetrics=[\"status\",\"consumed\",\"token reduction\",\"avg latency\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "guidance/trace/__init__.py",
    "content": "\"\"\"Trace tree of inputs & outputs generated from a guidance program.\n\nThe first implementation aims for simplicity.\nOnce benchmark figures are out, we'll figure out what to optimize.\n\nThe most critical class is the trace handler. See its documentation for trace design & motivations.\n\"\"\"\n\nfrom ._trace import (\n    AudioOutput,\n    Backtrack,\n    CaptureOutput,\n    EmbeddedInput,\n    ImageInput,\n    ImageOutput,\n    InputAttr,\n    LiteralInput,\n    NodeAttr,\n    OutputAttr,\n    RoleCloserInput,\n    RoleOpenerInput,\n    StatefulGuidanceInput,\n    StatelessGuidanceInput,\n    TextOutput,\n    Token,\n    TokenOutput,\n    TraceHandler,\n    TraceNode,\n    VideoOutput,\n)\n\n__all__ = [\n    \"AudioOutput\",\n    \"Backtrack\",\n    \"CaptureOutput\",\n    \"EmbeddedInput\",\n    \"ImageInput\",\n    \"ImageOutput\",\n    \"InputAttr\",\n    \"LiteralInput\",\n    \"NodeAttr\",\n    \"OutputAttr\",\n    \"RoleCloserInput\",\n    \"RoleOpenerInput\",\n    \"StatefulGuidanceInput\",\n    \"StatelessGuidanceInput\",\n    \"TextOutput\",\n    \"Token\",\n    \"TokenOutput\",\n    \"TraceHandler\",\n    \"TraceNode\",\n    \"VideoOutput\",\n]\n"
  },
  {
    "path": "guidance/trace/_trace.py",
    "content": "# TODO(nopdive): Consider integrating token operations into trace nodes (handles token healing cleaner).\n# TODO(nopdive): Benchmark (expected heap fragmentation issue). Likely need memory pooling (via rust/ctypes/Cython).\nimport logging\nimport weakref\nfrom itertools import count\nfrom typing import Annotated, Any, ClassVar, Generator, Optional, Union\n\nfrom pydantic import Base64Bytes, BaseModel, Discriminator, Field, Tag, computed_field, model_validator\n\nfrom .._utils import log_cleanup, pydantic_no_default_repr, pydantic_no_default_str\n\nlogger = logging.getLogger(__name__)\n\n\nclass NodeAttr(BaseModel):\n    \"\"\"Attributes of a trace node.\"\"\"\n\n    _subclasses: ClassVar[set[type[\"NodeAttr\"]]] = set()\n\n    def __init_subclass__(cls, **kwargs):\n        super().__init_subclass__(**kwargs)\n        cls._subclasses.add(cls)\n\n    @computed_field  # type: ignore[prop-decorator]\n    @property\n    def class_name(self) -> str:\n        \"\"\"Class name of the message.\"\"\"\n        return self.__class__.__name__\n\n    @model_validator(mode=\"before\")\n    def validate_class_name(cls, data):\n        if isinstance(data, dict):\n            if \"class_name\" in data and data[\"class_name\"] != cls.__name__:\n                raise ValueError(f\"mismatched class name: {data['class_name']}, expected: {cls.__name__}\")\n        return data\n\n    @classmethod\n    def as_discriminated_union(cls) -> type[\"NodeAttr\"]:\n        return Annotated[\n            Union[tuple(Annotated[tp, Tag(tp.__name__)] for tp in cls._subclasses)],  # noqa: UP007\n            Discriminator(\n                lambda x: x[\"class_name\"] if isinstance(x, dict) else x.class_name,\n            ),\n        ]  # type: ignore[return-value]\n\n    def __repr__(self):\n        return pydantic_no_default_repr(self)\n\n    def __str__(self):\n        return pydantic_no_default_str(self)\n\n\nclass InputAttr(NodeAttr):\n    \"\"\"Input for a guidance program (i.e. literal or guidance grammar).\"\"\"\n\n    pass\n\n\nclass OutputAttr(NodeAttr):\n    \"\"\"Output for a guidance program (i.e. text output).\"\"\"\n\n    pass\n\n\nclass StatelessGuidanceInput(InputAttr):\n    \"\"\"Stateless guidance input (light wrapper).\"\"\"\n\n    # NOTE(nopdive): Open to debate what we should serialize here, excluding for now.\n    value: Any = Field(exclude=True)\n\n    def __repr__(self):\n        return f\"{self.__class__.__name__}({self.value})\"\n\n\nclass StatefulGuidanceInput(InputAttr):\n    \"\"\"Stateful guidance input (light wrapper).\"\"\"\n\n    # NOTE(nopdive): Open to debate what we should serialize here, excluding for now.\n    value: Any = Field(exclude=True)\n\n    def __repr__(self):\n        return f\"{self.__class__.__name__}({self.value})\"\n\n\nclass LiteralInput(InputAttr):\n    \"\"\"Text string as a literal.\"\"\"\n\n    value: str\n\n\nclass ImageInput(InputAttr):\n    \"\"\"Image input.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"png\"\n\n\nclass AudioInput(InputAttr):\n    \"\"\"Audio input.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"wav\"\n\n\nclass VideoInput(InputAttr):\n    \"\"\"Video input.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"mp4\"\n\n\nclass EmbeddedInput(InputAttr):\n    \"\"\"Text string with embedded guidance input.\"\"\"\n\n    value: str\n\n\nclass RoleOpenerInput(InputAttr):\n    \"\"\"Appears when a role is opened (i.e. user / system).\n\n    This usually occurs as a role context and __enter__ is called.\n    \"\"\"\n\n    name: str | None = None\n    text: str | None = None\n    closer_text: str | None = None\n\n\nclass RoleCloserInput(InputAttr):\n    \"\"\"Appears when a role is closed (i.e. user / system).\n\n    This usually occurs as a role context and __exit__ is called.\n    \"\"\"\n\n    name: str | None = None\n    text: str | None = None\n\n\nclass AudioOutput(OutputAttr):\n    \"\"\"Audio output.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"wav\"\n    is_input: bool = False\n\n\nclass VideoOutput(OutputAttr):\n    \"\"\"Video output.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"mp4\"\n    is_input: bool = False\n\n\nclass ImageOutput(OutputAttr):\n    \"\"\"Image output.\"\"\"\n\n    value: Base64Bytes\n    format: str = \"png\"\n    is_input: bool = False\n\n\nclass TextOutput(OutputAttr):\n    \"\"\"Text string.\"\"\"\n\n    value: str\n    is_input: bool = False\n    is_generated: bool = False\n    is_force_forwarded: bool = False\n    latency_ms: float = 0.0\n\n    def __str__(self):\n        return self.value\n\n\nclass Token(BaseModel):\n    token: str\n    bytes: Base64Bytes\n    prob: float = float(\"nan\")\n    masked: bool = False\n\n\nclass TokenOutput(TextOutput):\n    token: Token\n    top_k: list[Token] | None = None\n\n\nclass Backtrack(OutputAttr):\n    n_tokens: int\n    bytes: Base64Bytes\n\n\nclass CaptureOutput(OutputAttr):\n    \"\"\"Capture variable output as a string.\n\n    If `value` is set to None, this means it's a reset (needed for append capture group outputs).\n    \"\"\"\n\n    name: str\n    value: str | None = None\n    is_append: bool = False\n    log_probs: float = 0.0\n\n    def __str__(self):\n        return f\"{self.name}{'+=' if self.is_append else '='}{self.value.__str__()}\"\n\n\nclass WeakRefList(list):\n    \"\"\"Weak reference list implementation that uses weakref ref objects.\n\n    This does not override all methods for list.\n    \"\"\"\n\n    def append(self, item):\n        super().append(weakref.ref(item))\n\n    def __getitem__(self, index):\n        ref = super().__getitem__(index)\n        obj = ref()\n        if obj is None:\n            raise ReferenceError(\"The referenced object has been garbage collected\")\n        return obj\n\n    def __iter__(self):\n        return (ref() for ref in super().__iter__() if ref() is not None)\n\n    def remove(self, item):\n        ref_to_remove = None\n        for ref in super().__iter__():\n            obj = ref()\n            if obj is item:\n                ref_to_remove = ref\n                break\n        if ref_to_remove:\n            super().remove(ref_to_remove)\n\n\ndef _cleanup(log_msg: str):\n    log_cleanup(log_msg)\n\n\nclass TraceNode(BaseModel):\n    \"\"\"Trace node which associates inputs and outputs of a guidance program.\"\"\"\n\n    identifier: int = Field(default_factory=count().__next__)\n    parent: Optional[\"TraceNode\"] = None\n    children: list[\"TraceNode\"] = Field(default_factory=WeakRefList)\n    input: list[InputAttr] = Field(default_factory=list)\n    output: list[OutputAttr] = Field(default_factory=list)\n\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        weakref.finalize(self, _cleanup, f\"trace({id(self)}):{self.identifier}\")\n\n    def add_child(self, child: \"TraceNode\") -> None:\n        \"\"\"Add a child node to the trace node.\n\n        Args:\n            child: The child node to add.\n        \"\"\"\n        child.parent = self\n        self.children.append(child)\n\n    def remove_child(self, child: \"TraceNode\") -> None:\n        \"\"\"Remove a child node from the trace node.\n\n        Args:\n            child: The child node to remove.\n        \"\"\"\n        child.parent = None\n        self.children.remove(child)\n\n    def ancestors(self) -> Generator[\"TraceNode\", None, None]:\n        \"\"\"Yields ancestor trace nodes ending with root.\n\n        Yields:\n            Ancestor trace nodes.\n        \"\"\"\n        node = self\n        while node.parent is not None:\n            yield node.parent\n            node = node.parent\n\n    def path(self) -> Generator[\"TraceNode\", None, None]:\n        \"\"\"Yields path of from root to self inclusively.\n\n        Yields:\n            Trace nodes from root to self.\n        \"\"\"\n        yield from reversed(list(self.ancestors()))\n        yield self\n\n    def root(self) -> \"TraceNode\":\n        \"\"\"Returns root by traversing parents of self.\n\n        Returns:\n            Root of tree self is part of.\n        \"\"\"\n        if self.parent is None:\n            root = self\n        else:\n            *_, root = self.ancestors()\n        return root\n\n    def traverse(self, bfs: bool = True):\n        \"\"\"Traverse the trace nodes starting with self.\n\n        Args:\n            bfs: Use breadth-first-search, otherwise depth-first-search.\n\n        Yields:\n            Trace nodes in traversal order.\n        \"\"\"\n        queue = [self]\n        while queue:\n            node = queue.pop(0)\n            yield node\n\n            if bfs:\n                queue.extend(node.children)\n            else:\n                # NOTE(nopdive): Analogous to extend but at front of list.\n                queue[0:0] = node.children\n\n    def __repr__(self):\n        return f\"{self.identifier}:{self.input!r}:{self.output!r}\"\n\n    def __hash__(self):\n        return hash(self.identifier)\n\n\nclass TraceHandler(BaseModel):\n    \"\"\"Trace handler that will own a tree of trace nodes.\n\n    This will primarily be owned by a model's engine.\n    Each guidance model corresponds to one trace node.\n    All guidance models emitted from an engine is to be included as their own paths within the tree.\n\n    The requirement for holding all live traces ensures downstream consumers such as UI providers\n    can do near-real-time partial updates.\n    \"\"\"\n\n    # NOTE(nopdive): Type trickery for pydantic.\n    id_node_map: dict[int, TraceNode] = weakref.WeakValueDictionary()  # type: ignore\n    node_id_map: dict[TraceNode, int] = weakref.WeakKeyDictionary()  # type: ignore\n\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        weakref.finalize(self, _cleanup, f\"tracehandler({id(self)})\")\n\n    def __getitem__(self, item):\n        return self.id_node_map[item]\n\n    def __hash__(self):\n        return hash(id(self))\n\n    def update_node(self, identifier: int, parent_id: int | None, node_attr: NodeAttr | None = None) -> TraceNode:\n        \"\"\"Update the trace node with the given identifier.\n\n        If the trace node does not exist, it will be created.\n        Both parent id and node attributes can be updated only once until further notice.\n\n        Args:\n            identifier: User-defined identifier for the trace node.\n            parent_id: User-defined parent identifier for the trace node.\n            node_attr: Input or output node attribute to be updated on the trace node.\n        \"\"\"\n        node = self.id_node_map.get(identifier, None)\n        if node is None:\n            node = TraceNode()\n\n            self.id_node_map[identifier] = node\n            self.node_id_map[node] = identifier\n\n            if parent_id is not None:\n                parent_node = self.id_node_map.get(parent_id, None)\n                if parent_node is not None:\n                    parent_node.add_child(node)\n\n        if node_attr is not None:\n            if isinstance(node_attr, InputAttr):\n                if node.input:\n                    logger.debug(\n                        f\"Adding additional input to trace node {node.identifier}, now has {len(node.input) + 1} inputs\"\n                    )\n                node.input.append(node_attr)\n            elif isinstance(node_attr, OutputAttr):\n                if node.output:\n                    logger.debug(\n                        f\"Adding additional output to trace node {node.identifier}, now has {len(node.output) + 1} outputs\"\n                    )\n                node.output.append(node_attr)\n            else:\n                raise ValueError(f\"Unexpected node attr: {node_attr}\")\n        return node\n\n    def root(self) -> TraceNode:\n        \"\"\"Returns root node of trace handler.\n\n        Raises:\n            Exception: If root cannot be found.\n\n        Returns: Root trace node.\n        \"\"\"\n        root = None\n        for _, node in self.id_node_map.items():\n            if node.parent is None:\n                root = node\n                break\n        if root is None:\n            raise Exception(\"No root in trace handler.\")\n        return root\n"
  },
  {
    "path": "guidance/visual/__init__.py",
    "content": "\"\"\"UI and other visual UX considerations.\n\nUsers should have few reasons to be accessing this module.\n\"\"\"\n\nfrom ._exchange import TopicExchange\nfrom ._message import (\n    ClientReadyAckMessage,\n    ClientReadyMessage,\n    ExecutionCompletedMessage,\n    ExecutionStartedMessage,\n    GuidanceMessage,\n    MetricMessage,\n    OutputRequestMessage,\n    ResetDisplayMessage,\n    TraceMessage,\n    deserialize_message,\n    serialize_message,\n)\nfrom ._renderer import AutoRenderer, JupyterWidgetRenderer, Renderer\nfrom ._trace import display_trace_tree, trace_node_to_html, trace_node_to_str\n\n__all__ = [\n    \"AutoRenderer\",\n    \"ClientReadyAckMessage\",\n    \"ClientReadyMessage\",\n    \"ExecutionCompletedMessage\",\n    \"ExecutionStartedMessage\",\n    \"GuidanceMessage\",\n    \"JupyterWidgetRenderer\",\n    \"MetricMessage\",\n    \"OutputRequestMessage\",\n    \"Renderer\",\n    \"ResetDisplayMessage\",\n    \"TopicExchange\",\n    \"TraceMessage\",\n    \"deserialize_message\",\n    \"display_trace_tree\",\n    \"serialize_message\",\n    \"trace_node_to_html\",\n    \"trace_node_to_str\",\n]\n"
  },
  {
    "path": "guidance/visual/_environment.py",
    "content": "\"\"\"Rendering environment detection.\n\nDetection logic is inspired from both plotly and interpretml environment detection.\n- https://github.com/plotly/plotly.py\n- https://github.com/interpretml/interpret\n\"\"\"\n# TODO(nopdive): Major cloud providers implemented and manually verified.\n\nimport os\n\nfrom pydantic import BaseModel\n\n\nclass EnvFlags(BaseModel):\n    \"\"\"Environment flags - such as if we're in a notebook or cloud.\"\"\"\n\n    is_notebook: bool = False\n    is_cloud: bool = False\n\n\nclass Environment:\n    \"\"\"Capabilities based environment detection.\"\"\"\n\n    def __init__(self):\n        \"\"\"Initializes.\n\n        This will immediately check for which environments are detected.\n        \"\"\"\n        self._flags = EnvFlags()\n        self._checks = {\n            \"vscode\": _detect_vscode,\n            \"ipython-zmq\": _detect_ipython_zmq,\n            \"ipython\": _detect_ipython,\n        }\n        envs = []\n        for name, update_flags in self._checks.items():\n            if update_flags(self._flags):  # in-place operation on flags\n                envs.append(name)\n        self._detected_envs = envs\n\n    @property\n    def detected_envs(self) -> list[str]:\n        \"\"\"Detected environments (i.e. vscode, ipython-zmq).\n\n        Returns:\n            Detected environment names.\n        \"\"\"\n        return self._detected_envs\n\n    def is_notebook(self) -> bool:\n        \"\"\"Determines if the python process is in a notebook.\n\n        Returns:\n            True if in notebook.\n        \"\"\"\n        return self._flags.is_notebook\n\n    def is_cloud(self) -> bool:\n        \"\"\"Determines if the python process is in a cloud provider.\n\n        Returns:\n            True if in notebook.\n        \"\"\"\n        return self._flags.is_cloud\n\n    def is_terminal(self) -> bool:\n        \"\"\"Determines if the python process not in a notebook (we assume terminal).\n\n        Returns:\n            True if in terminal.\n        \"\"\"\n        return not self._flags.is_notebook\n\n\ndef _detect_vscode(flags: EnvFlags) -> bool:\n    \"\"\"Detects if called in a vscode process.\n\n    Args:\n        flags: Inplace flags to be set.\n\n    Returns:\n        True if in vscode environment.\n    \"\"\"\n    # NOTE: We don't flag is_notebook since this will be picked up by ipython-zmq here.\n    found = \"VSCODE_PID\" in os.environ\n    return found\n\n\ndef _detect_ipython(flags: EnvFlags) -> bool:\n    \"\"\"Detects if called in an IPython environment.\n    Mostly derived from stackoverflow below:\n    https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook\n\n    Args:\n        flags: Inplace flags to be set.\n\n    Returns:\n        True if in IPython environment.\n    \"\"\"\n    found = False\n    try:\n        from IPython import get_ipython\n\n        found = get_ipython() is not None\n    except (NameError, ImportError):  # pragma: no cover\n        pass\n    return found\n\n\ndef _detect_ipython_zmq(flags: EnvFlags) -> bool:\n    \"\"\"Detects if in an IPython environment using ZMQ (i.e. notebook/qtconsole/lab).\n\n    Mostly derived from stackoverflow below:\n    https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook/24937408\n\n    Args:\n        flags: Inplace flags to be set.\n\n    Returns:\n        True if called in IPython notebook or qtconsole.\n    \"\"\"\n    try:\n        from IPython import get_ipython\n\n        shell = get_ipython().__class__.__name__\n        if shell == \"ZMQInteractiveShell\":\n            found = True  # Jupyter notebook or qtconsole\n        elif shell == \"TerminalInteractiveShell\":\n            found = False  # Terminal running IPython\n        else:\n            found = False  # Other type (?)\n    except (NameError, ImportError):  # pragma: no cover\n        found = False  # Probably standard Python interpreter\n\n    flags.is_notebook |= found\n    return found\n"
  },
  {
    "path": "guidance/visual/_exchange.py",
    "content": "\"\"\"Poor man's exchanges for routing messages.\"\"\"\n\nimport logging\nimport re\nfrom collections import defaultdict\nfrom typing import Callable\n\nfrom .._topics import DEFAULT_TOPIC\nfrom ._message import GuidanceMessage\n\nlogger = logging.getLogger(__name__)\n\nWILDCARD_PATTERN = r\".*\"\n\n\nclass TopicExchange:\n    \"\"\"Queue-less topic exchange for routing messages.\n\n    This is not as comprehensive as a full distributed topic exchange.\n    It is specific to a single process, with no queues and less generalized routing keys.\n    \"\"\"\n\n    def __init__(self):\n        \"\"\"Initializes.\"\"\"\n        self._observers = defaultdict(list)\n\n    def subscribe(self, callback: Callable[[GuidanceMessage], None], topic_pat: str = WILDCARD_PATTERN) -> None:\n        \"\"\"Subscribes to incoming messages.\n\n        Args:\n            callback: Callback to handle incoming messages.\n            topic_pat: Topic to notify.\n        \"\"\"\n        logger.debug(f\"EXCHANGE:pre_subscribe:{self._observers[topic_pat]}\")\n        self._observers[topic_pat].append(callback)\n        logger.debug(f\"EXCHANGE:post_subscribe:{self._observers[topic_pat]}\")\n\n    def unsubscribe(self, callback: Callable[[GuidanceMessage], None], topic_pat: str = WILDCARD_PATTERN) -> None:\n        \"\"\"Unsubscribes from incoming messages.\n\n        Args:\n            callback: Callback to remove.\n            topic_pat: Topic pattern.\n        \"\"\"\n        logger.debug(f\"EXCHANGE:pre_unsubscribe:{self._observers[topic_pat]}\")\n        try:\n            self._observers[topic_pat].remove(callback)\n        except ValueError as _:\n            logger.warning(f\"EXCHANGE:cb at '{topic_pat}' already removed.\")\n        logger.debug(f\"EXCHANGE:post_unsubscribe:{self._observers[topic_pat]}\")\n\n        if len(self._observers[topic_pat]) == 0:\n            logger.debug(f\"EXCHANGE:delete_entry:{topic_pat}\")\n            del self._observers[topic_pat]\n\n    def publish(self, message: GuidanceMessage, topic: str = DEFAULT_TOPIC):\n        \"\"\"Notifies all subscribers to topic pattern of an incoming message.\n\n        Args:\n            message: Incoming message.\n            topic: Topics to notify.\n        \"\"\"\n        # logger.debug(f\"EXCHANGE:publish:{message}\")\n        for obs_topic_pat, observers in self._observers.items():\n            if re.match(obs_topic_pat, topic):\n                for observer in observers:\n                    observer(message)\n\n\n__all__ = [\"TopicExchange\"]\n"
  },
  {
    "path": "guidance/visual/_jupyter.py",
    "content": "\"\"\"Jupyter specific utilities.\"\"\"\n\nimport logging\nfrom typing import Any, Callable\nfrom uuid import uuid4\n\ntry:\n    from IPython import get_ipython\nexcept ImportError:\n    pass\n\nlogger = logging.getLogger(__name__)\n\nIPythonCallback = Callable[[Any], None]\n\n\ndef ipy_handle_event_once(cb: IPythonCallback, event_name: str) -> tuple[IPythonCallback | None, str]:\n    ipy = get_ipython()\n    cell_session_id = str(uuid4())\n\n    if ipy is None:\n        return None, \"\"\n\n    def cb_closure(msg):\n        cb(info=msg)\n        ipy.events.unregister(event_name, cb_closure)\n\n    ipy.events.register(event_name, cb_closure)\n\n    return cb_closure, cell_session_id\n"
  },
  {
    "path": "guidance/visual/_message.py",
    "content": "\"\"\"Messages that used between server (usually Jupyter Python kernel) and client.\n\nMessages are required to be added to the model registry for serialization.\n\"\"\"\n\nfrom itertools import count\nfrom typing import Annotated, ClassVar, Union\n\nfrom pydantic import BaseModel, Discriminator, Field, Tag, TypeAdapter, computed_field, model_validator\n\nfrom ..trace import NodeAttr\n\n\nclass GuidanceMessage(BaseModel):\n    \"\"\"Message sent within Guidance layer.\"\"\"\n\n    message_id: int = Field(default_factory=count().__next__)\n\n    _subclasses: ClassVar[set[type[\"GuidanceMessage\"]]] = set()\n\n    def __init_subclass__(cls, **kwargs):\n        super().__init_subclass__(**kwargs)\n        cls._subclasses.add(cls)\n\n    @computed_field  # type: ignore[prop-decorator]\n    @property\n    def class_name(self) -> str:\n        \"\"\"Class name of the message.\"\"\"\n        return self.__class__.__name__\n\n    @model_validator(mode=\"before\")\n    def validate_class_name(cls, data):\n        if isinstance(data, dict):\n            if \"class_name\" in data and data[\"class_name\"] != cls.__name__:\n                raise ValueError(f\"mismatched class name: {data['class_name']}, expected: {cls.__name__}\")\n        return data\n\n    @classmethod\n    def as_discriminated_union(cls) -> type[\"GuidanceMessage\"]:\n        return Annotated[\n            Union[tuple(Annotated[tp, Tag(tp.__name__)] for tp in cls._subclasses)],  # noqa: UP007\n            Discriminator(\n                lambda x: x[\"class_name\"] if isinstance(x, dict) else x.class_name,\n            ),\n        ]  # type: ignore[return-value]\n\n\nclass TraceMessage(GuidanceMessage):\n    \"\"\"Update on a trace node.\"\"\"\n\n    trace_id: int\n    parent_trace_id: int | None = None\n    node_attr: NodeAttr.as_discriminated_union() | None = None  # type: ignore\n\n\nclass MetricMessage(GuidanceMessage):\n    \"\"\"Metric that has been emitted.\"\"\"\n\n    name: str\n    value: float | str | list[float] | list[str] = Field(union_mode=\"left_to_right\")\n    scalar: bool = True\n\n\nclass ExecutionStartedMessage(GuidanceMessage):\n    \"\"\"Fired when renderer has started trace messages.\"\"\"\n\n\nclass ExecutionCompletedMessage(GuidanceMessage):\n    \"\"\"Fired when renderer has completed trace messages.\n\n    This functions as the last message sent to client.\n    \"\"\"\n\n    last_trace_id: int | None = None\n    is_err: bool = False\n\n\nclass ResetDisplayMessage(GuidanceMessage):\n    \"\"\"Instructs client to reset the display, removing all output.\"\"\"\n\n    pass\n\n\nclass ClientReadyMessage(GuidanceMessage):\n    \"\"\"Fired when client is ready to receive messages.\"\"\"\n\n    pass\n\n\nclass ClientReadyAckMessage(GuidanceMessage):\n    \"\"\"Fired when server acknowledges client readiness.\"\"\"\n\n    pass\n\n\nclass OutputRequestMessage(GuidanceMessage):\n    \"\"\"Fired when client requests tokens from server.\"\"\"\n\n    identifier: str = \"\"\n\n\nclass OutputRequestAckMessage(GuidanceMessage):\n    \"\"\"Fired when server acknowledges request.\"\"\"\n\n    pass\n\n\ndef serialize_message(message: GuidanceMessage) -> str:\n    \"\"\"Serializes guidance message.\n\n    Args:\n        message: Message to be serialized.\n\n    Returns:\n        Serialized message in JSON format.\n    \"\"\"\n    return message.model_dump_json()\n\n\ndef deserialize_message(data: str) -> GuidanceMessage:\n    \"\"\"Deserializes string into a guidance message.\n\n    Args:\n        data: JSON string to be deserialized.\n\n    Returns:\n        Guidance message.\n    \"\"\"\n    return TypeAdapter(GuidanceMessage.as_discriminated_union()).validate_json(data)\n"
  },
  {
    "path": "guidance/visual/_renderer.py",
    "content": "\"\"\"Renderer is responsible for displaying output.\n\nOur main focus is on jupyter notebooks and later terminal.\n\"\"\"\n# NOTE(nopdive): Testing this notebook related components is tricky. Should figure this out at some point.\n\nimport asyncio\nimport logging\nimport traceback\nfrom asyncio import Queue\nfrom functools import lru_cache, partial\nfrom importlib.util import find_spec\nfrom typing import TYPE_CHECKING\nfrom warnings import warn\nfrom weakref import ReferenceType, WeakKeyDictionary, WeakValueDictionary, finalize, ref\n\nfrom .._topics import DEFAULT_TOPIC, VISUAL_TOPIC\nfrom .._utils import log_cleanup\nfrom ..trace import TraceHandler\nfrom ..visual import (\n    ClientReadyMessage,\n    GuidanceMessage,\n    ResetDisplayMessage,\n    TraceMessage,\n)\nfrom . import MetricMessage\nfrom ._environment import Environment\nfrom ._jupyter import ipy_handle_event_once\nfrom ._message import (\n    ClientReadyAckMessage,\n    ExecutionCompletedMessage,\n    ExecutionStartedMessage,\n    OutputRequestAckMessage,\n    OutputRequestMessage,\n    deserialize_message,\n    serialize_message,\n)\n\ntry:\n    from IPython.display import display\n\n    ipython_imported = True\nexcept ImportError:\n    ipython_imported = False\n    display = None\n\n\nstitch_installed = find_spec(\"stitch\") is not None\n\nif TYPE_CHECKING:\n    from stitch import StitchWidget\n\nlogger = logging.getLogger(__name__)\n\n\n# Uncomment the following lines to enable file logging\n# import datetime\n#\n# log_filename = f\"widget_debug_{datetime.datetime.now().strftime('%H%M%S')}.log\"\n# file_handler = logging.FileHandler(log_filename)\n# file_handler.setLevel(logging.DEBUG)\n# formatter = logging.Formatter(\"%(asctime)s.%(msecs)03d - %(name)s - %(levelname)s - %(message)s\", datefmt=\"%H:%M:%S\")\n# file_handler.setFormatter(formatter)\n# logger.addHandler(file_handler)\n# logger.setLevel(logging.DEBUG)\n\n\nclass Renderer:\n    \"\"\"Renders guidance model to a visual medium.\"\"\"\n\n    def __init__(self):\n        \"\"\"Initializes.\"\"\"\n\n    def update(self, message: GuidanceMessage, topic: str = DEFAULT_TOPIC) -> None:\n        \"\"\"Updates renderer with incoming message.\n\n        Args:\n            message: Incoming message.\n            topic: Topic to update.\n        \"\"\"\n        raise NotImplementedError(\"Update not implemented.\")\n\n\n@lru_cache(maxsize=1)\ndef _get_src_doc_template() -> str:\n    \"\"\"Returns the source document template for the stitch widget.\"\"\"\n    import importlib.resources as resources\n\n    import guidance\n\n    path = resources.files(guidance) / \"resources\" / \"graphpaper-inline.html\"\n    with path.open(\"r\", encoding=\"utf-8\") as f:\n        return f.read()\n\n\ndef _create_stitch_widget() -> \"StitchWidget\":\n    from stitch import StitchWidget\n\n    w = StitchWidget()\n    w.initial_width = \"100%\"\n    w.initial_height = \"auto\"\n    w.srcdoc = _get_src_doc_template()\n    finalize(w, log_cleanup, f\"stitch({id(w)})\")\n\n    return w\n\n\ndef _put_nowait_queue(queue: Queue, val: object) -> None:\n    from ..registry import get_bg_async\n\n    get_bg_async().call_soon_threadsafe(queue.put_nowait, val)\n\n\ndef _cleanup(recv_queue: Queue | None, send_queue: Queue | None, log_msg: str, exchange_cb) -> None:\n    from ..registry import get_exchange\n\n    log_cleanup(log_msg)\n    if send_queue is not None:\n        _put_nowait_queue(send_queue, (None, None))\n    if recv_queue is not None:\n        _put_nowait_queue(recv_queue, (None, None))\n\n    get_exchange().unsubscribe(exchange_cb)\n\n\nasync def _create_queue() -> Queue:\n    # This will run in the visual thread.\n    return Queue()\n\n\ndef _on_stitch_clientmsg(recv_queue_weakref: ReferenceType[\"Queue\"], identifier: str, change: dict) -> None:\n    # NOTE(nopdive): Widget callbacks do not print to stdout/stderr nor module log.\n    queue = recv_queue_weakref()\n    if queue is not None:\n        _put_nowait_queue(queue, (change[\"new\"], identifier))\n\n\ndef _on_cell_completion(renderer_weakref: ReferenceType[\"JupyterWidgetRenderer\"], info) -> None:\n    logger.debug(\"CELL:executed\")\n\n    try:\n        renderer = renderer_weakref()\n        if renderer is None:\n            return\n\n        widget = renderer.widgets[renderer.last_widget_key]\n        last_trace_id = renderer.widget_to_trace_id[widget]\n        message = ExecutionCompletedMessage(\n            last_trace_id=last_trace_id,\n            is_err=info.error_in_exec is not None,\n        )\n        renderer.update(message)\n    except Exception:  # noqa: BLE001\n        logger.error(f\"CELL_COMPLETE:{traceback.format_exc()}\")\n\n\nasync def _handle_recv_messages(\n    renderer_weakref: ReferenceType[\"JupyterWidgetRenderer\"], queue_weakref: ReferenceType[\"Queue\"]\n) -> None:\n    logger.debug(\"RECV:init\")\n    from ..registry import get_exchange\n\n    while True:\n        try:\n            queue = queue_weakref()\n            if queue is None:\n                break\n            value, identifier = await queue.get()\n            # logger.debug(f\"RECV:raw:{value}\")\n\n            if value is None:\n                logger.debug(\"RECV:closing\")\n                break\n\n            message = deserialize_message(value)\n            # logger.debug(f\"RECV:msg:{message}\")\n\n            renderer = renderer_weakref()\n            if renderer is None:\n                logger.debug(\"RECV:renderer early clean\")\n                break\n\n            if isinstance(message, OutputRequestMessage):\n                # Add identifier to message\n                message.identifier = identifier\n                logger.debug(f\"RECV:outputrequest({identifier})\")\n\n            get_exchange().publish(message, VISUAL_TOPIC)\n\n            if isinstance(message, ClientReadyMessage):\n                logger.debug(f\"RECV:clientready({identifier})\")\n                get_exchange().publish(ClientReadyAckMessage(), VISUAL_TOPIC)\n\n            renderer.recv_queue.task_done()\n        except Exception as _:  # noqa: BLE001\n            logger.error(f\"RECV:err:{traceback.format_exc()}\")\n\n\nasync def _handle_send_messages(\n    renderer_weakref: ReferenceType[\"JupyterWidgetRenderer\"], queue_weakref: ReferenceType[\"Queue\"]\n) -> None:\n    logger.debug(\"SEND:init\")\n    # NOTE(nopdive): Waiting on client cb does not work, client messages received on cell completion.\n    #                Currently, we do a replay of messages on completion for client if client\n    #                first receives non-zero message identifier.\n\n    # What if we only used 1% of our brain?\n    await asyncio.sleep(200 / 1000.0)\n    logger.debug(\"SEND:ready\")\n\n    while True:\n        try:\n            queue = queue_weakref()\n            if queue is None:\n                break\n            message, identifier = await queue.get()\n            # logger.debug(f\"SEND:msg:{message}\")\n\n            if message is None:\n                logger.debug(\"SEND:closing\")\n                break\n\n            message_json = serialize_message(message)\n            # logger.debug(f\"SEND:json:{message_json}\")\n\n            renderer = renderer_weakref()\n            if renderer is None:\n                break\n            if isinstance(renderer, JupyterWidgetRenderer):\n                widget_key = renderer.last_widget_key if identifier is None else identifier\n                if renderer.widgets.get(widget_key, None) is not None:\n                    # NOTE(nopdive): This at random times, appears to fire two changes instead of one change event.\n                    renderer.widgets[widget_key].kernelmsg = message_json\n            else:\n                logger.debug(\"SEND:jupyter:send but no widget\")\n            renderer.send_queue.task_done()\n        except Exception as _:  # noqa: BLE001\n            logger.error(f\"SEND:err:{traceback.format_exc()}\")\n\n\ndef _trace_path_to_messages(trace_id: int) -> list[\"TraceMessage\"]:\n    \"\"\"Convert trace path from root to given trace_id into TraceMessage objects.\n\n    Args:\n        trace_id: The trace ID to get the path for.\n\n    Returns:\n        List of TraceMessage objects representing the path from root to the given trace_id.\n\n    \"\"\"\n    from ..registry import get_trace_handler\n\n    trace_handler = get_trace_handler()\n    trace_path = trace_handler.id_node_map[trace_id].path()\n    messages = []\n\n    for trace_node in trace_path:\n        node_trace_id = trace_handler.node_id_map[trace_node]\n        parent_trace_id = None\n        if trace_node.parent is not None:\n            parent_trace_id = trace_handler.node_id_map[trace_node.parent]\n\n        for input_attr in trace_node.input:\n            input_message = TraceMessage(trace_id=node_trace_id, parent_trace_id=parent_trace_id, node_attr=input_attr)\n            messages.append(input_message)\n\n        for output_attr in trace_node.output:\n            output_message = TraceMessage(\n                trace_id=node_trace_id, parent_trace_id=parent_trace_id, node_attr=output_attr\n            )\n            messages.append(output_message)\n\n    return messages\n\n\nclass JupyterWidgetRenderer(Renderer):\n    \"\"\"Jupyter widget renderer that is implemented via stitch package.\"\"\"\n\n    def __init__(self, trace_handler: TraceHandler) -> None:\n        \"\"\"Initializes.\n\n        Args:\n            trace_handler: Trace handler of an engine.\n        \"\"\"\n        from ..registry import get_bg_async, get_exchange\n\n        super().__init__()\n        self.widget_to_trace_id: WeakKeyDictionary[\"StitchWidget\", int] = WeakKeyDictionary()\n        self.widget_messages: WeakKeyDictionary[\"StitchWidget\", list[GuidanceMessage]] = WeakKeyDictionary()\n        self.widgets: WeakValueDictionary[str, \"StitchWidget\"] = WeakValueDictionary()\n        self.last_widget_key = \"\"\n        self.last_widget: ReferenceType[\"StitchWidget\"] | None = None\n        self.last_trace_id: int | None = None\n        self._last_cell_session_id: str | None = None\n\n        self._trace_handler = trace_handler\n        self._completed = False\n        self._running = False\n\n        # Debug tracking\n        self._debug_enabled = False\n        self._debug_messages: list[GuidanceMessage] = []\n\n        # Create queue and wait for instantiation\n        self.send_queue: Queue = get_bg_async().run_async_coroutine(_create_queue()).result()\n        self.recv_queue: Queue = get_bg_async().run_async_coroutine(_create_queue()).result()\n\n        # Start send/recv message loops\n        recv_coroutine = _handle_recv_messages(ref(self), ref(self.recv_queue))\n        send_coroutine = _handle_send_messages(ref(self), ref(self.send_queue))\n        self._recv_task = get_bg_async().run_async_coroutine(get_bg_async().async_task(recv_coroutine)).result()\n        self._send_task = get_bg_async().run_async_coroutine(get_bg_async().async_task(send_coroutine)).result()\n\n        # Start recv on exchange\n        get_exchange().subscribe(self._on_exchange)\n        finalize(self, _cleanup, self.recv_queue, self.send_queue, f\"renderer({id(self)})\", self._on_exchange)\n\n    def _on_exchange(self, message: GuidanceMessage) -> None:\n        # if not isinstance(message, MetricMessage):  # NOTE(nopdive): Metrics spam at fixed intervals.\n        #     logger.debug(f\"RENDERER_ON_EXCHANGE:{message}\")\n\n        if isinstance(message, MetricMessage):\n            self.update(message)\n        elif isinstance(message, TraceMessage):\n            self.update(message)\n        elif isinstance(message, OutputRequestMessage):\n            self._replay(message)\n\n    def has_divergence(self, message: GuidanceMessage) -> tuple[bool, int]:\n        \"\"\"Checks if message has divergence with current path.\n\n        Args:\n            message: Incoming message.\n\n        Returns:\n            tuple of (has diverged, shared ancestor index). Index will be -1 if divergence and requires trace replay.\n        \"\"\"\n        if not isinstance(message, TraceMessage):\n            return False, -1\n\n        # If we diverge from the model path, truncate and reset\n        message_trace_node = self._trace_handler[message.trace_id]\n        widget_messages = self.widget_messages[self.last_widget()]\n\n        prev_trace_messages = [x for x in widget_messages if isinstance(x, TraceMessage)]\n        trace_messages_len = len(prev_trace_messages)\n        if trace_messages_len == 0:\n            return False, -1\n        elif trace_messages_len == 1:\n            if isinstance(widget_messages[0], TraceMessage):\n                try:\n                    last_trace_node = self._trace_handler[widget_messages[0].trace_id]\n                    if message_trace_node.parent == last_trace_node:\n                        return False, -1\n                    else:\n                        return True, 0\n                except KeyError:\n                    # Trace node was garbage collected, treat as divergence\n                    return True, 0\n            else:\n                return False, -1\n        else:\n            last_trace_message = prev_trace_messages[-1]\n            try:\n                last_trace_node = self._trace_handler[last_trace_message.trace_id]\n            except KeyError:\n                # Trace node was garbage collected, treat as divergence\n                return True, 0\n\n            message_trace_node_path = message_trace_node.path()\n            if last_trace_node not in message_trace_node_path:\n                logger.debug(f\"DIVERGENCE:curr:{message_trace_node}\")\n                logger.debug(f\"DIVERGENCE:prev:{last_trace_node}\")\n\n                # Truncate path that is no longer used by current trace node\n                ancestor_idx = -1\n                ancestors = set(message_trace_node.ancestors())\n                for idx, prev_message in enumerate(widget_messages):\n                    if isinstance(prev_message, TraceMessage):\n                        try:\n                            prev_trace_node = self._trace_handler[prev_message.trace_id]\n                            if prev_trace_node in ancestors:\n                                ancestor_idx = idx\n                        except KeyError:\n                            # Trace node was garbage collected, skip it\n                            continue\n                if ancestor_idx == -1:\n                    if message_trace_node.parent == last_trace_node.root():  # pragma: no cover\n                        ancestor_idx = 0\n                    else:\n                        logger.debug(\"DIVERGENCE:full reset (not in messages)\")\n                        ancestor_idx = -1\n\n                return True, ancestor_idx\n            else:\n                return False, -1\n\n    def _replay(self, message: OutputRequestMessage, topic=DEFAULT_TOPIC) -> None:\n        out_messages: list[GuidanceMessage] = []\n        logger.debug(f\"RENDERER:replay:{message}\")\n\n        widget = self.widgets.get(message.identifier, None)\n        if widget is None:\n            logger.debug(f\"RENDERER:widget({message.identifier}) already gc\")\n            return\n\n        widget_messages = self.widget_messages[widget]\n        out_messages.append(OutputRequestAckMessage())\n        out_messages.append(ResetDisplayMessage())\n        out_messages.extend(widget_messages)\n        widget_messages.clear()\n\n        for out_message in out_messages:\n            if isinstance(out_message, TraceMessage):\n                self.widget_to_trace_id[widget] = out_message.trace_id\n            widget_messages.append(out_message)\n            _put_nowait_queue(self.send_queue, (out_message, widget.model_id))\n\n    def update(self, message: GuidanceMessage, topic=DEFAULT_TOPIC) -> None:\n        out_messages: list[GuidanceMessage] = []\n\n        # Short-circuit for metrics\n        if isinstance(message, MetricMessage):\n            if not self._running:\n                return\n\n        # Create new widget if not already running (first display when a cell starts execution)\n        if not self._running and isinstance(message, TraceMessage):\n            # Execution started\n            started_msg = ExecutionStartedMessage()\n            out_messages.append(started_msg)\n            out_messages.append(MetricMessage(name=\"status\", value=\"Running\"))\n\n            logger.debug(\"RENDERER:new widget needed\")\n            _, last_cell_session_id = ipy_handle_event_once(partial(_on_cell_completion, ref(self)), \"post_run_cell\")\n            widget = _create_stitch_widget()\n            widget_key = widget.model_id\n            widget_messages = []\n            if self.last_widget is not None:\n                last_widget = self.last_widget()\n                if last_widget is not None:\n                    widget_messages[:] = self.widget_messages[last_widget][:]\n            self.widgets[widget_key] = widget\n            self.widget_messages[widget] = widget_messages\n            self.widget_to_trace_id[widget] = message.trace_id\n            self.last_widget_key = widget_key\n            self.last_widget = ref(widget)\n\n            on_clientmsg = partial(_on_stitch_clientmsg, ref(self.recv_queue), widget_key)\n            widget.observe(on_clientmsg, names=\"clientmsg\")\n\n            # Redraw\n            display(widget)\n            logger.debug(\"RENDERER:widget displayed\")\n\n            self._last_cell_session_id = last_cell_session_id\n            self._running = True\n            self._completed = False\n\n            # NOTE(nopdive): Fire off execution immediately to renderer subscribers. Review later.\n            _put_nowait_queue(self.recv_queue, (serialize_message(started_msg), self.last_widget_key))\n\n        widget_messages = self.widget_messages[self.last_widget()]\n\n        # This is fired when the cell completes execution\n        if isinstance(message, ExecutionCompletedMessage):\n            # Execution completed\n            logger.debug(\"RENDERER:execution end\")\n            self._completed = True\n            self._running = False\n\n            # Replay all messages on completion\n            out_messages.append(ResetDisplayMessage())\n            out_messages[len(out_messages) :] = widget_messages[:]\n            widget_messages.clear()\n\n            if message.is_err:\n                out_messages.append(MetricMessage(name=\"status\", value=\"Error\"))\n            else:\n                out_messages.append(MetricMessage(name=\"status\", value=\"Done\"))\n\n        # Check if message has diverged from prev messages\n        diverged, shared_ancestor_idx = self.has_divergence(message)\n        if diverged:\n            logger.debug(f\"RENDERER:diverged, shared ancestor idx: {shared_ancestor_idx}\")\n            out_messages.append(ResetDisplayMessage())\n            if shared_ancestor_idx >= 0:\n                out_messages[len(out_messages) :] = widget_messages[: shared_ancestor_idx + 1]\n                widget_messages.clear()\n            else:\n                logger.debug(\"RENDERER:diverged, but no shared ancestor, replay\")\n                # Reconstruct trace messages and replay from root\n                trace_messages = _trace_path_to_messages(message.trace_id)\n                out_messages.extend(trace_messages)\n                widget_messages.clear()\n\n        # Append current message to outgoing\n        out_messages.append(message)\n\n        # Send outgoing messages to client\n        widget = self.widgets[self.last_widget_key]\n        for out_message in out_messages:\n            if isinstance(out_message, TraceMessage):\n                self.widget_to_trace_id[widget] = out_message.trace_id\n            widget_messages.append(out_message)\n            _put_nowait_queue(self.send_queue, (out_message, self.last_widget_key))\n\n            # Track for debug if enabled\n            if self._debug_enabled:\n                self._debug_messages.append(out_message)\n\n    # TODO(nopdive): I'm not sure how we should debug here with the new changes, Nick to review.\n    def enable_debug(self) -> None:\n        \"\"\"Enable debug mode in the widget to capture message history.\"\"\"\n\n        self._debug_enabled = True\n        self._debug_messages = []  # Clear previous messages\n\n    def clear_debug_data(self) -> None:\n        \"\"\"Clear captured debug messages.\"\"\"\n        self._debug_messages = []\n        logger.info(\"Debug messages cleared\")\n\n    def get_debug_data(self) -> str | None:\n        \"\"\"Get debug data as a JSON string.\n\n        Returns:\n            JSON string containing debug data, or None if no data available\n        \"\"\"\n        import datetime\n        import json\n\n        if not self._debug_enabled:\n            logger.warning(\"Debug mode not enabled - call enable_debug() first\")\n            return None\n\n        if not self._debug_messages:\n            logger.warning(\"No debug messages captured yet\")\n            return None\n\n        def make_json_serializable(obj):\n            \"\"\"Convert objects to JSON serializable format.\"\"\"\n            if isinstance(obj, bytes):\n                # Convert bytes to base64 string for JSON serialization\n                import base64\n\n                return base64.b64encode(obj).decode(\"utf-8\")\n            elif isinstance(obj, dict):\n                return {k: make_json_serializable(v) for k, v in obj.items()}\n            elif isinstance(obj, list):\n                return [make_json_serializable(item) for item in obj]\n            elif hasattr(obj, \"model_dump\"):\n                # Pydantic models\n                return make_json_serializable(obj.model_dump())\n            else:\n                return obj\n\n        debug_data = {\n            \"timestamp\": datetime.datetime.now().isoformat(),\n            \"messageCount\": len(self._debug_messages),\n            \"messages\": [\n                make_json_serializable({\"message_id\": msg.message_id, \"class_name\": msg.class_name, **msg.model_dump()})\n                for msg in self._debug_messages\n            ],\n        }\n\n        return json.dumps(debug_data, indent=2)\n\n\nclass DoNothingRenderer(Renderer):\n    \"\"\"It does nothing.\"\"\"\n\n    def __init__(self, trace_handler: TraceHandler) -> None:\n        \"\"\"Initializes.\n\n        Args:\n            trace_handler: Trace handler of an engine.\n        \"\"\"\n        self._trace_handler = trace_handler\n        super().__init__()\n\n    def update(self, message: GuidanceMessage, topic: str = DEFAULT_TOPIC) -> None:\n        pass\n\n\nclass AutoRenderer(Renderer):\n    \"\"\"Automatically detects which renderer to use based on environment.\"\"\"\n\n    def __init__(self, trace_handler: TraceHandler):\n        \"\"\"Initializes.\n\n        Args:\n            trace_handler: Trace handler of an engine.\n        \"\"\"\n        self._env = Environment()\n\n        self._renderer: Renderer\n        if self._env.is_notebook():\n            if stitch_installed:\n                self._renderer = JupyterWidgetRenderer(trace_handler=trace_handler)\n            else:\n                self._renderer = DoNothingRenderer(trace_handler=trace_handler)\n        elif self._env.is_terminal():\n            # TODO(nopdive): When IPython events are figured out (cell completion)\n            #                hook up terminal interface separate to non-interactive\n            #                shell.\n            self._renderer = DoNothingRenderer(trace_handler=trace_handler)\n        else:  # pragma: no cover\n            logger.error(\"Env detection has failed. This is a bug.\")\n            warn(\"Env detection has failed. No renderer will be provided.\", stacklevel=2)\n            self._renderer = DoNothingRenderer(trace_handler=trace_handler)\n\n        super().__init__()\n\n    def update(self, message: GuidanceMessage, topic: str = DEFAULT_TOPIC) -> None:\n        self._renderer.update(message, topic=topic)\n\n    def renderer_type(self) -> type:\n        \"\"\"Type of renderer that has been selected based on environment.\n\n        Returns:\n            Type of selected renderer.\n        \"\"\"\n        return type(self._renderer)\n"
  },
  {
    "path": "guidance/visual/_trace.py",
    "content": "\"\"\"Visualization related to trace.\"\"\"\n\nimport html\nimport json\n\nfrom ..trace import (\n    ImageOutput,\n    RoleCloserInput,\n    RoleOpenerInput,\n    TextOutput,\n    TokenOutput,\n    TraceHandler,\n    TraceNode,\n)\n\n\ndef trace_node_to_html(node: TraceNode, prettify_roles=False) -> str:\n    \"\"\"Represents trace path as html string.\n\n    Args:\n        node: Trace node that designates the end of a trace path for HTML output.\n        prettify_roles: Enables prettier formatting for roles.\n\n    Returns:\n        HTML string of trace path as html.\n    \"\"\"\n    buffer = []\n    node_path = list(node.path())\n    active_role: TraceNode | None = None\n\n    for node in node_path:\n        # Check if any input is a role opener or closer\n        for input_attr in node.input:\n            if isinstance(input_attr, RoleOpenerInput):\n                active_role = node\n                break\n            elif isinstance(input_attr, RoleCloserInput):\n                active_role = node\n                break\n        for output_attr in node.output:\n            if isinstance(output_attr, TextOutput):\n                if active_role is not None:\n                    # Find the first RoleOpenerInput in the active role's input list\n                    role_opener_input = next(\n                        (inp for inp in active_role.input if isinstance(inp, RoleOpenerInput)), None\n                    )\n                    if (\n                        prettify_roles\n                        and role_opener_input is not None\n                        and (role_name := role_opener_input.name) is not None\n                    ):\n                        fmt = f\"<div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>{role_name.lower()}</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>\"\n                        buffer.append(fmt)\n                    if not prettify_roles:\n                        buffer.append(\"<span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>\")\n\n                if not (active_role and prettify_roles):\n                    attr = output_attr\n                    latency = f\"{attr.latency_ms:.2f}\"\n                    chunk_text = attr.value\n\n                if not isinstance(attr, TokenOutput):\n                    if attr.is_generated:\n                        fmt = f\"<span style='background-color: rgba({0}, {255}, {0}, 0.15); border-radius: 3ps;' title='Chunk: {chunk_text}\\nlatency_ms: {latency}'>{html.escape(chunk_text)}</span>\"\n                    elif attr.is_force_forwarded:\n                        fmt = f\"<span style='background-color: rgba({0}, {0}, {255}, 0.15); border-radius: 3ps;' title='Chunk: {chunk_text}\\nlatency_ms: {latency}'>{html.escape(chunk_text)}</span>\"\n                    else:\n                        fmt = f\"<span style='background-color: rgba({255}, {255}, {255}, 0.15); border-radius: 3ps;' title='Chunk: {chunk_text}\\nlatency_ms: {latency}'>{html.escape(chunk_text)}</span>\"\n                else:\n                    token = attr.token\n                    token_str = token.token\n                    # assert token_str == chunk_text\n\n                    prob = token.prob  # TODO: what if nan?\n                    top_k: dict[str, str] = {}\n                    # find the correct token\n                    for _token in attr.top_k or []:\n                        top_k[f\"{_token.token}\"] = f\"{_token.prob} - Masked: {_token.masked}\"\n                    top_k_repr = json.dumps(top_k, indent=2)\n\n                    if attr.is_generated:\n                        fmt = f\"<span style='background-color: rgba({0}, {127 + int(127 * prob)}, {0}, 0.15); border-radius: 3ps;' title='Token: \\\"{token_str}\\\" : {prob}\\nTop-k: {top_k_repr}\\nlatency_ms: {latency}'>{html.escape(token_str)}</span>\"\n                    elif attr.is_force_forwarded:\n                        fmt = f\"<span style='background-color: rgba({0}, {0}, {127 + int(127 * prob)}, 0.15); border-radius: 3ps;' title='Token: \\\"{token_str}\\\" : {prob}\\nTop-k: {top_k_repr}\\nlatency_ms: {latency}'>{html.escape(token_str)}</span>\"\n                    else:\n                        fmt = f\"<span style='background-color: rgba({255}, {255}, {255}, 0.15); border-radius: 3ps;' title='Token: \\\"{token_str}\\\" : {prob}\\nTop-k: {top_k_repr}'>{html.escape(token_str)}</span>\"\n\n                buffer.append(fmt)\n\n            if active_role is not None:\n                if not prettify_roles:\n                    buffer.append(\"</span>\")\n                # Check if any input in active role is a RoleCloserInput\n                has_role_closer = any(isinstance(inp, RoleCloserInput) for inp in active_role.input)\n                if has_role_closer and prettify_roles:\n                    buffer.append(\"</div></div>\")\n                active_role = None\n            elif isinstance(output_attr, ImageOutput):\n                buffer.append(\n                    f'<img src=\"data:image/png;base64,{output_attr.value.decode()}\" style=\"max-width\" 400px; vertical-align: middle; margin: 4px;\">'\n                )\n\n    buffer.insert(\n        0,\n        \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>\",\n    )\n    buffer.append(\"</pre>\")\n    return \"\".join(buffer)\n\n\ndef trace_node_to_str(node: TraceNode) -> str:\n    \"\"\"Visualize output attributes of a trace node up to the root.\n\n    Users should not be accessing this function. For debugging purposes.\n\n    Args:\n        node: The trace node to visualize.\n    Returns:\n        Output as string.\n    \"\"\"\n    buffer = []\n    for subnode in node.path():\n        for output_attr in subnode.output:\n            if isinstance(output_attr, TextOutput):\n                buffer.append(str(output_attr))\n    return \"\".join(buffer)\n\n\ndef display_trace_tree(trace_handler: TraceHandler) -> None:\n    \"\"\"Visualize tree of a trace node going down to all its leaves.\n\n    Users should not normally be accessing this function. For debugging purposes.\n\n    Args:\n        trace_handler: Trace handler needed to pull user-defined identifiers of trace nodes.\n    \"\"\"\n    from anytree import Node, RenderTree  # type: ignore[import-untyped]\n\n    root = trace_handler.root()\n    trace_viz_map: dict[TraceNode, Node] = {}\n    for node in root.traverse(bfs=False):\n        viz_parent = trace_viz_map.get(node.parent, None)\n        viz_node = Node(f\"{trace_handler.node_id_map[node]}:{node!r}\", parent=viz_parent)\n        trace_viz_map[node] = viz_node\n    viz_root = trace_viz_map[root]\n\n    for pre, _fill, node in RenderTree(viz_root):\n        tree_str = \"%s%s\" % (pre, node.name)\n        print(tree_str)\n"
  },
  {
    "path": "notebooks/anachronism.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Anachronism example\\n\",\n    \"\\n\",\n    \"This example takes a <a href=\\\"https://github.com/google/BIG-bench/tree/main/bigbench/benchmark_tasks/anachronisms\\\">simple task from BigBench</a>, where the goal is to identify whether a given sentence contains an anachronism (i.e. states something that is impossibile due to time periods).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Loaded 230 examples\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import requests\\n\",\n    \"import json\\n\",\n    \"dataset_url = \\\"https://raw.githubusercontent.com/google/BIG-bench/main/bigbench/benchmark_tasks/anachronisms/task.json\\\"\\n\",\n    \"response = requests.get(dataset_url)\\n\",\n    \"if response.status_code == 200:\\n\",\n    \"    task_data = response.json()\\n\",\n    \"    \\n\",\n    \"    # Extract examples\\n\",\n    \"    examples = task_data.get('examples', [])\\n\",\n    \"    \\n\",\n    \"    # Process the data\\n\",\n    \"    inputs = [ex['input'] for ex in examples]\\n\",\n    \"    labels = [ex['target_scores'] for ex in examples]\\n\",\n    \"    \\n\",\n    \"    print(f\\\"Loaded {len(inputs)} examples\\\")\\n\",\n    \"else:\\n\",\n    \"    print(f\\\"Error during download: {response.status_code}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, let us load a model into `guidance`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import guidance\\n\",\n    \"from huggingface_hub import hf_hub_download\\n\",\n    \"\\n\",\n    \"lm = guidance.models.LlamaCpp(\\n\",\n    \"    hf_hub_download(\\n\",\n    \"        repo_id=\\\"bartowski/Llama-3.2-3B-Instruct-GGUF\\\",\\n\",\n    \"        filename=\\\"Llama-3.2-3B-Instruct-Q6_K_L.gguf\\\",\\n\",\n    \"    ),\\n\",\n    \"    verbose=True,\\n\",\n    \"    n_ctx=4096,\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can now define an `anachronism_query()` function.\\n\",\n    \"This is a function, decorated with `@guidance` and which contains guidance instructions.\\n\",\n    \"The first argument to a function decorated like this is always a language model, and the function returns the same model after appending whatever strings and `guidance` instructions are required.\\n\",\n    \"\\n\",\n    \"In this case, we're going to take some few-shot examples in addition to the desired query, and build them into a prompt.\\n\",\n    \"We then provide `guidance` commands to step through some chain-of-thought (CoT) reasoning.\\n\",\n    \"Notice how we use the `stop` keyword to limit the generation before the next stage in the CoT (the model may go off the rails and generate more than we want in the first 'entity' generation call otherwise).\\n\",\n    \"In the final step, we use `guidance.select` to force the model to generate a 'Yes' or 'No' answer:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def anachronism_query(llm, query, examples):\\n\",\n    \"    prompt_string = \\\"\\\"\\\"Given a sentence tell me whether it contains an anachronism (i.e. whether it could have happened or\\n\",\n    \"not based on the time periods associated with the entities).\\n\",\n    \"\\n\",\n    \"Here are some examples:\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"    for ex in examples:\\n\",\n    \"        prompt_string += f\\\"Sentence: { ex['input'] }\\\" + \\\"\\\\n\\\"\\n\",\n    \"        prompt_string += \\\"Entities and dates:\\\\n\\\"\\n\",\n    \"        for en in ex['entities']:\\n\",\n    \"            prompt_string += f\\\"{en['entity']} : {en['time']}\\\" + \\\"\\\\n\\\"\\n\",\n    \"        prompt_string += f\\\"Reasoning: {ex['reasoning']}\\\" + \\\"\\\\n\\\"\\n\",\n    \"        prompt_string += f\\\"Anachronism: {ex['answer']}\\\" + \\\"\\\\n\\\"\\n\",\n    \"\\n\",\n    \"    llm += f'''{prompt_string}\\n\",\n    \"Now determine whether the following is an anachronism:\\n\",\n    \"    \\n\",\n    \"Sentence: { query }\\n\",\n    \"Entities and dates:\\n\",\n    \"{ guidance.gen(name=\\\"entities\\\", max_tokens=100, stop=\\\"Reason\\\") }'''\\n\",\n    \"    llm += \\\"Reasoning :\\\"\\n\",\n    \"    llm += guidance.gen(name=\\\"reason\\\", max_tokens=100, stop=\\\"\\\\n\\\")\\n\",\n    \"    llm += f'''\\\\nAnachronism: { guidance.select([\\\"Yes\\\", \\\"No\\\"], name=\\\"answer\\\") }'''\\n\",\n    \"    return llm\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can now invoke our function with a query string and some examples.\\n\",\n    \"Again, note how when we call `anachronism_query()` we _don't_ pass in the language model itself; the `@guidance` decorator takes care of that.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"248f4683c07b4d2483a24334004bdedf\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"entities:\\n\",\n      \"T-Rex : 65 million years ago\\n\",\n      \"I : present\\n\",\n      \"\\n\",\n      \"reasoning:  The T-Rex is extinct and could not have bitten my dog because it died before I was born.\\n\",\n      \"answer: Yes\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# define the few shot examples\\n\",\n    \"fewshot_examples = [\\n\",\n    \"    {'input': 'I wrote about shakespeare',\\n\",\n    \"    'entities': [{'entity': 'I', 'time': 'present'}, {'entity': 'Shakespeare', 'time': '16th century'}],\\n\",\n    \"    'reasoning': 'I can write about Shakespeare because he lived in the past with respect to me.',\\n\",\n    \"    'answer': 'No'},\\n\",\n    \"    {'input': 'Shakespeare wrote about me',\\n\",\n    \"    'entities': [{'entity': 'Shakespeare', 'time': '16th century'}, {'entity': 'I', 'time': 'present'}],\\n\",\n    \"    'reasoning': 'Shakespeare cannot have written about me, because he died before I was born',\\n\",\n    \"    'answer': 'Yes'}\\n\",\n    \"]\\n\",\n    \"\\n\",\n    \"# Invoke the model\\n\",\n    \"generate = lm + anachronism_query(\\\"The T-Rex bit my dog\\\", fewshot_examples)\\n\",\n    \"\\n\",\n    \"# Show the extracted generations\\n\",\n    \"print(\\\"entities:\\\\n{0}\\\".format(generate['entities']))\\n\",\n    \"print(f\\\"reasoning: {generate['reason']}\\\")\\n\",\n    \"print(f\\\"answer: {generate['answer']}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"For comparison purposes, we can also define a zero-shot function:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"b5a2afc4ce3d40728870e4e4ac833b69\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"answer: Yes\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def anachronism_query_zeroshot(llm, query):\\n\",\n    \"    llm += f'''Given a sentence tell me whether it contains an anachronism (i.e. whether it could have happened or\\n\",\n    \"not based on the time periods associated with the entities).\\n\",\n    \"\\n\",\n    \"Sentence: {query}\\n\",\n    \"Anachronism: { guidance.select([\\\"Yes\\\", \\\"No\\\"], name=\\\"answer\\\") }\\n\",\n    \"'''\\n\",\n    \"    return llm\\n\",\n    \"\\n\",\n    \"generate_zero = lm + anachronism_query_zeroshot(\\\"The T-Rex bit my dog\\\")\\n\",\n    \"\\n\",\n    \"# Show the extracted generations\\n\",\n    \"print(f\\\"answer: {generate_zero['answer']}\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Compute accuracy\\n\",\n    \"\\n\",\n    \"We compute accuracy on the validation set, and compare it to using the same two-shot examples above without the output structure, as well as to the best reported result <a href=\\\"https://github.com/google/BIG-bench/tree/main/bigbench/benchmark_tasks/anachronisms\\\">here</a>. We hope that a simple output structure will improve the accuracy of the results:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"7f989b15faf04a7999bfb0633f9c7dac\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"\\n\",\n    \"fews = []\\n\",\n    \"zero_shot = []\\n\",\n    \"count = 0\\n\",\n    \"for input, label in zip(inputs, labels):\\n\",\n    \"    # print(f\\\"Working on item {count}\\\")\\n\",\n    \"    f = lm + anachronism_query(input, fewshot_examples)\\n\",\n    \"    f = 'Yes' if 'Yes' in f['answer'] else 'No'\\n\",\n    \"    fews.append(f)\\n\",\n    \"    g = lm + anachronism_query_zeroshot(input)\\n\",\n    \"    g = 'Yes' if 'Yes' in g['answer'] else 'No'\\n\",\n    \"    zero_shot.append(g)\\n\",\n    \"    count += 1\\n\",\n    \"fews = np.array(fews)\\n\",\n    \"zero_shot = np.array(zero_shot)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, we can compute the accuracy for each of the approaches:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Few-shot Accuracy: 71.74%\\n\",\n      \"Zero-shot Accuracy: 66.96%\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# One-liner to extract correct answers\\n\",\n    \"correct_answers = [next(k for k, v in label.items() if v == 1) for label in labels]\\n\",\n    \"\\n\",\n    \"# Score\\n\",\n    \"few_shot_accuracy = sum(pred == correct for pred, correct in zip(fews, correct_answers)) / len(fews)\\n\",\n    \"print(f\\\"Few-shot Accuracy: {few_shot_accuracy:.2%}\\\")\\n\",\n    \"\\n\",\n    \"zero_shot_accuracy = sum(pred == correct for pred, correct in zip(zero_shot, correct_answers)) / len(zero_shot)\\n\",\n    \"print(f\\\"Zero-shot Accuracy: {zero_shot_accuracy:.2%}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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  \"widgets\": {\n   \"application/vnd.jupyter.widget-state+json\": {\n    \"state\": {\n     \"13f110d8ac8148b998243227edb1a183\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"248f4683c07b4d2483a24334004bdedf\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":413,\\\"last_trace_id\\\":220,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_13f110d8ac8148b998243227edb1a183\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"Given\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Given\\\",\\\"bytes\\\":\\\"R2l2ZW4=\\\",\\\"prob\\\":0.000040101487684296444,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.006844134069979191,\\\"masked\\\":true},{\\\"token\\\":\\\"#\\\",\\\"bytes\\\":\\\"Iw==\\\",\\\"prob\\\":0.006499555427581072,\\\"masked\\\":true},{\\\"token\\\":\\\"Question\\\",\\\"bytes\\\":\\\"UXVlc3Rpb24=\\\",\\\"prob\\\":0.002776537323370576,\\\"masked\\\":true},{\\\"token\\\":\\\"Tags\\\",\\\"bytes\\\":\\\"VGFncw==\\\",\\\"prob\\\":0.0023201724980026484,\\\"masked\\\":true},{\\\"token\\\":\\\"Title\\\",\\\"bytes\\\":\\\"VGl0bGU=\\\",\\\"prob\\\":0.0022196045611053705,\\\"masked\\\":true},{\\\"token\\\":\\\"Given\\\",\\\"bytes\\\":\\\"R2l2ZW4=\\\",\\\"prob\\\":0.000040101487684296444,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.29061198234558105,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.29061198234558105,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.21655474603176117,\\\"masked\\\":true},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.1854323446750641,\\\"masked\\\":true},{\\\"token\\\":\\\" two\\\",\\\"bytes\\\":\\\"IHR3bw==\\\",\\\"prob\\\":0.07619314640760422,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.0316026471555233,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":0.000591846473980695,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.11441338062286377,\\\"masked\\\":true},{\\\"token\\\":\\\" set\\\",\\\"bytes\\\":\\\"IHNldA==\\\",\\\"prob\\\":0.10654588788747787,\\\"masked\\\":true},{\\\"token\\\":\\\" positive\\\",\\\"bytes\\\":\\\"IHBvc2l0aXZl\\\",\\\"prob\\\":0.03234526515007019,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.03069021925330162,\\\"masked\\\":true},{\\\"token\\\":\\\" sequence\\\",\\\"bytes\\\":\\\"IHNlcXVlbmNl\\\",\\\"prob\\\":0.030435821041464806,\\\"masked\\\":true},{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":0.000591846473980695,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" tell\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" tell\\\",\\\"bytes\\\":\\\"IHRlbGw=\\\",\\\"prob\\\":0.000010183332051383331,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.38496866822242737,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.1385185569524765,\\\"masked\\\":true},{\\\"token\\\":\\\" like\\\",\\\"bytes\\\":\\\"IGxpa2U=\\\",\\\"prob\\\":0.05449669808149338,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.05098797380924225,\\\"masked\\\":true},{\\\"token\\\":\\\" containing\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5pbmc=\\\",\\\"prob\\\":0.04558170214295387,\\\"masked\\\":true},{\\\"token\\\":\\\" tell\\\",\\\"bytes\\\":\\\"IHRlbGw=\\\",\\\"prob\\\":0.000010183332051383331,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.4989318549633026,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.4989318549633026,\\\"masked\\\":false},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.20839552581310272,\\\"masked\\\":true},{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.12477758526802063,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.037270624190568924,\\\"masked\\\":true},{\\\"token\\\":\\\" us\\\",\\\"bytes\\\":\\\"IHVz\\\",\\\"prob\\\":0.035270798951387405,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.07100760191679001,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.4771539568901062,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.16575708985328674,\\\"masked\\\":true},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.07576633244752884,\\\"masked\\\":true},{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.07100760191679001,\\\"masked\\\":false},{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.07028643786907196,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.3990325629711151,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.40133386850357056,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.3990325629711151,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.051985885947942734,\\\"masked\\\":true},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.03695073351264,\\\"masked\\\":true},{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.01252048835158348,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" contains\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" contains\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5z\\\",\\\"prob\\\":0.1499876230955124,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.531642735004425,\\\"masked\\\":true},{\\\"token\\\":\\\" contains\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5z\\\",\\\"prob\\\":0.1499876230955124,\\\"masked\\\":false},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.12421562522649765,\\\"masked\\\":true},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.08676793426275253,\\\"masked\\\":true},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.034425340592861176,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.04263560101389885,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.24202445149421692,\\\"masked\\\":true},{\\\"token\\\":\\\" any\\\",\\\"bytes\\\":\\\"IGFueQ==\\\",\\\"prob\\\":0.21263772249221802,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.10281016677618027,\\\"masked\\\":true},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.04263560101389885,\\\"masked\\\":false},{\\\"token\\\":\\\" only\\\",\\\"bytes\\\":\\\"IG9ubHk=\\\",\\\"prob\\\":0.036685761064291,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.12993548810482025,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.12993548810482025,\\\"masked\\\":false},{\\\"token\\\":\\\" even\\\",\\\"bytes\\\":\\\"IGV2ZW4=\\\",\\\"prob\\\":0.08025968819856644,\\\"masked\\\":true},{\\\"token\\\":\\\" odd\\\",\\\"bytes\\\":\\\"IG9kZA==\\\",\\\"prob\\\":0.05700575187802315,\\\"masked\\\":true},{\\\"token\\\":\\\" apost\\\",\\\"bytes\\\":\\\"IGFwb3N0\\\",\\\"prob\\\":0.042624667286872864,\\\"masked\\\":true},{\\\"token\\\":\\\" adjective\\\",\\\"bytes\\\":\\\"IGFkamVjdGl2ZQ==\\\",\\\"prob\\\":0.03196299821138382,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.012621739879250526,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"agram\\\",\\\"bytes\\\":\\\"YWdyYW0=\\\",\\\"prob\\\":0.9665747284889221,\\\"masked\\\":true},{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.012621739879250526,\\\"masked\\\":false},{\\\"token\\\":\\\"aph\\\",\\\"bytes\\\":\\\"YXBo\\\",\\\"prob\\\":0.009298126213252544,\\\"masked\\\":true},{\\\"token\\\":\\\"agrams\\\",\\\"bytes\\\":\\\"YWdyYW1z\\\",\\\"prob\\\":0.006945191882550716,\\\"masked\\\":true},{\\\"token\\\":\\\"ad\\\",\\\"bytes\\\":\\\"YWQ=\\\",\\\"prob\\\":0.0004299786814954132,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9957784414291382,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9957784414291382,\\\"masked\\\":false},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.0030090599320828915,\\\"masked\\\":true},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.0005356870242394507,\\\"masked\\\":true},{\\\"token\\\":\\\"rom\\\",\\\"bytes\\\":\\\"cm9t\\\",\\\"prob\\\":0.00014945438306313008,\\\"masked\\\":true},{\\\"token\\\":\\\"oron\\\",\\\"bytes\\\":\\\"b3Jvbg==\\\",\\\"prob\\\":0.0000591720272495877,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9948453903198242,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9948453903198242,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.004403805360198021,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.0001982180110644549,\\\"masked\\\":true},{\\\"token\\\":\\\"im\\\",\\\"bytes\\\":\\\"aW0=\\\",\\\"prob\\\":0.00013853720156475902,\\\"masked\\\":true},{\\\"token\\\":\\\"is\\\",\\\"bytes\\\":\\\"aXM=\\\",\\\"prob\\\":0.00008807597623672336,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.030061054974794388,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.22542761266231537,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.19717277586460114,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.10757539421319962,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.10329277068376541,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.09798289090394974,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.030061054974794388,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"i\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"i\\\",\\\"bytes\\\":\\\"aQ==\\\",\\\"prob\\\":0.027735821902751923,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"a\\\",\\\"bytes\\\":\\\"YQ==\\\",\\\"prob\\\":0.4052080810070038,\\\"masked\\\":true},{\\\"token\\\":\\\"an\\\",\\\"bytes\\\":\\\"YW4=\\\",\\\"prob\\\":0.22616548836231232,\\\"masked\\\":true},{\\\"token\\\":\\\"something\\\",\\\"bytes\\\":\\\"c29tZXRoaW5n\\\",\\\"prob\\\":0.11176801472902298,\\\"masked\\\":true},{\\\"token\\\":\\\"out\\\",\\\"bytes\\\":\\\"b3V0\\\",\\\"prob\\\":0.06468167901039124,\\\"masked\\\":true},{\\\"token\\\":\\\"i\\\",\\\"bytes\\\":\\\"aQ==\\\",\\\"prob\\\":0.027735821902751923,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".e\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\".e\\\",\\\"bytes\\\":\\\"LmU=\\\",\\\"prob\\\":0.9737253785133362,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".e\\\",\\\"bytes\\\":\\\"LmU=\\\",\\\"prob\\\":0.9737253785133362,\\\"masked\\\":false},{\\\"token\\\":\\\")\\\",\\\"bytes\\\":\\\"KQ==\\\",\\\"prob\\\":0.007076439447700977,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.0030373281333595514,\\\"masked\\\":true},{\\\"token\\\":\\\")\\\\n\\\",\\\"bytes\\\":\\\"KQo=\\\",\\\"prob\\\":0.0006479771691374481,\\\"masked\\\":true},{\\\"token\\\":\\\" e\\\",\\\"bytes\\\":\\\"IGU=\\\",\\\"prob\\\":0.00028219856903888285,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.7197208404541016,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.7197208404541016,\\\"masked\\\":false},{\\\"token\\\":\\\".,\\\",\\\"bytes\\\":\\\"Liw=\\\",\\\"prob\\\":0.2531532347202301,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00836902018636465,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.006080149207264185,\\\"masked\\\":true},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.003791320603340864,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.0009564931388013065,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.42101919651031494,\\\"masked\\\":true},{\\\"token\\\":\\\" something\\\",\\\"bytes\\\":\\\"IHNvbWV0aGluZw==\\\",\\\"prob\\\":0.3413480222225189,\\\"masked\\\":true},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.15221919119358063,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.007360807154327631,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.007115972228348255,\\\"masked\\\":true},{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.0009564931388013065,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.5854669809341431,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.5854669809341431,\\\"masked\\\":false},{\\\"token\\\":\\\" there\\\",\\\"bytes\\\":\\\"IHRoZXJl\\\",\\\"prob\\\":0.15446190536022186,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.08858926594257355,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.04464465752243996,\\\"masked\\\":true},{\\\"token\\\":\\\" any\\\",\\\"bytes\\\":\\\"IGFueQ==\\\",\\\"prob\\\":0.03713114559650421,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" could\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.001718167564831674,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" contains\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5z\\\",\\\"prob\\\":0.6765577793121338,\\\"masked\\\":true},{\\\"token\\\":\\\" uses\\\",\\\"bytes\\\":\\\"IHVzZXM=\\\",\\\"prob\\\":0.0945109874010086,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.04784059524536133,\\\"masked\\\":true},{\\\"token\\\":\\\" includes\\\",\\\"bytes\\\":\\\"IGluY2x1ZGVz\\\",\\\"prob\\\":0.033737000077962875,\\\"masked\\\":true},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.01560925878584385,\\\"masked\\\":true},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.001718167564831674,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" have\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.1977163404226303,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.3827574849128723,\\\"masked\\\":true},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.1977163404226303,\\\"masked\\\":false},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.1875654011964798,\\\"masked\\\":true},{\\\"token\\\":\\\" possibly\\\",\\\"bytes\\\":\\\"IHBvc3NpYmx5\\\",\\\"prob\\\":0.03307488188147545,\\\"masked\\\":true},{\\\"token\\\":\\\" potentially\\\",\\\"bytes\\\":\\\"IHBvdGVudGlhbGx5\\\",\\\"prob\\\":0.02495756559073925,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" happened\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" happened\\\",\\\"bytes\\\":\\\"IGhhcHBlbmVk\\\",\\\"prob\\\":0.004352320451289415,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" been\\\",\\\"bytes\\\":\\\"IGJlZW4=\\\",\\\"prob\\\":0.8505849242210388,\\\"masked\\\":true},{\\\"token\\\":\\\" occurred\\\",\\\"bytes\\\":\\\"IG9jY3VycmVk\\\",\\\"prob\\\":0.025593549013137817,\\\"masked\\\":true},{\\\"token\\\":\\\" appeared\\\",\\\"bytes\\\":\\\"IGFwcGVhcmVk\\\",\\\"prob\\\":0.011344252154231071,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.010258299298584461,\\\"masked\\\":true},{\\\"token\\\":\\\" originated\\\",\\\"bytes\\\":\\\"IG9yaWdpbmF0ZWQ=\\\",\\\"prob\\\":0.009066171944141388,\\\"masked\\\":true},{\\\"token\\\":\\\" happened\\\",\\\"bytes\\\":\\\"IGhhcHBlbmVk\\\",\\\"prob\\\":0.004352320451289415,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.024355007335543633,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.5256927609443665,\\\"masked\\\":true},{\\\"token\\\":\\\" at\\\",\\\"bytes\\\":\\\"IGF0\\\",\\\"prob\\\":0.12175785005092621,\\\"masked\\\":true},{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.11432050168514252,\\\"masked\\\":true},{\\\"token\\\":\\\" during\\\",\\\"bytes\\\":\\\"IGR1cmluZw==\\\",\\\"prob\\\":0.036509767174720764,\\\"masked\\\":true},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.024355007335543633,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00018641090719029307,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" been\\\",\\\"bytes\\\":\\\"IGJlZW4=\\\",\\\"prob\\\":0.4485785961151123,\\\"masked\\\":true},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.08716201782226562,\\\"masked\\\":true},{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.0852210596203804,\\\"masked\\\":true},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.08146676421165466,\\\"masked\\\":true},{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.04599190875887871,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00018641090719029307,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"not\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"not\\\",\\\"bytes\\\":\\\"bm90\\\",\\\"prob\\\":0.00987197831273079,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"be\\\",\\\"bytes\\\":\\\"YmU=\\\",\\\"prob\\\":0.15311959385871887,\\\"masked\\\":true},{\\\"token\\\":\\\"been\\\",\\\"bytes\\\":\\\"YmVlbg==\\\",\\\"prob\\\":0.11206412315368652,\\\"masked\\\":true},{\\\"token\\\":\\\"could\\\",\\\"bytes\\\":\\\"Y291bGQ=\\\",\\\"prob\\\":0.10551965236663818,\\\"masked\\\":true},{\\\"token\\\":\\\"have\\\",\\\"bytes\\\":\\\"aGF2ZQ==\\\",\\\"prob\\\":0.020445657894015312,\\\"masked\\\":true},{\\\"token\\\":\\\"said\\\",\\\"bytes\\\":\\\"c2FpZA==\\\",\\\"prob\\\":0.017705045640468597,\\\"masked\\\":true},{\\\"token\\\":\\\"not\\\",\\\"bytes\\\":\\\"bm90\\\",\\\"prob\\\":0.00987197831273079,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" based\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" based\\\",\\\"bytes\\\":\\\"IGJhc2Vk\\\",\\\"prob\\\":0.001664617215283215,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.32439956068992615,\\\"masked\\\":true},{\\\"token\\\":\\\" happened\\\",\\\"bytes\\\":\\\"IGhhcHBlbmVk\\\",\\\"prob\\\":0.22049756348133087,\\\"masked\\\":true},{\\\"token\\\":\\\" happen\\\",\\\"bytes\\\":\\\"IGhhcHBlbg==\\\",\\\"prob\\\":0.18871454894542694,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.047343235462903976,\\\"masked\\\":true},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.030805187299847603,\\\"masked\\\":true},{\\\"token\\\":\\\" based\\\",\\\"bytes\\\":\\\"IGJhc2Vk\\\",\\\"prob\\\":0.001664617215283215,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" on\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.8352640867233276,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.8352640867233276,\\\"masked\\\":false},{\\\"token\\\":\\\" solely\\\",\\\"bytes\\\":\\\"IHNvbGVseQ==\\\",\\\"prob\\\":0.10445944964885712,\\\"masked\\\":true},{\\\"token\\\":\\\" only\\\",\\\"bytes\\\":\\\"IG9ubHk=\\\",\\\"prob\\\":0.01928608864545822,\\\"masked\\\":true},{\\\"token\\\":\\\" upon\\\",\\\"bytes\\\":\\\"IHVwb24=\\\",\\\"prob\\\":0.0073661827482283115,\\\"masked\\\":true},{\\\"token\\\":\\\" purely\\\",\\\"bytes\\\":\\\"IHB1cmVseQ==\\\",\\\"prob\\\":0.005676737986505032,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.6740472912788391,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.6740472912788391,\\\"masked\\\":false},{\\\"token\\\":\\\" historical\\\",\\\"bytes\\\":\\\"IGhpc3RvcmljYWw=\\\",\\\"prob\\\":0.05674593895673752,\\\"masked\\\":true},{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.03895210847258568,\\\"masked\\\":true},{\\\"token\\\":\\\" what\\\",\\\"bytes\\\":\\\"IHdoYXQ=\\\",\\\"prob\\\":0.036903880536556244,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.03557673096656799,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" time\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.6475551128387451,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.6475551128387451,\\\"masked\\\":false},{\\\"token\\\":\\\" historical\\\",\\\"bytes\\\":\\\"IGhpc3RvcmljYWw=\\\",\\\"prob\\\":0.0920046716928482,\\\"masked\\\":true},{\\\"token\\\":\\\" context\\\",\\\"bytes\\\":\\\"IGNvbnRleHQ=\\\",\\\"prob\\\":0.028149118646979332,\\\"masked\\\":true},{\\\"token\\\":\\\" period\\\",\\\"bytes\\\":\\\"IHBlcmlvZA==\\\",\\\"prob\\\":0.02489646151661873,\\\"masked\\\":true},{\\\"token\\\":\\\" setting\\\",\\\"bytes\\\":\\\"IHNldHRpbmc=\\\",\\\"prob\\\":0.009826276451349258,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" periods\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" periods\\\",\\\"bytes\\\":\\\"IHBlcmlvZHM=\\\",\\\"prob\\\":0.0029123921412974596,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" period\\\",\\\"bytes\\\":\\\"IHBlcmlvZA==\\\",\\\"prob\\\":0.9273349642753601,\\\"masked\\\":true},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.015208210796117783,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.010831722058355808,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.009436637163162231,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.006038617808371782,\\\"masked\\\":true},{\\\"token\\\":\\\" periods\\\",\\\"bytes\\\":\\\"IHBlcmlvZHM=\\\",\\\"prob\\\":0.0029123921412974596,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" associated\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":0.009723600000143051,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.20111072063446045,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.11983072012662888,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.07063785195350647,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.037439387291669846,\\\"masked\\\":true},{\\\"token\\\":\\\" involved\\\",\\\"bytes\\\":\\\"IGludm9sdmVk\\\",\\\"prob\\\":0.034639809280633926,\\\"masked\\\":true},{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":0.009723600000143051,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.9613776206970215,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.9613776206970215,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.006199281197041273,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.0038263790775090456,\\\"masked\\\":true},{\\\"token\\\":\\\")\\\\n\\\",\\\"bytes\\\":\\\"KQo=\\\",\\\"prob\\\":0.002830412471666932,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.002782136434689164,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.70113605260849,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.70113605260849,\\\"masked\\\":false},{\\\"token\\\":\\\" each\\\",\\\"bytes\\\":\\\"IGVhY2g=\\\",\\\"prob\\\":0.06446463614702225,\\\"masked\\\":true},{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.029879510402679443,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.02275664173066616,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.021237611770629883,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" entities\\\",\\\"bytes\\\":\\\"IGVudGl0aWVz\\\",\\\"prob\\\":0.01666882447898388,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" characters\\\",\\\"bytes\\\":\\\"IGNoYXJhY3RlcnM=\\\",\\\"prob\\\":0.28409236669540405,\\\"masked\\\":true},{\\\"token\\\":\\\" events\\\",\\\"bytes\\\":\\\"IGV2ZW50cw==\\\",\\\"prob\\\":0.05597338452935219,\\\"masked\\\":true},{\\\"token\\\":\\\" words\\\",\\\"bytes\\\":\\\"IHdvcmRz\\\",\\\"prob\\\":0.04984404519200325,\\\"masked\\\":true},{\\\"token\\\":\\\" people\\\",\\\"bytes\\\":\\\"IHBlb3BsZQ==\\\",\\\"prob\\\":0.047466591000556946,\\\"masked\\\":true},{\\\"token\\\":\\\" objects\\\",\\\"bytes\\\":\\\"IG9iamVjdHM=\\\",\\\"prob\\\":0.03897738829255104,\\\"masked\\\":true},{\\\"token\\\":\\\" entities\\\",\\\"bytes\\\":\\\"IGVudGl0aWVz\\\",\\\"prob\\\":0.01666882447898388,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\").\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\").\\\\n\\\\n\\\",\\\"bytes\\\":\\\"KS4KCg==\\\",\\\"prob\\\":0.0010684826411306858,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" mentioned\\\",\\\"bytes\\\":\\\"IG1lbnRpb25lZA==\\\",\\\"prob\\\":0.3569160997867584,\\\"masked\\\":true},{\\\"token\\\":\\\" involved\\\",\\\"bytes\\\":\\\"IGludm9sdmVk\\\",\\\"prob\\\":0.11950507014989853,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.06215180084109306,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.050873324275016785,\\\"masked\\\":true},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.050401996821165085,\\\"masked\\\":true},{\\\"token\\\":\\\").\\\\n\\\\n\\\",\\\"bytes\\\":\\\"KS4KCg==\\\",\\\"prob\\\":0.0010684826411306858,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":0.04148948937654495,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"##\\\",\\\"bytes\\\":\\\"IyM=\\\",\\\"prob\\\":0.6571418046951294,\\\"masked\\\":true},{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":0.04148948937654495,\\\"masked\\\":false},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.025520717725157738,\\\"masked\\\":true},{\\\"token\\\":\\\"**\\\",\\\"bytes\\\":\\\"Kio=\\\",\\\"prob\\\":0.01857619360089302,\\\"masked\\\":true},{\\\"token\\\":\\\"###\\\",\\\"bytes\\\":\\\"IyMj\\\",\\\"prob\\\":0.018314585089683533,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.1581241339445114,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.4404413402080536,\\\"masked\\\":true},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.3341510593891144,\\\"masked\\\":true},{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.1581241339445114,\\\"masked\\\":false},{\\\"token\\\":\\\" we\\\",\\\"bytes\\\":\\\"IHdl\\\",\\\"prob\\\":0.020274391397833824,\\\"masked\\\":true},{\\\"token\\\":\\\"’s\\\",\\\"bytes\\\":\\\"4oCZcw==\\\",\\\"prob\\\":0.017865726724267006,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" some\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" some\\\",\\\"bytes\\\":\\\"IHNvbWU=\\\",\\\"prob\\\":0.43583470582962036,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" some\\\",\\\"bytes\\\":\\\"IHNvbWU=\\\",\\\"prob\\\":0.43583470582962036,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.27749505639076233,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.14228126406669617,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.03404098376631737,\\\"masked\\\":true},{\\\"token\\\":\\\" two\\\",\\\"bytes\\\":\\\"IHR3bw==\\\",\\\"prob\\\":0.03057035617530346,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" examples\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" examples\\\",\\\"bytes\\\":\\\"IGV4YW1wbGVz\\\",\\\"prob\\\":0.43700486421585083,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" examples\\\",\\\"bytes\\\":\\\"IGV4YW1wbGVz\\\",\\\"prob\\\":0.43700486421585083,\\\"masked\\\":false},{\\\"token\\\":\\\" rules\\\",\\\"bytes\\\":\\\"IHJ1bGVz\\\",\\\"prob\\\":0.11858303844928741,\\\"masked\\\":true},{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.0486314482986927,\\\"masked\\\":true},{\\\"token\\\":\\\" definitions\\\",\\\"bytes\\\":\\\"IGRlZmluaXRpb25z\\\",\\\"prob\\\":0.030729733407497406,\\\"masked\\\":true},{\\\"token\\\":\\\" guidelines\\\",\\\"bytes\\\":\\\"IGd1aWRlbGluZXM=\\\",\\\"prob\\\":0.029798397794365883,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.13109120726585388,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.36658167839050293,\\\"masked\\\":true},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.20159099996089935,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.13109120726585388,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.08122501522302628,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.031054245308041573,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.0009239008068107069,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"*\\\",\\\"bytes\\\":\\\"Kg==\\\",\\\"prob\\\":0.251463919878006,\\\"masked\\\":true},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.18695446848869324,\\\"masked\\\":true},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.04894144833087921,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.0363580547273159,\\\"masked\\\":true},{\\\"token\\\":\\\"``\\\",\\\"bytes\\\":\\\"YGA=\\\",\\\"prob\\\":0.0346858873963356,\\\"masked\\\":true},{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.0009239008068107069,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.24697498977184296,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.47348859906196594,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.24697498977184296,\\\"masked\\\":false},{\\\"token\\\":\\\" |\\\",\\\"bytes\\\":\\\"IHw=\\\",\\\"prob\\\":0.0397043414413929,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.021511761471629143,\\\"masked\\\":true},{\\\"token\\\":\\\" A\\\",\\\"bytes\\\":\\\"IEE=\\\",\\\"prob\\\":0.02027762122452259,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" I\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.01692175306379795,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.49945342540740967,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.12643271684646606,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.05865537002682686,\\\"masked\\\":true},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.029857490211725235,\\\"masked\\\":true},{\\\"token\\\":\\\" Napoleon\\\",\\\"bytes\\\":\\\"IE5hcG9sZW9u\\\",\\\"prob\\\":0.02079222910106182,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.01692175306379795,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" wrote\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.0024348306469619274,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" went\\\",\\\"bytes\\\":\\\"IHdlbnQ=\\\",\\\"prob\\\":0.13665510714054108,\\\"masked\\\":true},{\\\"token\\\":\\\"'m\\\",\\\"bytes\\\":\\\"J20=\\\",\\\"prob\\\":0.06492247432470322,\\\"masked\\\":true},{\\\"token\\\":\\\" love\\\",\\\"bytes\\\":\\\"IGxvdmU=\\\",\\\"prob\\\":0.05761117488145828,\\\"masked\\\":true},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.04991569370031357,\\\"masked\\\":true},{\\\"token\\\":\\\" had\\\",\\\"bytes\\\":\\\"IGhhZA==\\\",\\\"prob\\\":0.04782574623823166,\\\"masked\\\":true},{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.0024348306469619274,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" about\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.002034067874774337,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.27074170112609863,\\\"masked\\\":true},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.22262407839298248,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.21543170511722565,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.09356458485126495,\\\"masked\\\":true},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.03720904514193535,\\\"masked\\\":true},{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.002034067874774337,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sh\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" sh\\\",\\\"bytes\\\":\\\"IHNo\\\",\\\"prob\\\":0.000052231047448003665,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.2107827067375183,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.06155522167682648,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.05523054674267769,\\\"masked\\\":true},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.04510516673326492,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.02680458314716816,\\\"masked\\\":true},{\\\"token\\\":\\\" sh\\\",\\\"bytes\\\":\\\"IHNo\\\",\\\"prob\\\":0.000052231047448003665,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"akespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.027144530788064003,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"aw\\\",\\\"bytes\\\":\\\"YXc=\\\",\\\"prob\\\":0.10649194568395615,\\\"masked\\\":true},{\\\"token\\\":\\\"ib\\\",\\\"bytes\\\":\\\"aWI=\\\",\\\"prob\\\":0.08595751225948334,\\\"masked\\\":true},{\\\"token\\\":\\\"ov\\\",\\\"bytes\\\":\\\"b3Y=\\\",\\\"prob\\\":0.06901401281356812,\\\"masked\\\":true},{\\\"token\\\":\\\"og\\\",\\\"bytes\\\":\\\"b2c=\\\",\\\"prob\\\":0.06254406273365021,\\\"masked\\\":true},{\\\"token\\\":\\\"ampo\\\",\\\"bytes\\\":\\\"YW1wbw==\\\",\\\"prob\\\":0.05280987173318863,\\\"masked\\\":true},{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.027144530788064003,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.030136365443468094,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.2472071498632431,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.13716086745262146,\\\"masked\\\":true},{\\\"token\\\":\\\"an\\\",\\\"bytes\\\":\\\"YW4=\\\",\\\"prob\\\":0.08278302103281021,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.0821981206536293,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.08216496556997299,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.030136365443468094,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.0001986854476854205,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.18092115223407745,\\\"masked\\\":true},{\\\"token\\\":\\\"Result\\\",\\\"bytes\\\":\\\"UmVzdWx0\\\",\\\"prob\\\":0.13234302401542664,\\\"masked\\\":true},{\\\"token\\\":\\\"Answer\\\",\\\"bytes\\\":\\\"QW5zd2Vy\\\",\\\"prob\\\":0.07066760957241058,\\\"masked\\\":true},{\\\"token\\\":\\\"Time\\\",\\\"bytes\\\":\\\"VGltZQ==\\\",\\\"prob\\\":0.055372562259435654,\\\"masked\\\":true},{\\\"token\\\":\\\"Is\\\",\\\"bytes\\\":\\\"SXM=\\\",\\\"prob\\\":0.027560634538531303,\\\"masked\\\":true},{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.0001986854476854205,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.00019180633535142988,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9391850233078003,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.021467488259077072,\\\"masked\\\":true},{\\\"token\\\":\\\" involved\\\",\\\"bytes\\\":\\\"IGludm9sdmVk\\\",\\\"prob\\\":0.016451988369226456,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0023114702198654413,\\\"masked\\\":true},{\\\"token\\\":\\\" mentioned\\\",\\\"bytes\\\":\\\"IG1lbnRpb25lZA==\\\",\\\"prob\\\":0.002129178261384368,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.00019180633535142988,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dates\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.017705827951431274,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.3936518430709839,\\\"masked\\\":true},{\\\"token\\\":\\\" Time\\\",\\\"bytes\\\":\\\"IFRpbWU=\\\",\\\"prob\\\":0.1623823195695877,\\\"masked\\\":true},{\\\"token\\\":\\\" their\\\",\\\"bytes\\\":\\\"IHRoZWly\\\",\\\"prob\\\":0.1403108388185501,\\\"masked\\\":true},{\\\"token\\\":\\\" periods\\\",\\\"bytes\\\":\\\"IHBlcmlvZHM=\\\",\\\"prob\\\":0.035633668303489685,\\\"masked\\\":true},{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":0.02945990115404129,\\\"masked\\\":true},{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.017705827951431274,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.24832995235919952,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5841904878616333,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.24832995235919952,\\\"masked\\\":false},{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":0.04099193215370178,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.012828635983169079,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.012589473277330399,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"I\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.008242995478212833,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.4368683993816376,\\\"masked\\\":true},{\\\"token\\\":\\\"*\\\",\\\"bytes\\\":\\\"Kg==\\\",\\\"prob\\\":0.1238962933421135,\\\"masked\\\":true},{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.11140213161706924,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.038780227303504944,\\\"masked\\\":true},{\\\"token\\\":\\\"   \\\",\\\"bytes\\\":\\\"ICAg\\\",\\\"prob\\\":0.020561836659908295,\\\"masked\\\":true},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.008242995478212833,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.02223016880452633,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.2769964337348938,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.20418107509613037,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.1553495228290558,\\\"masked\\\":true},{\\\"token\\\":\\\" ->\\\",\\\"bytes\\\":\\\"IC0+\\\",\\\"prob\\\":0.08753065019845963,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.03094443492591381,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.02223016880452633,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" present\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.15088602900505066,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.15088602900505066,\\\"masked\\\":false},{\\\"token\\\":\\\" Person\\\",\\\"bytes\\\":\\\"IFBlcnNvbg==\\\",\\\"prob\\\":0.10770007967948914,\\\"masked\\\":true},{\\\"token\\\":\\\" person\\\",\\\"bytes\\\":\\\"IHBlcnNvbg==\\\",\\\"prob\\\":0.07776463031768799,\\\"masked\\\":true},{\\\"token\\\":\\\" Present\\\",\\\"bytes\\\":\\\"IFByZXNlbnQ=\\\",\\\"prob\\\":0.06850085407495499,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.06621088087558746,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.2862372398376465,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" day\\\",\\\"bytes\\\":\\\"IGRheQ==\\\",\\\"prob\\\":0.3637448251247406,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.2862372398376465,\\\"masked\\\":false},{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.0800108090043068,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0674230307340622,\\\"masked\\\":true},{\\\"token\\\":\\\" tense\\\",\\\"bytes\\\":\\\"IHRlbnNl\\\",\\\"prob\\\":0.06328646093606949,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sh\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.3153190612792969,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.3153190612792969,\\\"masked\\\":false},{\\\"token\\\":\\\"w\\\",\\\"bytes\\\":\\\"dw==\\\",\\\"prob\\\":0.18120932579040527,\\\"masked\\\":true},{\\\"token\\\":\\\"W\\\",\\\"bytes\\\":\\\"Vw==\\\",\\\"prob\\\":0.11182086914777756,\\\"masked\\\":true},{\\\"token\\\":\\\"sh\\\",\\\"bytes\\\":\\\"c2g=\\\",\\\"prob\\\":0.08430279791355133,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.03145137429237366,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"akespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.9980839490890503,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.9980839490890503,\\\"masked\\\":false},{\\\"token\\\":\\\"akes\\\",\\\"bytes\\\":\\\"YWtlcw==\\\",\\\"prob\\\":0.0008648638031445444,\\\"masked\\\":true},{\\\"token\\\":\\\"ake\\\",\\\"bytes\\\":\\\"YWtl\\\",\\\"prob\\\":0.0005753312143497169,\\\"masked\\\":true},{\\\"token\\\":\\\"ak\\\",\\\"bytes\\\":\\\"YWs=\\\",\\\"prob\\\":0.00018233533774036914,\\\"masked\\\":true},{\\\"token\\\":\\\"ark\\\",\\\"bytes\\\":\\\"YXJr\\\",\\\"prob\\\":0.00002047699672402814,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.6433303952217102,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.6433303952217102,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.2914755344390869,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.01838449016213417,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.010163458064198494,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00793312955647707,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.6390545964241028,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.6390545964241028,\\\"masked\\\":false},{\\\"token\\\":\\\" Elizabeth\\\",\\\"bytes\\\":\\\"IEVsaXphYmV0aA==\\\",\\\"prob\\\":0.10607179999351501,\\\"masked\\\":true},{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.07483716309070587,\\\"masked\\\":true},{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.019436707720160484,\\\"masked\\\":true},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.011401497758924961,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"16\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"16\\\",\\\"bytes\\\":\\\"MTY=\\\",\\\"prob\\\":0.6950207948684692,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"16\\\",\\\"bytes\\\":\\\"MTY=\\\",\\\"prob\\\":0.6950207948684692,\\\"masked\\\":false},{\\\"token\\\":\\\"156\\\",\\\"bytes\\\":\\\"MTU2\\\",\\\"prob\\\":0.23364488780498505,\\\"masked\\\":true},{\\\"token\\\":\\\"155\\\",\\\"bytes\\\":\\\"MTU1\\\",\\\"prob\\\":0.009167732670903206,\\\"masked\\\":true},{\\\"token\\\":\\\"159\\\",\\\"bytes\\\":\\\"MTU5\\\",\\\"prob\\\":0.005440867505967617,\\\"masked\\\":true},{\\\"token\\\":\\\"158\\\",\\\"bytes\\\":\\\"MTU4\\\",\\\"prob\\\":0.005141528323292732,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"th\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"th\\\",\\\"bytes\\\":\\\"dGg=\\\",\\\"prob\\\":0.9866125583648682,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"th\\\",\\\"bytes\\\":\\\"dGg=\\\",\\\"prob\\\":0.9866125583648682,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.008695166558027267,\\\"masked\\\":true},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.0008325547096319497,\\\"masked\\\":true},{\\\"token\\\":\\\" century\\\",\\\"bytes\\\":\\\"IGNlbnR1cnk=\\\",\\\"prob\\\":0.0004350921662990004,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.0003845586034003645,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" century\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" century\\\",\\\"bytes\\\":\\\"IGNlbnR1cnk=\\\",\\\"prob\\\":0.5160265564918518,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" century\\\",\\\"bytes\\\":\\\"IGNlbnR1cnk=\\\",\\\"prob\\\":0.5160265564918518,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.3472694754600525,\\\"masked\\\":true},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.04555931314826012,\\\"masked\\\":true},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.02333034947514534,\\\"masked\\\":true},{\\\"token\\\":\\\" Century\\\",\\\"bytes\\\":\\\"IENlbnR1cnk=\\\",\\\"prob\\\":0.014150450937449932,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.7598898410797119,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.7598898410797119,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.07123973965644836,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.05758121982216835,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.016423124819993973,\\\"masked\\\":true},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.012823403812944889,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Reason\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.00012015830725431442,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Result\\\",\\\"bytes\\\":\\\"UmVzdWx0\\\",\\\"prob\\\":0.20906348526477814,\\\"masked\\\":true},{\\\"token\\\":\\\"Therefore\\\",\\\"bytes\\\":\\\"VGhlcmVmb3Jl\\\",\\\"prob\\\":0.058876123279333115,\\\"masked\\\":true},{\\\"token\\\":\\\"Analysis\\\",\\\"bytes\\\":\\\"QW5hbHlzaXM=\\\",\\\"prob\\\":0.042409952729940414,\\\"masked\\\":true},{\\\"token\\\":\\\"So\\\",\\\"bytes\\\":\\\"U28=\\\",\\\"prob\\\":0.034498848021030426,\\\"masked\\\":true},{\\\"token\\\":\\\"If\\\",\\\"bytes\\\":\\\"SWY=\\\",\\\"prob\\\":0.03293086960911751,\\\"masked\\\":true},{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.00012015830725431442,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ing\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.274143248796463,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5636051297187805,\\\"masked\\\":true},{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.274143248796463,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.08603476732969284,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.03724980354309082,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.00927640963345766,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7211151719093323,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7211151719093323,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.23243089020252228,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.005363469012081623,\\\"masked\\\":true},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.00459774024784565,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0039869206957519054,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" I\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.025381043553352356,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Since\\\",\\\"bytes\\\":\\\"IFNpbmNl\\\",\\\"prob\\\":0.12173401564359665,\\\"masked\\\":true},{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.12149648368358612,\\\"masked\\\":true},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.11046367138624191,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.08336763828992844,\\\"masked\\\":true},{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.04340965300798416,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.025381043553352356,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" can\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.037241049110889435,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.2837204039096832,\\\"masked\\\":true},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.2087518870830536,\\\"masked\\\":true},{\\\"token\\\":\\\" am\\\",\\\"bytes\\\":\\\"IGFt\\\",\\\"prob\\\":0.060111887753009796,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.048417989164590836,\\\"masked\\\":true},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.037241049110889435,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" write\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" write\\\",\\\"bytes\\\":\\\"IHdyaXRl\\\",\\\"prob\\\":0.2965880334377289,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" write\\\",\\\"bytes\\\":\\\"IHdyaXRl\\\",\\\"prob\\\":0.2965880334377289,\\\"masked\\\":false},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.10106019675731659,\\\"masked\\\":true},{\\\"token\\\":\\\" only\\\",\\\"bytes\\\":\\\"IG9ubHk=\\\",\\\"prob\\\":0.08529458940029144,\\\"masked\\\":true},{\\\"token\\\":\\\"'t\\\",\\\"bytes\\\":\\\"J3Q=\\\",\\\"prob\\\":0.05841512605547905,\\\"masked\\\":true},{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.045814454555511475,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" about\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.312264621257782,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.312264621257782,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.13859909772872925,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.1062704473733902,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.04934711381793022,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.03642968460917473,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Shakespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.6092506051063538,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.6092506051063538,\\\"masked\\\":false},{\\\"token\\\":\\\" sh\\\",\\\"bytes\\\":\\\"IHNo\\\",\\\"prob\\\":0.10436277091503143,\\\"masked\\\":true},{\\\"token\\\":\\\" anyone\\\",\\\"bytes\\\":\\\"IGFueW9uZQ==\\\",\\\"prob\\\":0.0699678286910057,\\\"masked\\\":true},{\\\"token\\\":\\\" anything\\\",\\\"bytes\\\":\\\"IGFueXRoaW5n\\\",\\\"prob\\\":0.03835497051477432,\\\"masked\\\":true},{\\\"token\\\":\\\" any\\\",\\\"bytes\\\":\\\"IGFueQ==\\\",\\\"prob\\\":0.03406728804111481,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.2479599416255951,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.2479599416255951,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.23712323606014252,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.06329183280467987,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.06212344020605087,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.060585930943489075,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" he\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.1839171200990677,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.18770381808280945,\\\"masked\\\":true},{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.1839171200990677,\\\"masked\\\":false},{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.14896534383296967,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.10549553483724594,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.0712570995092392,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" lived\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.3488605320453644,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.3488605320453644,\\\"masked\\\":false},{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.31642207503318787,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.1251671016216278,\\\"masked\\\":true},{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.05368492007255554,\\\"masked\\\":true},{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.04676109179854393,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.22398173809051514,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" long\\\",\\\"bytes\\\":\\\"IGxvbmc=\\\",\\\"prob\\\":0.24962341785430908,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.22398173809051514,\\\"masked\\\":false},{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.16481298208236694,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.07860849052667618,\\\"masked\\\":true},{\\\"token\\\":\\\" during\\\",\\\"bytes\\\":\\\"IGR1cmluZw==\\\",\\\"prob\\\":0.047149959951639175,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.89702308177948,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.89702308177948,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.034812286496162415,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.029549086466431618,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.019546106457710266,\\\"masked\\\":true},{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.0031265660654753447,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" past\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.18145586550235748,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.7709605097770691,\\\"masked\\\":true},{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.18145586550235748,\\\"masked\\\":false},{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.01451880019158125,\\\"masked\\\":true},{\\\"token\\\":\\\" same\\\",\\\"bytes\\\":\\\"IHNhbWU=\\\",\\\"prob\\\":0.007771976757794619,\\\"masked\\\":true},{\\\"token\\\":\\\" Renaissance\\\",\\\"bytes\\\":\\\"IFJlbmFpc3NhbmNl\\\",\\\"prob\\\":0.0032172484789043665,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.0001051162980729714,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.2925141453742981,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.21209195256233215,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.10468438267707825,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.08750228583812714,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.07511238753795624,\\\"masked\\\":true},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.0001051162980729714,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" respect\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" respect\\\",\\\"bytes\\\":\\\"IHJlc3BlY3Q=\\\",\\\"prob\\\":0.11420252174139023,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.1481320708990097,\\\"masked\\\":true},{\\\"token\\\":\\\" respect\\\",\\\"bytes\\\":\\\"IHJlc3BlY3Q=\\\",\\\"prob\\\":0.11420252174139023,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.0722605511546135,\\\"masked\\\":true},{\\\"token\\\":\\\" whom\\\",\\\"bytes\\\":\\\"IHdob20=\\\",\\\"prob\\\":0.036017660051584244,\\\"masked\\\":true},{\\\"token\\\":\\\" us\\\",\\\"bytes\\\":\\\"IHVz\\\",\\\"prob\\\":0.030859289690852165,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9868201613426208,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9868201613426208,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.004882472567260265,\\\"masked\\\":true},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.002645723754540086,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.0012849766062572598,\\\"masked\\\":true},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.00035380254848860204,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.1119597852230072,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.45070165395736694,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.12093278020620346,\\\"masked\\\":true},{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.1119597852230072,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.08506298065185547,\\\"masked\\\":true},{\\\"token\\\":\\\" now\\\",\\\"bytes\\\":\\\"IG5vdw==\\\",\\\"prob\\\":0.03679570555686951,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.1307634562253952,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.23921746015548706,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.21791096031665802,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.14077414572238922,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.1307634562253952,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.08412760496139526,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"An\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.08150572329759598,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Result\\\",\\\"bytes\\\":\\\"UmVzdWx0\\\",\\\"prob\\\":0.27934420108795166,\\\"masked\\\":true},{\\\"token\\\":\\\"Conclusion\\\",\\\"bytes\\\":\\\"Q29uY2x1c2lvbg==\\\",\\\"prob\\\":0.11177630722522736,\\\"masked\\\":true},{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.08150572329759598,\\\"masked\\\":false},{\\\"token\\\":\\\"Outcome\\\",\\\"bytes\\\":\\\"T3V0Y29tZQ==\\\",\\\"prob\\\":0.0634402260184288,\\\"masked\\\":true},{\\\"token\\\":\\\"Therefore\\\",\\\"bytes\\\":\\\"VGhlcmVmb3Jl\\\",\\\"prob\\\":0.05155111476778984,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9528192281723022,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9528192281723022,\\\"masked\\\":false},{\\\"token\\\":\\\" answer\\\",\\\"bytes\\\":\\\"IGFuc3dlcg==\\\",\\\"prob\\\":0.009715302847325802,\\\"masked\\\":true},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0072076027281582355,\\\"masked\\\":true},{\\\"token\\\":\\\"ac\\\",\\\"bytes\\\":\\\"YWM=\\\",\\\"prob\\\":0.0030482695437967777,\\\"masked\\\":true},{\\\"token\\\":\\\"an\\\",\\\"bytes\\\":\\\"YW4=\\\",\\\"prob\\\":0.002347185043618083,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9977658987045288,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9977658987045288,\\\"masked\\\":false},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.0013724167365580797,\\\"masked\\\":true},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.0003162898647133261,\\\"masked\\\":true},{\\\"token\\\":\\\"rom\\\",\\\"bytes\\\":\\\"cm9t\\\",\\\"prob\\\":0.00011178517888765782,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.00010779770673252642,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9617952704429626,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9617952704429626,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.03363131359219551,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.0009412052459083498,\\\"masked\\\":true},{\\\"token\\\":\\\"y\\\",\\\"bytes\\\":\\\"eQ==\\\",\\\"prob\\\":0.0004298504500184208,\\\"masked\\\":true},{\\\"token\\\":\\\"is\\\",\\\"bytes\\\":\\\"aXM=\\\",\\\"prob\\\":0.00041862629586830735,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.658018171787262,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.658018171787262,\\\"masked\\\":false},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0406799279153347,\\\"masked\\\":true},{\\\"token\\\":\\\"?\\\",\\\"bytes\\\":\\\"Pw==\\\",\\\"prob\\\":0.03839461877942085,\\\"masked\\\":true},{\\\"token\\\":\\\" detected\\\",\\\"bytes\\\":\\\"IGRldGVjdGVk\\\",\\\"prob\\\":0.03417852893471718,\\\"masked\\\":true},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.01886356994509697,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" No\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.39842912554740906,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.39842912554740906,\\\"masked\\\":false},{\\\"token\\\":\\\" no\\\",\\\"bytes\\\":\\\"IG5v\\\",\\\"prob\\\":0.13975991308689117,\\\"masked\\\":true},{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.09209875017404556,\\\"masked\\\":true},{\\\"token\\\":\\\" False\\\",\\\"bytes\\\":\\\"IEZhbHNl\\\",\\\"prob\\\":0.08505776524543762,\\\"masked\\\":true},{\\\"token\\\":\\\" yes\\\",\\\"bytes\\\":\\\"IHllcw==\\\",\\\"prob\\\":0.07386325299739838,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.23443269729614258,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.5812987685203552,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.23443269729614258,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.08434435725212097,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.03162093088030815,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.02005751244723797,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.4078754186630249,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.4078754186630249,\\\"masked\\\":false},{\\\"token\\\":\\\"Next\\\",\\\"bytes\\\":\\\"TmV4dA==\\\",\\\"prob\\\":0.03553291782736778,\\\"masked\\\":true},{\\\"token\\\":\\\" Sentence\\\",\\\"bytes\\\":\\\"IFNlbnRlbmNl\\\",\\\"prob\\\":0.02670162543654442,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.025220533832907677,\\\"masked\\\":true},{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.02012367732822895,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9909756779670715,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9909756779670715,\\\"masked\\\":false},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.00378179969266057,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.002683196449652314,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0002911078336182982,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.00027275006868876517,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Shakespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.0003224335378035903,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.5884177088737488,\\\"masked\\\":true},{\\\"token\\\":\\\" My\\\",\\\"bytes\\\":\\\"IE15\\\",\\\"prob\\\":0.06728826463222504,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.03970405086874962,\\\"masked\\\":true},{\\\"token\\\":\\\" Apple\\\",\\\"bytes\\\":\\\"IEFwcGxl\\\",\\\"prob\\\":0.015446308068931103,\\\"masked\\\":true},{\\\"token\\\":\\\" Tesla\\\",\\\"bytes\\\":\\\"IFRlc2xh\\\",\\\"prob\\\":0.01494066696614027,\\\"masked\\\":true},{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.0003224335378035903,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" wrote\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.591418981552124,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.591418981552124,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.03556770458817482,\\\"masked\\\":true},{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.029860686510801315,\\\"masked\\\":true},{\\\"token\\\":\\\" said\\\",\\\"bytes\\\":\\\"IHNhaWQ=\\\",\\\"prob\\\":0.02916189841926098,\\\"masked\\\":true},{\\\"token\\\":\\\" invented\\\",\\\"bytes\\\":\\\"IGludmVudGVk\\\",\\\"prob\\\":0.023831069469451904,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" about\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.26360806822776794,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.26360806822776794,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.13449370861053467,\\\"masked\\\":true},{\\\"token\\\":\\\" Romeo\\\",\\\"bytes\\\":\\\"IFJvbWVv\\\",\\\"prob\\\":0.09536722302436829,\\\"masked\\\":true},{\\\"token\\\":\\\" son\\\",\\\"bytes\\\":\\\"IHNvbg==\\\",\\\"prob\\\":0.08841367065906525,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.03581995517015457,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.01815580576658249,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.08930747956037521,\\\"masked\\\":true},{\\\"token\\\":\\\" himself\\\",\\\"bytes\\\":\\\"IGhpbXNlbGY=\\\",\\\"prob\\\":0.06464820355176926,\\\"masked\\\":true},{\\\"token\\\":\\\" aliens\\\",\\\"bytes\\\":\\\"IGFsaWVucw==\\\",\\\"prob\\\":0.02870728261768818,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.028028268367052078,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.027388082817196846,\\\"masked\\\":true},{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.01815580576658249,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.8543166518211365,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.8543166518211365,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.03788179159164429,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.022098613902926445,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.013137008994817734,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.013131084851920605,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.9954248070716858,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.9954248070716858,\\\"masked\\\":false},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.0005820245714858174,\\\"masked\\\":true},{\\\"token\\\":\\\"Entity\\\",\\\"bytes\\\":\\\"RW50aXR5\\\",\\\"prob\\\":0.0005045305588282645,\\\"masked\\\":true},{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.0004836333973798901,\\\"masked\\\":true},{\\\"token\\\":\\\"entities\\\",\\\"bytes\\\":\\\"ZW50aXRpZXM=\\\",\\\"prob\\\":0.0003492601972538978,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9969490170478821,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9969490170478821,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.0017435441259294748,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.0004569615120999515,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.00014421064406633377,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00010433984425617382,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dates\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.9985308647155762,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.9985308647155762,\\\"masked\\\":false},{\\\"token\\\":\\\" Dates\\\",\\\"bytes\\\":\\\"IERhdGVz\\\",\\\"prob\\\":0.0008788156555965543,\\\"masked\\\":true},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.00016049356781877577,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00005164888716535643,\\\"masked\\\":true},{\\\"token\\\":\\\" d\\\",\\\"bytes\\\":\\\"IGQ=\\\",\\\"prob\\\":0.00002457200753269717,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.9934055805206299,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.9934055805206299,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.00487270625308156,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.000566527945920825,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\\n\\\",\\\"bytes\\\":\\\"IDoK\\\",\\\"prob\\\":0.00038595989462919533,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00035979467793367803,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sh\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.9872445464134216,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.9872445464134216,\\\"masked\\\":false},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.010215159505605698,\\\"masked\\\":true},{\\\"token\\\":\\\"sh\\\",\\\"bytes\\\":\\\"c2g=\\\",\\\"prob\\\":0.00045511790085583925,\\\"masked\\\":true},{\\\"token\\\":\\\"William\\\",\\\"bytes\\\":\\\"V2lsbGlhbQ==\\\",\\\"prob\\\":0.0002630907401908189,\\\"masked\\\":true},{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.00008527298632543534,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"akespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.9990471005439758,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"akespeare\\\",\\\"bytes\\\":\\\"YWtlc3BlYXJl\\\",\\\"prob\\\":0.9990471005439758,\\\"masked\\\":false},{\\\"token\\\":\\\"ake\\\",\\\"bytes\\\":\\\"YWtl\\\",\\\"prob\\\":0.00044170746696181595,\\\"masked\\\":true},{\\\"token\\\":\\\"ak\\\",\\\"bytes\\\":\\\"YWs=\\\",\\\"prob\\\":0.00014592634397558868,\\\"masked\\\":true},{\\\"token\\\":\\\"akes\\\",\\\"bytes\\\":\\\"YWtlcw==\\\",\\\"prob\\\":0.0001392262347508222,\\\"masked\\\":true},{\\\"token\\\":\\\"ark\\\",\\\"bytes\\\":\\\"YXJr\\\",\\\"prob\\\":0.000024101751478156075,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9874842762947083,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9874842762947083,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.0063048312440514565,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0037162937223911285,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0006671467563137412,\\\"masked\\\":true},{\\\"token\\\":\\\" ;\\\",\\\"bytes\\\":\\\"IDs=\\\",\\\"prob\\\":0.00021295348415151238,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.9969381093978882,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.9969381093978882,\\\"masked\\\":false},{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.0009201550856232643,\\\"masked\\\":true},{\\\"token\\\":\\\"16\\\",\\\"bytes\\\":\\\"MTY=\\\",\\\"prob\\\":0.0006251843878999352,\\\"masked\\\":true},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.00016426572983618826,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00015404136502183974,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"16\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"16\\\",\\\"bytes\\\":\\\"MTY=\\\",\\\"prob\\\":0.9988767504692078,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"16\\\",\\\"bytes\\\":\\\"MTY=\\\",\\\"prob\\\":0.9988767504692078,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00027972005773335695,\\\"masked\\\":true},{\\\"token\\\":\\\"15\\\",\\\"bytes\\\":\\\"MTU=\\\",\\\"prob\\\":0.00025205762358382344,\\\"masked\\\":true},{\\\"token\\\":\\\"17\\\",\\\"bytes\\\":\\\"MTc=\\\",\\\"prob\\\":0.00019244801660533994,\\\"masked\\\":true},{\\\"token\\\":\\\"156\\\",\\\"bytes\\\":\\\"MTU2\\\",\\\"prob\\\":0.000060496535297716036,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"th\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"th\\\",\\\"bytes\\\":\\\"dGg=\\\",\\\"prob\\\":0.9998719692230225,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"th\\\",\\\"bytes\\\":\\\"dGg=\\\",\\\"prob\\\":0.9998719692230225,\\\"masked\\\":false},{\\\"token\\\":\\\"c\\\",\\\"bytes\\\":\\\"Yw==\\\",\\\"prob\\\":0.000035344412026461214,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.00001994047488551587,\\\"masked\\\":true},{\\\"token\\\":\\\" th\\\",\\\"bytes\\\":\\\"IHRo\\\",\\\"prob\\\":0.000016023890566430055,\\\"masked\\\":true},{\\\"token\\\":\\\"t\\\",\\\"bytes\\\":\\\"dA==\\\",\\\"prob\\\":0.000007227818514365936,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" century\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" century\\\",\\\"bytes\\\":\\\"IGNlbnR1cnk=\\\",\\\"prob\\\":0.9995429515838623,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" century\\\",\\\"bytes\\\":\\\"IGNlbnR1cnk=\\\",\\\"prob\\\":0.9995429515838623,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.00012165147927589715,\\\"masked\\\":true},{\\\"token\\\":\\\" cent\\\",\\\"bytes\\\":\\\"IGNlbnQ=\\\",\\\"prob\\\":0.00006627265975112095,\\\"masked\\\":true},{\\\"token\\\":\\\" c\\\",\\\"bytes\\\":\\\"IGM=\\\",\\\"prob\\\":0.00004015172817162238,\\\"masked\\\":true},{\\\"token\\\":\\\" Century\\\",\\\"bytes\\\":\\\"IENlbnR1cnk=\\\",\\\"prob\\\":0.000027951675292570144,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9847181439399719,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9847181439399719,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.006240348797291517,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.005545646417886019,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0006809955229982734,\\\"masked\\\":true},{\\\"token\\\":\\\" ->\\\",\\\"bytes\\\":\\\"IC0+\\\",\\\"prob\\\":0.00030624112696386874,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"I\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.8259851932525635,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.8259851932525635,\\\"masked\\\":false},{\\\"token\\\":\\\"Me\\\",\\\"bytes\\\":\\\"TWU=\\\",\\\"prob\\\":0.15408955514431,\\\"masked\\\":true},{\\\"token\\\":\\\"me\\\",\\\"bytes\\\":\\\"bWU=\\\",\\\"prob\\\":0.006425696890801191,\\\"masked\\\":true},{\\\"token\\\":\\\"My\\\",\\\"bytes\\\":\\\"TXk=\\\",\\\"prob\\\":0.0023391908034682274,\\\"masked\\\":true},{\\\"token\\\":\\\"You\\\",\\\"bytes\\\":\\\"WW91\\\",\\\"prob\\\":0.002239895286038518,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9673709869384766,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9673709869384766,\\\"masked\\\":false},{\\\"token\\\":\\\"/me\\\",\\\"bytes\\\":\\\"L21l\\\",\\\"prob\\\":0.011110769584774971,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.010163197293877602,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00546745490282774,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0010860268957912922,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" present\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.8807834386825562,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.8807834386825562,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.02059553936123848,\\\"masked\\\":true},{\\\"token\\\":\\\" unknown\\\",\\\"bytes\\\":\\\"IHVua25vd24=\\\",\\\"prob\\\":0.016817687079310417,\\\"masked\\\":true},{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.008015464060008526,\\\"masked\\\":true},{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.006220497190952301,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9223666191101074,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9223666191101074,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.03642881661653519,\\\"masked\\\":true},{\\\"token\\\":\\\" day\\\",\\\"bytes\\\":\\\"IGRheQ==\\\",\\\"prob\\\":0.02131376788020134,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.003520901082083583,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.003137945896014571,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Reason\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.9979571104049683,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.9979571104049683,\\\"masked\\\":false},{\\\"token\\\":\\\" Reason\\\",\\\"bytes\\\":\\\"IFJlYXNvbg==\\\",\\\"prob\\\":0.00027286517433822155,\\\"masked\\\":true},{\\\"token\\\":\\\"Sh\\\",\\\"bytes\\\":\\\"U2g=\\\",\\\"prob\\\":0.00021167690283618867,\\\"masked\\\":true},{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.00019688614702317864,\\\"masked\\\":true},{\\\"token\\\":\\\"Why\\\",\\\"bytes\\\":\\\"V2h5\\\",\\\"prob\\\":0.00009099110320676118,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ing\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.9999438524246216,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.9999438524246216,\\\"masked\\\":false},{\\\"token\\\":\\\"ning\\\",\\\"bytes\\\":\\\"bmluZw==\\\",\\\"prob\\\":0.000024938039132393897,\\\"masked\\\":true},{\\\"token\\\":\\\"s\\\",\\\"bytes\\\":\\\"cw==\\\",\\\"prob\\\":0.000011330474080750719,\\\"masked\\\":true},{\\\"token\\\":\\\"ings\\\",\\\"bytes\\\":\\\"aW5ncw==\\\",\\\"prob\\\":0.000006817960183980176,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.0000027423932351666735,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9960666298866272,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9960666298866272,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.002256058854982257,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0010122411185875535,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0001408068201271817,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.00008702532068127766,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Shakespeare\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.9160380959510803,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Shakespeare\\\",\\\"bytes\\\":\\\"IFNoYWtlc3BlYXJl\\\",\\\"prob\\\":0.9160380959510803,\\\"masked\\\":false},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.017287345603108406,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.014594434760510921,\\\"masked\\\":true},{\\\"token\\\":\\\" If\\\",\\\"bytes\\\":\\\"IElm\\\",\\\"prob\\\":0.006271423771977425,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.005919334944337606,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cannot\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" cannot\\\",\\\"bytes\\\":\\\"IGNhbm5vdA==\\\",\\\"prob\\\":0.10534162819385529,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.44448378682136536,\\\"masked\\\":true},{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.13310588896274567,\\\"masked\\\":true},{\\\"token\\\":\\\" cannot\\\",\\\"bytes\\\":\\\"IGNhbm5vdA==\\\",\\\"prob\\\":0.10534162819385529,\\\"masked\\\":false},{\\\"token\\\":\\\" couldn\\\",\\\"bytes\\\":\\\"IGNvdWxkbg==\\\",\\\"prob\\\":0.07213620841503143,\\\"masked\\\":true},{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.07022111862897873,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" have\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.23130296170711517,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" write\\\",\\\"bytes\\\":\\\"IHdyaXRl\\\",\\\"prob\\\":0.6931545734405518,\\\"masked\\\":true},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.23130296170711517,\\\"masked\\\":false},{\\\"token\\\":\\\" know\\\",\\\"bytes\\\":\\\"IGtub3c=\\\",\\\"prob\\\":0.04153207689523697,\\\"masked\\\":true},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.011829780414700508,\\\"masked\\\":true},{\\\"token\\\":\\\" possibly\\\",\\\"bytes\\\":\\\"IHBvc3NpYmx5\\\",\\\"prob\\\":0.008338862098753452,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" written\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" written\\\",\\\"bytes\\\":\\\"IHdyaXR0ZW4=\\\",\\\"prob\\\":0.9518383741378784,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" written\\\",\\\"bytes\\\":\\\"IHdyaXR0ZW4=\\\",\\\"prob\\\":0.9518383741378784,\\\"masked\\\":false},{\\\"token\\\":\\\" known\\\",\\\"bytes\\\":\\\"IGtub3du\\\",\\\"prob\\\":0.027112429961562157,\\\"masked\\\":true},{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.0037683239206671715,\\\"masked\\\":true},{\\\"token\\\":\\\" been\\\",\\\"bytes\\\":\\\"IGJlZW4=\\\",\\\"prob\\\":0.0034880226012319326,\\\"masked\\\":true},{\\\"token\\\":\\\" wrote\\\",\\\"bytes\\\":\\\"IHdyb3Rl\\\",\\\"prob\\\":0.002913812641054392,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" about\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.9935491681098938,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" about\\\",\\\"bytes\\\":\\\"IGFib3V0\\\",\\\"prob\\\":0.9935491681098938,\\\"masked\\\":false},{\\\"token\\\":\\\" anything\\\",\\\"bytes\\\":\\\"IGFueXRoaW5n\\\",\\\"prob\\\":0.0016305706230923533,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.0012745000422000885,\\\"masked\\\":true},{\\\"token\\\":\\\" something\\\",\\\"bytes\\\":\\\"IHNvbWV0aGluZw==\\\",\\\"prob\\\":0.0005308156250976026,\\\"masked\\\":true},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.00041806846274994314,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.8367180228233337,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.8367180228233337,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.045627716928720474,\\\"masked\\\":true},{\\\"token\\\":\\\" someone\\\",\\\"bytes\\\":\\\"IHNvbWVvbmU=\\\",\\\"prob\\\":0.04255916550755501,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.02722186967730522,\\\"masked\\\":true},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.016664788126945496,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.02294815704226494,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.9018900990486145,\\\"masked\\\":true},{\\\"token\\\":\\\" since\\\",\\\"bytes\\\":\\\"IHNpbmNl\\\",\\\"prob\\\":0.03186509758234024,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.02294815704226494,\\\"masked\\\":false},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.007327581290155649,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.007074258290231228,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.38639235496520996,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.38639235496520996,\\\"masked\\\":false},{\\\"token\\\":\\\" since\\\",\\\"bytes\\\":\\\"IHNpbmNl\\\",\\\"prob\\\":0.19875968992710114,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.15220262110233307,\\\"masked\\\":true},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.10411755740642548,\\\"masked\\\":true},{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.025863083079457283,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" he\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.43444278836250305,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.43444278836250305,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.4165709614753723,\\\"masked\\\":true},{\\\"token\\\":\\\" we\\\",\\\"bytes\\\":\\\"IHdl\\\",\\\"prob\\\":0.05364403873682022,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.015366432256996632,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.014482034370303154,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" died\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.33006277680397034,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.33006277680397034,\\\"masked\\\":false},{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.23626616597175598,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.20200014114379883,\\\"masked\\\":true},{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.07652290165424347,\\\"masked\\\":true},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.024563375860452652,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" before\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.10036945343017578,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" centuries\\\",\\\"bytes\\\":\\\"IGNlbnR1cmllcw==\\\",\\\"prob\\\":0.2778227925300598,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.17857059836387634,\\\"masked\\\":true},{\\\"token\\\":\\\" long\\\",\\\"bytes\\\":\\\"IGxvbmc=\\\",\\\"prob\\\":0.13326574862003326,\\\"masked\\\":true},{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.10036945343017578,\\\"masked\\\":false},{\\\"token\\\":\\\" over\\\",\\\"bytes\\\":\\\"IG92ZXI=\\\",\\\"prob\\\":0.08701474964618683,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" I\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.6180626749992371,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.6180626749992371,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.1525287628173828,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.06068668141961098,\\\"masked\\\":true},{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.05578501522541046,\\\"masked\\\":true},{\\\"token\\\":\\\" modern\\\",\\\"bytes\\\":\\\"IG1vZGVybg==\\\",\\\"prob\\\":0.025336844846606255,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" was\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.8586567044258118,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.8586567044258118,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.036483459174633026,\\\"masked\\\":true},{\\\"token\\\":\\\" existed\\\",\\\"bytes\\\":\\\"IGV4aXN0ZWQ=\\\",\\\"prob\\\":0.034267544746398926,\\\"masked\\\":true},{\\\"token\\\":\\\" exist\\\",\\\"bytes\\\":\\\"IGV4aXN0\\\",\\\"prob\\\":0.02765633352100849,\\\"masked\\\":true},{\\\"token\\\":\\\" would\\\",\\\"bytes\\\":\\\"IHdvdWxk\\\",\\\"prob\\\":0.00970376841723919,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" born\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" born\\\",\\\"bytes\\\":\\\"IGJvcm4=\\\",\\\"prob\\\":0.9774292707443237,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" born\\\",\\\"bytes\\\":\\\"IGJvcm4=\\\",\\\"prob\\\":0.9774292707443237,\\\"masked\\\":false},{\\\"token\\\":\\\" even\\\",\\\"bytes\\\":\\\"IGV2ZW4=\\\",\\\"prob\\\":0.010263092815876007,\\\"masked\\\":true},{\\\"token\\\":\\\" alive\\\",\\\"bytes\\\":\\\"IGFsaXZl\\\",\\\"prob\\\":0.005481192376464605,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0022117316257208586,\\\"masked\\\":true},{\\\"token\\\":\\\" ever\\\",\\\"bytes\\\":\\\"IGV2ZXI=\\\",\\\"prob\\\":0.0012659307103604078,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.05089021474123001,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.8203103542327881,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.05089021474123001,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.04494670405983925,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.02652435004711151,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.021298162639141083,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"An\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.997265100479126,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.997265100479126,\\\"masked\\\":false},{\\\"token\\\":\\\" An\\\",\\\"bytes\\\":\\\"IEFu\\\",\\\"prob\\\":0.0012732141185551882,\\\"masked\\\":true},{\\\"token\\\":\\\"Conclusion\\\",\\\"bytes\\\":\\\"Q29uY2x1c2lvbg==\\\",\\\"prob\\\":0.000127602499560453,\\\"masked\\\":true},{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.00012276280904188752,\\\"masked\\\":true},{\\\"token\\\":\\\"Answer\\\",\\\"bytes\\\":\\\"QW5zd2Vy\\\",\\\"prob\\\":0.00007771931268507615,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9999605417251587,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9999605417251587,\\\"masked\\\":false},{\\\"token\\\":\\\"arch\\\",\\\"bytes\\\":\\\"YXJjaA==\\\",\\\"prob\\\":0.000007760826520097908,\\\"masked\\\":true},{\\\"token\\\":\\\"anch\\\",\\\"bytes\\\":\\\"YW5jaA==\\\",\\\"prob\\\":0.000007680907401663717,\\\"masked\\\":true},{\\\"token\\\":\\\"chron\\\",\\\"bytes\\\":\\\"Y2hyb24=\\\",\\\"prob\\\":0.000006248608315218007,\\\"masked\\\":true},{\\\"token\\\":\\\"ac\\\",\\\"bytes\\\":\\\"YWM=\\\",\\\"prob\\\":0.0000042921369640680496,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9998928308486938,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9998928308486938,\\\"masked\\\":false},{\\\"token\\\":\\\"rom\\\",\\\"bytes\\\":\\\"cm9t\\\",\\\"prob\\\":0.000046066332288319245,\\\"masked\\\":true},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.00002162324744858779,\\\"masked\\\":true},{\\\"token\\\":\\\"on\\\",\\\"bytes\\\":\\\"b24=\\\",\\\"prob\\\":0.000015214667655527592,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.00001215872816828778,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9999536275863647,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9999536275863647,\\\"masked\\\":false},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.000019049497495871037,\\\"masked\\\":true},{\\\"token\\\":\\\"icism\\\",\\\"bytes\\\":\\\"aWNpc20=\\\",\\\"prob\\\":0.000006950027909624623,\\\"masked\\\":true},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.000005818263161927462,\\\"masked\\\":true},{\\\"token\\\":\\\"iasm\\\",\\\"bytes\\\":\\\"aWFzbQ==\\\",\\\"prob\\\":0.000002952401473521604,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9947581887245178,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9947581887245178,\\\"masked\\\":false},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.004295429214835167,\\\"masked\\\":true},{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.00025811733212321997,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.00019241325207985938,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.0000738756571081467,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Yes\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.9749656319618225,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.9749656319618225,\\\"masked\\\":false},{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.01891632191836834,\\\"masked\\\":true},{\\\"token\\\":\\\" yes\\\",\\\"bytes\\\":\\\"IHllcw==\\\",\\\"prob\\\":0.0029230674263089895,\\\"masked\\\":true},{\\\"token\\\":\\\" YES\\\",\\\"bytes\\\":\\\"IFlFUw==\\\",\\\"prob\\\":0.0012078991858288646,\\\"masked\\\":true},{\\\"token\\\":\\\"Yes\\\",\\\"bytes\\\":\\\"WWVz\\\",\\\"prob\\\":0.0005137170664966106,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.6426074504852295,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.6426074504852295,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.34328266978263855,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\\n\\\\n\\\",\\\"bytes\\\":\\\"CgoK\\\",\\\"prob\\\":0.004373692907392979,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\\n\\\\n\\\",\\\"bytes\\\":\\\"IAoK\\\",\\\"prob\\\":0.0020700274035334587,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.001484871725551784,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Now\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Now\\\",\\\"bytes\\\":\\\"Tm93\\\",\\\"prob\\\":0.011469349265098572,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"##\\\",\\\"bytes\\\":\\\"IyM=\\\",\\\"prob\\\":0.3117944002151489,\\\"masked\\\":true},{\\\"token\\\":\\\"This\\\",\\\"bytes\\\":\\\"VGhpcw==\\\",\\\"prob\\\":0.08624906837940216,\\\"masked\\\":true},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.06586692482233047,\\\"masked\\\":true},{\\\"token\\\":\\\"Note\\\",\\\"bytes\\\":\\\"Tm90ZQ==\\\",\\\"prob\\\":0.03886975347995758,\\\"masked\\\":true},{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":0.02693004347383976,\\\"masked\\\":true},{\\\"token\\\":\\\"Now\\\",\\\"bytes\\\":\\\"Tm93\\\",\\\"prob\\\":0.011469349265098572,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" determine\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" determine\\\",\\\"bytes\\\":\\\"IGRldGVybWluZQ==\\\",\\\"prob\\\":0.000178124028025195,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" let\\\",\\\"bytes\\\":\\\"IGxldA==\\\",\\\"prob\\\":0.25656309723854065,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.2308994084596634,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.22366906702518463,\\\"masked\\\":true},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.03236190602183342,\\\"masked\\\":true},{\\\"token\\\":\\\" we\\\",\\\"bytes\\\":\\\"IHdl\\\",\\\"prob\\\":0.02606847696006298,\\\"masked\\\":true},{\\\"token\\\":\\\" determine\\\",\\\"bytes\\\":\\\"IGRldGVybWluZQ==\\\",\\\"prob\\\":0.000178124028025195,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.40117183327674866,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":0.40117183327674866,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.2067420333623886,\\\"masked\\\":true},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.13695916533470154,\\\"masked\\\":true},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.11190462112426758,\\\"masked\\\":true},{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.040186621248722076,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.5339530110359192,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.5339530110359192,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.17343945801258087,\\\"masked\\\":true},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.07372181862592697,\\\"masked\\\":true},{\\\"token\\\":\\\" each\\\",\\\"bytes\\\":\\\"IGVhY2g=\\\",\\\"prob\\\":0.05413680523633957,\\\"masked\\\":true},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.018485799431800842,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" following\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" following\\\",\\\"bytes\\\":\\\"IGZvbGxvd2luZw==\\\",\\\"prob\\\":0.28126055002212524,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":0.4569177031517029,\\\"masked\\\":true},{\\\"token\\\":\\\" following\\\",\\\"bytes\\\":\\\"IGZvbGxvd2luZw==\\\",\\\"prob\\\":0.28126055002212524,\\\"masked\\\":false},{\\\"token\\\":\\\" given\\\",\\\"bytes\\\":\\\"IGdpdmVu\\\",\\\"prob\\\":0.1889677494764328,\\\"masked\\\":true},{\\\"token\\\":\\\" sentences\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNlcw==\\\",\\\"prob\\\":0.012588752433657646,\\\"masked\\\":true},{\\\"token\\\":\\\" input\\\",\\\"bytes\\\":\\\"IGlucHV0\\\",\\\"prob\\\":0.012095474638044834,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.0024646962992846966,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" sentences\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNlcw==\\\",\\\"prob\\\":0.5245897769927979,\\\"masked\\\":true},{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":0.40074440836906433,\\\"masked\\\":true},{\\\"token\\\":\\\" two\\\",\\\"bytes\\\":\\\"IHR3bw==\\\",\\\"prob\\\":0.01258618663996458,\\\"masked\\\":true},{\\\"token\\\":\\\" given\\\",\\\"bytes\\\":\\\"IGdpdmVu\\\",\\\"prob\\\":0.007490068208426237,\\\"masked\\\":true},{\\\"token\\\":\\\" three\\\",\\\"bytes\\\":\\\"IHRocmVl\\\",\\\"prob\\\":0.004532513674348593,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.0024646962992846966,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.8374413251876831,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.8374413251876831,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.06657065451145172,\\\"masked\\\":true},{\\\"token\\\":\\\" true\\\",\\\"bytes\\\":\\\"IHRydWU=\\\",\\\"prob\\\":0.026132969185709953,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.010172389447689056,\\\"masked\\\":true},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.004170319065451622,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.9774162173271179,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.9774162173271179,\\\"masked\\\":false},{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.010262584313750267,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0029884937684983015,\\\"masked\\\":true},{\\\"token\\\":\\\" An\\\",\\\"bytes\\\":\\\"IEFu\\\",\\\"prob\\\":0.0012065675109624863,\\\"masked\\\":true},{\\\"token\\\":\\\" instance\\\",\\\"bytes\\\":\\\"IGluc3RhbmNl\\\",\\\"prob\\\":0.0007116392953321338,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9988929629325867,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9988929629325867,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0008579161949455738,\\\"masked\\\":true},{\\\"token\\\":\\\"ac\\\",\\\"bytes\\\":\\\"YWM=\\\",\\\"prob\\\":0.00006581746856682003,\\\"masked\\\":true},{\\\"token\\\":\\\"agram\\\",\\\"bytes\\\":\\\"YWdyYW0=\\\",\\\"prob\\\":0.000026027177227661014,\\\"masked\\\":true},{\\\"token\\\":\\\"chron\\\",\\\"bytes\\\":\\\"Y2hyb24=\\\",\\\"prob\\\":0.000018626951714395545,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9985421895980835,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9985421895980835,\\\"masked\\\":false},{\\\"token\\\":\\\"rom\\\",\\\"bytes\\\":\\\"cm9t\\\",\\\"prob\\\":0.001347173354588449,\\\"masked\\\":true},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.000039351572922896594,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.000023180724383564666,\\\"masked\\\":true},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.000006412007678591181,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9983391761779785,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9983391761779785,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.0005679163732565939,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.0004391163238324225,\\\"masked\\\":true},{\\\"token\\\":\\\"im\\\",\\\"bytes\\\":\\\"aW0=\\\",\\\"prob\\\":0.00008121673454297706,\\\"masked\\\":true},{\\\"token\\\":\\\"icism\\\",\\\"bytes\\\":\\\"aWNpc20=\\\",\\\"prob\\\":0.00007962057134136558,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.14174877107143402,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.35422852635383606,\\\"masked\\\":true},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.26750507950782776,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.14174877107143402,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0457875095307827,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.041543472558259964,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.0399717316031456,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.13053910434246063,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.05742085725069046,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\\\\"The\\\",\\\"bytes\\\":\\\"IlRoZQ==\\\",\\\"prob\\\":0.044417500495910645,\\\"masked\\\":true},{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":0.0399717316031456,\\\"masked\\\":false},{\\\"token\\\":\\\" Sentence\\\",\\\"bytes\\\":\\\"IFNlbnRlbmNl\\\",\\\"prob\\\":0.03854869678616524,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9542075991630554,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9542075991630554,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.022478938102722168,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.005523140542209148,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.002865602495148778,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0013237243983894587,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.13291461765766144,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.13291461765766144,\\\"masked\\\":false},{\\\"token\\\":\\\" Albert\\\",\\\"bytes\\\":\\\"IEFsYmVydA==\\\",\\\"prob\\\":0.06302040815353394,\\\"masked\\\":true},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.06289492547512054,\\\"masked\\\":true},{\\\"token\\\":\\\" Einstein\\\",\\\"bytes\\\":\\\"IEVpbnN0ZWlu\\\",\\\"prob\\\":0.056446000933647156,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.036929089576005936,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" T\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.0004941493971273303,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Beatles\\\",\\\"bytes\\\":\\\"IEJlYXRsZXM=\\\",\\\"prob\\\":0.03923250362277031,\\\"masked\\\":true},{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.03063366375863552,\\\"masked\\\":true},{\\\"token\\\":\\\" company\\\",\\\"bytes\\\":\\\"IGNvbXBhbnk=\\\",\\\"prob\\\":0.021854490041732788,\\\"masked\\\":true},{\\\"token\\\":\\\" Wright\\\",\\\"bytes\\\":\\\"IFdyaWdodA==\\\",\\\"prob\\\":0.011244460940361023,\\\"masked\\\":true},{\\\"token\\\":\\\" Great\\\",\\\"bytes\\\":\\\"IEdyZWF0\\\",\\\"prob\\\":0.00926070287823677,\\\"masked\\\":true},{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.0004941493971273303,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-R\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.11926638334989548,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ARD\\\",\\\"bytes\\\":\\\"QVJE\\\",\\\"prob\\\":0.19643403589725494,\\\"masked\\\":true},{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.11926638334989548,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.07300585508346558,\\\"masked\\\":true},{\\\"token\\\":\\\"ard\\\",\\\"bytes\\\":\\\"YXJk\\\",\\\"prob\\\":0.029945800080895424,\\\"masked\\\":true},{\\\"token\\\":\\\"IT\\\",\\\"bytes\\\":\\\"SVQ=\\\",\\\"prob\\\":0.02337750606238842,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ex\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9990146160125732,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9990146160125732,\\\"masked\\\":false},{\\\"token\\\":\\\"ext\\\",\\\"bytes\\\":\\\"ZXh0\\\",\\\"prob\\\":0.0002138809213647619,\\\"masked\\\":true},{\\\"token\\\":\\\"aptor\\\",\\\"bytes\\\":\\\"YXB0b3I=\\\",\\\"prob\\\":0.0001907790283439681,\\\"masked\\\":true},{\\\"token\\\":\\\" Rex\\\",\\\"bytes\\\":\\\"IFJleA==\\\",\\\"prob\\\":0.00011548743350431323,\\\"masked\\\":true},{\\\"token\\\":\\\"ix\\\",\\\"bytes\\\":\\\"aXg=\\\",\\\"prob\\\":0.00003966739677707665,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" bit\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" bit\\\",\\\"bytes\\\":\\\"IGJpdA==\\\",\\\"prob\\\":0.0038556258659809828,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.10489052534103394,\\\"masked\\\":true},{\\\"token\\\":\\\" ate\\\",\\\"bytes\\\":\\\"IGF0ZQ==\\\",\\\"prob\\\":0.09145756810903549,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.04564519226551056,\\\"masked\\\":true},{\\\"token\\\":\\\" ro\\\",\\\"bytes\\\":\\\"IHJv\\\",\\\"prob\\\":0.04090017080307007,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.03718020021915436,\\\"masked\\\":true},{\\\"token\\\":\\\" bit\\\",\\\"bytes\\\":\\\"IGJpdA==\\\",\\\"prob\\\":0.0038556258659809828,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" my\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.21695460379123688,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.41438528895378113,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.21695460379123688,\\\"masked\\\":false},{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.11142632365226746,\\\"masked\\\":true},{\\\"token\\\":\\\" his\\\",\\\"bytes\\\":\\\"IGhpcw==\\\",\\\"prob\\\":0.029236072674393654,\\\"masked\\\":true},{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.025742124766111374,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dog\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.04280940443277359,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" brother\\\",\\\"bytes\\\":\\\"IGJyb3RoZXI=\\\",\\\"prob\\\":0.1691124439239502,\\\"masked\\\":true},{\\\"token\\\":\\\" friend\\\",\\\"bytes\\\":\\\"IGZyaWVuZA==\\\",\\\"prob\\\":0.10965479165315628,\\\"masked\\\":true},{\\\"token\\\":\\\" sister\\\",\\\"bytes\\\":\\\"IHNpc3Rlcg==\\\",\\\"prob\\\":0.09058474004268646,\\\"masked\\\":true},{\\\"token\\\":\\\" head\\\",\\\"bytes\\\":\\\"IGhlYWQ=\\\",\\\"prob\\\":0.06358285248279572,\\\"masked\\\":true},{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.04280940443277359,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.531958818435669,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.531958818435669,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.16230620443820953,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.10278265178203583,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.03950684890151024,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.02790224738419056,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.9929835796356201,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Entities\\\",\\\"bytes\\\":\\\"RW50aXRpZXM=\\\",\\\"prob\\\":0.9929835796356201,\\\"masked\\\":false},{\\\"token\\\":\\\"Entity\\\",\\\"bytes\\\":\\\"RW50aXR5\\\",\\\"prob\\\":0.0007379434537142515,\\\"masked\\\":true},{\\\"token\\\":\\\"entities\\\",\\\"bytes\\\":\\\"ZW50aXRpZXM=\\\",\\\"prob\\\":0.00042693494469858706,\\\"masked\\\":true},{\\\"token\\\":\\\" Entities\\\",\\\"bytes\\\":\\\"IEVudGl0aWVz\\\",\\\"prob\\\":0.0004151493776589632,\\\"masked\\\":true},{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.00037977524334564805,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9931100606918335,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9931100606918335,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.002754042623564601,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.0020157424733042717,\\\"masked\\\":true},{\\\"token\\\":\\\" involved\\\",\\\"bytes\\\":\\\"IGludm9sdmVk\\\",\\\"prob\\\":0.00042855425272136927,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00016891403356567025,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dates\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.293278882062874,\\\"token\\\":{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.9981052875518799,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.9981052875518799,\\\"masked\\\":false},{\\\"token\\\":\\\" Dates\\\",\\\"bytes\\\":\\\"IERhdGVz\\\",\\\"prob\\\":0.0011328521650284529,\\\"masked\\\":true},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.0002558101841714233,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00006149271212052554,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0000299820167128928,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2161.8562494404614,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.9911577105522156,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.9911577105522156,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.002879626117646694,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.0024447229225188494,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0012019142741337419,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0007216834928840399,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"T\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.8627077229321,\\\"token\\\":{\\\"token\\\":\\\"T\\\",\\\"bytes\\\":\\\"VA==\\\",\\\"prob\\\":0.5018469095230103,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"T\\\",\\\"bytes\\\":\\\"VA==\\\",\\\"prob\\\":0.5018469095230103,\\\"masked\\\":false},{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.4403623044490814,\\\"masked\\\":false},{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.022138318046927452,\\\"masked\\\":false},{\\\"token\\\":\\\"My\\\",\\\"bytes\\\":\\\"TXk=\\\",\\\"prob\\\":0.004671414382755756,\\\"masked\\\":false},{\\\"token\\\":\\\"Me\\\",\\\"bytes\\\":\\\"TWU=\\\",\\\"prob\\\":0.003448143135756254,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-R\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":38.025666028261185,\\\"token\\\":{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.9541599750518799,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.9541599750518799,\\\"masked\\\":false},{\\\"token\\\":\\\" Rex\\\",\\\"bytes\\\":\\\"IFJleA==\\\",\\\"prob\\\":0.02871180698275566,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.003095403080806136,\\\"masked\\\":false},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0030042275320738554,\\\"masked\\\":false},{\\\"token\\\":\\\" R\\\",\\\"bytes\\\":\\\"IFI=\\\",\\\"prob\\\":0.0028037941083312035,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ex\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.52745918184519,\\\"token\\\":{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9997597336769104,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9997597336769104,\\\"masked\\\":false},{\\\"token\\\":\\\" Rex\\\",\\\"bytes\\\":\\\"IFJleA==\\\",\\\"prob\\\":0.0001076401531463489,\\\"masked\\\":false},{\\\"token\\\":\\\"x\\\",\\\"bytes\\\":\\\"eA==\\\",\\\"prob\\\":0.00005612124004983343,\\\"masked\\\":false},{\\\"token\\\":\\\"Ex\\\",\\\"bytes\\\":\\\"RXg=\\\",\\\"prob\\\":0.000017821952496888116,\\\"masked\\\":false},{\\\"token\\\":\\\"exas\\\",\\\"bytes\\\":\\\"ZXhhcw==\\\",\\\"prob\\\":0.00000993525918602245,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.762208927422762,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9409223794937134,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9409223794937134,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.02627413347363472,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.01991524174809456,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.006305082235485315,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0009996021399274468,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.063457787036896,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.37151965498924255,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.37151965498924255,\\\"masked\\\":false},{\\\"token\\\":\\\" pre\\\",\\\"bytes\\\":\\\"IHByZQ==\\\",\\\"prob\\\":0.14743050932884216,\\\"masked\\\":false},{\\\"token\\\":\\\" Mes\\\",\\\"bytes\\\":\\\"IE1lcw==\\\",\\\"prob\\\":0.08217662572860718,\\\"masked\\\":false},{\\\"token\\\":\\\" extinct\\\",\\\"bytes\\\":\\\"IGV4dGluY3Q=\\\",\\\"prob\\\":0.03918709605932236,\\\"masked\\\":false},{\\\"token\\\":\\\" Tri\\\",\\\"bytes\\\":\\\"IFRyaQ==\\\",\\\"prob\\\":0.027418147772550583,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"65\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.845333356410265,\\\"token\\\":{\\\"token\\\":\\\"65\\\",\\\"bytes\\\":\\\"NjU=\\\",\\\"prob\\\":0.696042001247406,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"65\\\",\\\"bytes\\\":\\\"NjU=\\\",\\\"prob\\\":0.696042001247406,\\\"masked\\\":false},{\\\"token\\\":\\\"70\\\",\\\"bytes\\\":\\\"NzA=\\\",\\\"prob\\\":0.09675145149230957,\\\"masked\\\":false},{\\\"token\\\":\\\"68\\\",\\\"bytes\\\":\\\"Njg=\\\",\\\"prob\\\":0.07288515567779541,\\\"masked\\\":false},{\\\"token\\\":\\\"66\\\",\\\"bytes\\\":\\\"NjY=\\\",\\\"prob\\\":0.017329763621091843,\\\"masked\\\":false},{\\\"token\\\":\\\"20\\\",\\\"bytes\\\":\\\"MjA=\\\",\\\"prob\\\":0.013311174698174,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" million\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.611875001341105,\\\"token\\\":{\\\"token\\\":\\\" million\\\",\\\"bytes\\\":\\\"IG1pbGxpb24=\\\",\\\"prob\\\":0.7865715622901917,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" million\\\",\\\"bytes\\\":\\\"IG1pbGxpb24=\\\",\\\"prob\\\":0.7865715622901917,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.08043599128723145,\\\"masked\\\":false},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.021778518334031105,\\\"masked\\\":false},{\\\"token\\\":\\\" Million\\\",\\\"bytes\\\":\\\"IE1pbGxpb24=\\\",\\\"prob\\\":0.00970774982124567,\\\"masked\\\":false},{\\\"token\\\":\\\"my\\\",\\\"bytes\\\":\\\"bXk=\\\",\\\"prob\\\":0.009168972261250019,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" years\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":32.69491670653224,\\\"token\\\":{\\\"token\\\":\\\" years\\\",\\\"bytes\\\":\\\"IHllYXJz\\\",\\\"prob\\\":0.8681090474128723,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" years\\\",\\\"bytes\\\":\\\"IHllYXJz\\\",\\\"prob\\\":0.8681090474128723,\\\"masked\\\":false},{\\\"token\\\":\\\" year\\\",\\\"bytes\\\":\\\"IHllYXI=\\\",\\\"prob\\\":0.055738434195518494,\\\"masked\\\":false},{\\\"token\\\":\\\" BCE\\\",\\\"bytes\\\":\\\"IEJDRQ==\\\",\\\"prob\\\":0.025598034262657166,\\\"masked\\\":false},{\\\"token\\\":\\\" BC\\\",\\\"bytes\\\":\\\"IEJD\\\",\\\"prob\\\":0.016678767278790474,\\\"masked\\\":false},{\\\"token\\\":\\\" yrs\\\",\\\"bytes\\\":\\\"IHlycw==\\\",\\\"prob\\\":0.008928012102842331,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ago\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":31.015458051115274,\\\"token\\\":{\\\"token\\\":\\\" ago\\\",\\\"bytes\\\":\\\"IGFnbw==\\\",\\\"prob\\\":0.8087046146392822,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" ago\\\",\\\"bytes\\\":\\\"IGFnbw==\\\",\\\"prob\\\":0.8087046146392822,\\\"masked\\\":false},{\\\"token\\\":\\\" old\\\",\\\"bytes\\\":\\\"IG9sZA==\\\",\\\"prob\\\":0.1251843422651291,\\\"masked\\\":false},{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.023115381598472595,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.010313790291547775,\\\"masked\\\":false},{\\\"token\\\":\\\" past\\\",\\\"bytes\\\":\\\"IHBhc3Q=\\\",\\\"prob\\\":0.00601605512201786,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":32.59112499654293,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.7571262121200562,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.7571262121200562,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.13672877848148346,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.025570489466190338,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.020326776430010796,\\\"masked\\\":false},{\\\"token\\\":\\\" extinct\\\",\\\"bytes\\\":\\\"IGV4dGluY3Q=\\\",\\\"prob\\\":0.009731385856866837,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"I\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":31.734874937683344,\\\"token\\\":{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.37713688611984253,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"I\\\",\\\"bytes\\\":\\\"SQ==\\\",\\\"prob\\\":0.37713688611984253,\\\"masked\\\":false},{\\\"token\\\":\\\"Dog\\\",\\\"bytes\\\":\\\"RG9n\\\",\\\"prob\\\":0.20902134478092194,\\\"masked\\\":false},{\\\"token\\\":\\\"My\\\",\\\"bytes\\\":\\\"TXk=\\\",\\\"prob\\\":0.14062073826789856,\\\"masked\\\":false},{\\\"token\\\":\\\"You\\\",\\\"bytes\\\":\\\"WW91\\\",\\\"prob\\\":0.09082327038049698,\\\"masked\\\":false},{\\\"token\\\":\\\"Me\\\",\\\"bytes\\\":\\\"TWU=\\\",\\\"prob\\\":0.046495962888002396,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":33.07662485167384,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9702985286712646,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.9702985286712646,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.008601672947406769,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.005837092641741037,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.003459458239376545,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0022920705378055573,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" present\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":32.278293278068304,\\\"token\\\":{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.9743433594703674,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.9743433594703674,\\\"masked\\\":false},{\\\"token\\\":\\\" Present\\\",\\\"bytes\\\":\\\"IFByZXNlbnQ=\\\",\\\"prob\\\":0.004749036394059658,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.004697675816714764,\\\"masked\\\":false},{\\\"token\\\":\\\" unknown\\\",\\\"bytes\\\":\\\"IHVua25vd24=\\\",\\\"prob\\\":0.003308570710942149,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0008959432016126812,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.634833965450525,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9566860795021057,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9566860795021057,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.017597809433937073,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.01427222229540348,\\\"masked\\\":false},{\\\"token\\\":\\\" day\\\",\\\"bytes\\\":\\\"IGRheQ==\\\",\\\"prob\\\":0.004020807798951864,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0015099931042641401,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Reason\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":37.99544461071491,\\\"token\\\":{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.6839824914932251,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Reason\\\",\\\"bytes\\\":\\\"UmVhc29u\\\",\\\"prob\\\":0.6839824914932251,\\\"masked\\\":false},{\\\"token\\\":\\\"Dog\\\",\\\"bytes\\\":\\\"RG9n\\\",\\\"prob\\\":0.19991087913513184,\\\"masked\\\":true},{\\\"token\\\":\\\"My\\\",\\\"bytes\\\":\\\"TXk=\\\",\\\"prob\\\":0.05169816315174103,\\\"masked\\\":true},{\\\"token\\\":\\\"dog\\\",\\\"bytes\\\":\\\"ZG9n\\\",\\\"prob\\\":0.024877116084098816,\\\"masked\\\":true},{\\\"token\\\":\\\"D\\\",\\\"bytes\\\":\\\"RA==\\\",\\\"prob\\\":0.007532925345003605,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ing\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":37.99544461071491,\\\"token\\\":{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.9994937181472778,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.9994937181472778,\\\"masked\\\":false},{\\\"token\\\":\\\"ings\\\",\\\"bytes\\\":\\\"aW5ncw==\\\",\\\"prob\\\":0.0002518964756745845,\\\"masked\\\":true},{\\\"token\\\":\\\"ning\\\",\\\"bytes\\\":\\\"bmluZw==\\\",\\\"prob\\\":0.000053211442718748,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.00003964957795687951,\\\"masked\\\":true},{\\\"token\\\":\\\"s\\\",\\\"bytes\\\":\\\"cw==\\\",\\\"prob\\\":0.00003342263516969979,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" :\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.47395795956254,\\\"token\\\":{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0007106164703145623,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9283185005187988,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.06292705982923508,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.0038272507954388857,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0007837143493816257,\\\"masked\\\":true},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.0007106164703145623,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.75229127332568,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.42780306935310364,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.42780306935310364,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.1339738368988037,\\\"masked\\\":false},{\\\"token\\\":\\\" Since\\\",\\\"bytes\\\":\\\"IFNpbmNl\\\",\\\"prob\\\":0.07026984542608261,\\\"masked\\\":false},{\\\"token\\\":\\\" Because\\\",\\\"bytes\\\":\\\"IEJlY2F1c2U=\\\",\\\"prob\\\":0.05369478836655617,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.048836030066013336,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" T\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.13570823147893,\\\"token\\\":{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.9167646169662476,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.9167646169662476,\\\"masked\\\":false},{\\\"token\\\":\\\" Tyr\\\",\\\"bytes\\\":\\\"IFR5cg==\\\",\\\"prob\\\":0.007838123477995396,\\\"masked\\\":false},{\\\"token\\\":\\\" reason\\\",\\\"bytes\\\":\\\"IHJlYXNvbg==\\\",\\\"prob\\\":0.005909099243581295,\\\"masked\\\":false},{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.005642234813421965,\\\"masked\\\":false},{\\\"token\\\":\\\" t\\\",\\\"bytes\\\":\\\"IHQ=\\\",\\\"prob\\\":0.004272778052836657,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-R\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.16016709059477,\\\"token\\\":{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.9633404612541199,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.9633404612541199,\\\"masked\\\":false},{\\\"token\\\":\\\" Rex\\\",\\\"bytes\\\":\\\"IFJleA==\\\",\\\"prob\\\":0.03054744005203247,\\\"masked\\\":false},{\\\"token\\\":\\\" R\\\",\\\"bytes\\\":\\\"IFI=\\\",\\\"prob\\\":0.0011495666112750769,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.0011137265246361494,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.0008993961964733899,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ex\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.455791994929314,\\\"token\\\":{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9998830556869507,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9998830556869507,\\\"masked\\\":false},{\\\"token\\\":\\\"x\\\",\\\"bytes\\\":\\\"eA==\\\",\\\"prob\\\":0.00007828989328118041,\\\"masked\\\":false},{\\\"token\\\":\\\"Ex\\\",\\\"bytes\\\":\\\"RXg=\\\",\\\"prob\\\":0.000009646177204558626,\\\"masked\\\":false},{\\\"token\\\":\\\"ix\\\",\\\"bytes\\\":\\\"aXg=\\\",\\\"prob\\\":0.000005189498551771976,\\\"masked\\\":false},{\\\"token\\\":\\\"ox\\\",\\\"bytes\\\":\\\"b3g=\\\",\\\"prob\\\":0.0000033345263545925263,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.782625682651997,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.22361546754837036,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.22361546754837036,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.20555444061756134,\\\"masked\\\":false},{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.10319852083921432,\\\"masked\\\":false},{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.09723937511444092,\\\"masked\\\":false},{\\\"token\\\":\\\" cannot\\\",\\\"bytes\\\":\\\"IGNhbm5vdA==\\\",\\\"prob\\\":0.08832139521837234,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" extinct\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.95058272406459,\\\"token\\\":{\\\"token\\\":\\\" extinct\\\",\\\"bytes\\\":\\\"IGV4dGluY3Q=\\\",\\\"prob\\\":0.6504307389259338,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" extinct\\\",\\\"bytes\\\":\\\"IGV4dGluY3Q=\\\",\\\"prob\\\":0.6504307389259338,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.09775707125663757,\\\"masked\\\":false},{\\\"token\\\":\\\" long\\\",\\\"bytes\\\":\\\"IGxvbmc=\\\",\\\"prob\\\":0.053190167993307114,\\\"masked\\\":false},{\\\"token\\\":\\\" dead\\\",\\\"bytes\\\":\\\"IGRlYWQ=\\\",\\\"prob\\\":0.05256296321749687,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.03823690488934517,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.699791990220547,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.39336010813713074,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.39336010813713074,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.32405340671539307,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.052345920354127884,\\\"masked\\\":false},{\\\"token\\\":\\\" so\\\",\\\"bytes\\\":\\\"IHNv\\\",\\\"prob\\\":0.037729036062955856,\\\"masked\\\":false},{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.030468706041574478,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" could\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.846416156738997,\\\"token\\\":{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.19037605822086334,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.19037605822086334,\\\"masked\\\":false},{\\\"token\\\":\\\" therefore\\\",\\\"bytes\\\":\\\"IHRoZXJlZm9yZQ==\\\",\\\"prob\\\":0.17870910465717316,\\\"masked\\\":false},{\\\"token\\\":\\\" cannot\\\",\\\"bytes\\\":\\\"IGNhbm5vdA==\\\",\\\"prob\\\":0.1682852953672409,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.1510659158229828,\\\"masked\\\":false},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.04238128289580345,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" not\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.420834336429834,\\\"token\\\":{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.9621198177337646,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.9621198177337646,\\\"masked\\\":false},{\\\"token\\\":\\\" never\\\",\\\"bytes\\\":\\\"IG5ldmVy\\\",\\\"prob\\\":0.017179254442453384,\\\"masked\\\":false},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.009947692975401878,\\\"masked\\\":false},{\\\"token\\\":\\\" only\\\",\\\"bytes\\\":\\\"IG9ubHk=\\\",\\\"prob\\\":0.003233419731259346,\\\"masked\\\":false},{\\\"token\\\":\\\" therefore\\\",\\\"bytes\\\":\\\"IHRoZXJlZm9yZQ==\\\",\\\"prob\\\":0.001928455545566976,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" have\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.022667091339827,\\\"token\\\":{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.8550111651420593,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.8550111651420593,\\\"masked\\\":false},{\\\"token\\\":\\\" bite\\\",\\\"bytes\\\":\\\"IGJpdGU=\\\",\\\"prob\\\":0.08656521886587143,\\\"masked\\\":false},{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.015491009689867496,\\\"masked\\\":false},{\\\"token\\\":\\\" exist\\\",\\\"bytes\\\":\\\"IGV4aXN0\\\",\\\"prob\\\":0.015047198161482811,\\\"masked\\\":false},{\\\"token\\\":\\\" possibly\\\",\\\"bytes\\\":\\\"IHBvc3NpYmx5\\\",\\\"prob\\\":0.010289539583027363,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" bitten\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.24541709944606,\\\"token\\\":{\\\"token\\\":\\\" bitten\\\",\\\"bytes\\\":\\\"IGJpdHRlbg==\\\",\\\"prob\\\":0.7605974078178406,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" bitten\\\",\\\"bytes\\\":\\\"IGJpdHRlbg==\\\",\\\"prob\\\":0.7605974078178406,\\\"masked\\\":false},{\\\"token\\\":\\\" bit\\\",\\\"bytes\\\":\\\"IGJpdA==\\\",\\\"prob\\\":0.13648182153701782,\\\"masked\\\":false},{\\\"token\\\":\\\" existed\\\",\\\"bytes\\\":\\\"IGV4aXN0ZWQ=\\\",\\\"prob\\\":0.03507979214191437,\\\"masked\\\":false},{\\\"token\\\":\\\" interact\\\",\\\"bytes\\\":\\\"IGludGVyYWN0\\\",\\\"prob\\\":0.018285583704710007,\\\"masked\\\":false},{\\\"token\\\":\\\" been\\\",\\\"bytes\\\":\\\"IGJlZW4=\\\",\\\"prob\\\":0.009908041916787624,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" my\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.163083992898464,\\\"token\\\":{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.7072262763977051,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.7072262763977051,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.05411681532859802,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.0517948716878891,\\\"masked\\\":false},{\\\"token\\\":\\\" anyone\\\",\\\"bytes\\\":\\\"IGFueW9uZQ==\\\",\\\"prob\\\":0.04980922117829323,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.046539273113012314,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dog\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.640542179346085,\\\"token\\\":{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.9943233728408813,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.9943233728408813,\\\"masked\\\":false},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.002868551993742585,\\\"masked\\\":false},{\\\"token\\\":\\\" modern\\\",\\\"bytes\\\":\\\"IG1vZGVybg==\\\",\\\"prob\\\":0.0005348302656784654,\\\"masked\\\":false},{\\\"token\\\":\\\" current\\\",\\\"bytes\\\":\\\"IGN1cnJlbnQ=\\\",\\\"prob\\\":0.00042428888264112175,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.00041417256579734385,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.774375095963478,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.21145053207874298,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.21145053207874298,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.1673097461462021,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.1464247703552246,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.13270476460456848,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.1198800802230835,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.398958198726177,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.24669358134269714,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.24669358134269714,\\\"masked\\\":false},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.234675794839859,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.23353049159049988,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.09048731625080109,\\\"masked\\\":false},{\\\"token\\\":\\\" he\\\",\\\"bytes\\\":\\\"IGhl\\\",\\\"prob\\\":0.030576495453715324,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" died\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.346584178507328,\\\"token\\\":{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.3333878517150879,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" died\\\",\\\"bytes\\\":\\\"IGRpZWQ=\\\",\\\"prob\\\":0.3333878517150879,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.15538345277309418,\\\"masked\\\":false},{\\\"token\\\":\\\" lived\\\",\\\"bytes\\\":\\\"IGxpdmVk\\\",\\\"prob\\\":0.13804389536380768,\\\"masked\\\":false},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.119652658700943,\\\"masked\\\":false},{\\\"token\\\":\\\" did\\\",\\\"bytes\\\":\\\"IGRpZA==\\\",\\\"prob\\\":0.04037339612841606,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" before\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.24583277106285,\\\"token\\\":{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.2826552987098694,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" before\\\",\\\"bytes\\\":\\\"IGJlZm9yZQ==\\\",\\\"prob\\\":0.2826552987098694,\\\"masked\\\":false},{\\\"token\\\":\\\" out\\\",\\\"bytes\\\":\\\"IG91dA==\\\",\\\"prob\\\":0.17645591497421265,\\\"masked\\\":false},{\\\"token\\\":\\\" long\\\",\\\"bytes\\\":\\\"IGxvbmc=\\\",\\\"prob\\\":0.12466240674257278,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.10166637599468231,\\\"masked\\\":false},{\\\"token\\\":\\\" millions\\\",\\\"bytes\\\":\\\"IG1pbGxpb25z\\\",\\\"prob\\\":0.09589314460754395,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" I\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.391624499112368,\\\"token\\\":{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.4307050406932831,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.4307050406932831,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.16905300319194794,\\\"masked\\\":false},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.14662641286849976,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.05491876229643822,\\\"masked\\\":false},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.051494963467121124,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" was\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.154916923493147,\\\"token\\\":{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.926587700843811,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.926587700843811,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.015114382840692997,\\\"masked\\\":false},{\\\"token\\\":\\\" existed\\\",\\\"bytes\\\":\\\"IGV4aXN0ZWQ=\\\",\\\"prob\\\":0.009578029625117779,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.007495002821087837,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.006617055274546146,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" born\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.11937516182661,\\\"token\\\":{\\\"token\\\":\\\" born\\\",\\\"bytes\\\":\\\"IGJvcm4=\\\",\\\"prob\\\":0.9778945446014404,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" born\\\",\\\"bytes\\\":\\\"IGJvcm4=\\\",\\\"prob\\\":0.9778945446014404,\\\"masked\\\":false},{\\\"token\\\":\\\" alive\\\",\\\"bytes\\\":\\\"IGFsaXZl\\\",\\\"prob\\\":0.012502225115895271,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.0030053453519940376,\\\"masked\\\":false},{\\\"token\\\":\\\" even\\\",\\\"bytes\\\":\\\"IGV2ZW4=\\\",\\\"prob\\\":0.002211387734860182,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.0004384198982734233,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"An\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.8805197477340698,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.8805197477340698,\\\"masked\\\":false},{\\\"token\\\":\\\" An\\\",\\\"bytes\\\":\\\"IEFu\\\",\\\"prob\\\":0.04441205412149429,\\\"masked\\\":true},{\\\"token\\\":\\\"Therefore\\\",\\\"bytes\\\":\\\"VGhlcmVmb3Jl\\\",\\\"prob\\\":0.01231373194605112,\\\"masked\\\":true},{\\\"token\\\":\\\"Conclusion\\\",\\\"bytes\\\":\\\"Q29uY2x1c2lvbg==\\\",\\\"prob\\\":0.005089646205306053,\\\"masked\\\":true},{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.004764616023749113,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9992524981498718,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9992524981498718,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0004873193975072354,\\\"masked\\\":true},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":0.00003134377402602695,\\\"masked\\\":true},{\\\"token\\\":\\\"chron\\\",\\\"bytes\\\":\\\"Y2hyb24=\\\",\\\"prob\\\":0.00002173197572119534,\\\"masked\\\":true},{\\\"token\\\":\\\"ac\\\",\\\"bytes\\\":\\\"YWM=\\\",\\\"prob\\\":0.00002160344592994079,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9977447986602783,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9977447986602783,\\\"masked\\\":false},{\\\"token\\\":\\\"rom\\\",\\\"bytes\\\":\\\"cm9t\\\",\\\"prob\\\":0.0010805660858750343,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.00034040972241200507,\\\"masked\\\":true},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.0002132341469405219,\\\"masked\\\":true},{\\\"token\\\":\\\"rist\\\",\\\"bytes\\\":\\\"cmlzdA==\\\",\\\"prob\\\":0.0001964686089195311,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.999651312828064,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.999651312828064,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.0000933095216169022,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.00006071766256354749,\\\"masked\\\":true},{\\\"token\\\":\\\"icism\\\",\\\"bytes\\\":\\\"aWNpc20=\\\",\\\"prob\\\":0.0000501979302498512,\\\"masked\\\":true},{\\\"token\\\":\\\"iasm\\\",\\\"bytes\\\":\\\"aWFzbQ==\\\",\\\"prob\\\":0.000026935489586321637,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4543611624588569,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8257356286048889,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8257356286048889,\\\"masked\\\":false},{\\\"token\\\":\\\" :\\\",\\\"bytes\\\":\\\"IDo=\\\",\\\"prob\\\":0.16950874030590057,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0005742009961977601,\\\"masked\\\":true},{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.0004225228331051767,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.00041926075937226415,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Yes\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":232.7321250922978,\\\"token\\\":{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.9385950565338135,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.9385950565338135,\\\"masked\\\":false},{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.03636212646961212,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.005907997954636812,\\\"masked\\\":false},{\\\"token\\\":\\\" YES\\\",\\\"bytes\\\":\\\"IFlFUw==\\\",\\\"prob\\\":0.004847538657486439,\\\"masked\\\":true},{\\\"token\\\":\\\" yes\\\",\\\"bytes\\\":\\\"IHllcw==\\\",\\\"prob\\\":0.0029360789339989424,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":41,\\\"token reduction\\\":2.380952380952381,\\\"avg latency\\\":97.06424999361236,\\\"cpu\\\":[0.58625,0.58625,0.4732499999999999,0.4732499999999999,0.8251875],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":48.77445983886719,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":413,\\\"backtrackCount\\\":4,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"5cbac39aa5a54fd6bf291b709caa29eb\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"7f989b15faf04a7999bfb0633f9c7dac\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":88213,\\\"last_trace_id\\\":74234,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_5cbac39aa5a54fd6bf291b709caa29eb\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"Given\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"Given\\\",\\\"bytes\\\":\\\"R2l2ZW4=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" tell\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" tell\\\",\\\"bytes\\\":\\\"IHRlbGw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" contains\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" contains\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5z\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"i\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"i\\\",\\\"bytes\\\":\\\"aQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".e\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\".e\\\",\\\"bytes\\\":\\\"LmU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" could\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" have\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" happened\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" happened\\\",\\\"bytes\\\":\\\"IGhhcHBlbmVk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"not\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"not\\\",\\\"bytes\\\":\\\"bm90\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" based\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" based\\\",\\\"bytes\\\":\\\"IGJhc2Vk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" on\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" time\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" periods\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" periods\\\",\\\"bytes\\\":\\\"IHBlcmlvZHM=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" associated\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" entities\\\",\\\"bytes\\\":\\\"IGVudGl0aWVz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\").\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\").\\\\n\\\\n\\\",\\\"bytes\\\":\\\"KS4KCg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7992547154426575,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7992547154426575,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.07562491297721863,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.0309875700622797,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00936861988157034,\\\"masked\\\":true},{\\\"token\\\":\\\" =\\\",\\\"bytes\\\":\\\"ID0=\\\",\\\"prob\\\":0.00901778507977724,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Dr\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" Dr\\\",\\\"bytes\\\":\\\"IERy\\\",\\\"prob\\\":0.00036537207779474556,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.606555700302124,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.08651454746723175,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.04727296903729439,\\\"masked\\\":true},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.04620727524161339,\\\"masked\\\":true},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.02866034023463726,\\\"masked\\\":true},{\\\"token\\\":\\\" Dr\\\",\\\"bytes\\\":\\\"IERy\\\",\\\"prob\\\":0.00036537207779474556,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9096581339836121,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9096581339836121,\\\"masked\\\":false},{\\\"token\\\":\\\"acula\\\",\\\"bytes\\\":\\\"YWN1bGE=\\\",\\\"prob\\\":0.014662239700555801,\\\"masked\\\":true},{\\\"token\\\":\\\"unk\\\",\\\"bytes\\\":\\\"dW5r\\\",\\\"prob\\\":0.004175885580480099,\\\"masked\\\":true},{\\\"token\\\":\\\" Pepper\\\",\\\"bytes\\\":\\\"IFBlcHBlcg==\\\",\\\"prob\\\":0.0021116535644978285,\\\"masked\\\":true},{\\\"token\\\":\\\"aper\\\",\\\"bytes\\\":\\\"YXBlcg==\\\",\\\"prob\\\":0.0020423484966158867,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Elizabeth\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" Elizabeth\\\",\\\"bytes\\\":\\\"IEVsaXphYmV0aA==\\\",\\\"prob\\\":0.0009970995597541332,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" King\\\",\\\"bytes\\\":\\\"IEtpbmc=\\\",\\\"prob\\\":0.06309419870376587,\\\"masked\\\":true},{\\\"token\\\":\\\" Smith\\\",\\\"bytes\\\":\\\"IFNtaXRo\\\",\\\"prob\\\":0.05750728398561478,\\\"masked\\\":true},{\\\"token\\\":\\\" Se\\\",\\\"bytes\\\":\\\"IFNl\\\",\\\"prob\\\":0.05062152072787285,\\\"masked\\\":true},{\\\"token\\\":\\\" Martin\\\",\\\"bytes\\\":\\\"IE1hcnRpbg==\\\",\\\"prob\\\":0.040210239589214325,\\\"masked\\\":true},{\\\"token\\\":\\\" Lee\\\",\\\"bytes\\\":\\\"IExlZQ==\\\",\\\"prob\\\":0.03426840901374817,\\\"masked\\\":true},{\\\"token\\\":\\\" Elizabeth\\\",\\\"bytes\\\":\\\"IEVsaXphYmV0aA==\\\",\\\"prob\\\":0.0009970995597541332,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Garrett\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" Garrett\\\",\\\"bytes\\\":\\\"IEdhcnJldHQ=\\\",\\\"prob\\\":0.03664129227399826,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Black\\\",\\\"bytes\\\":\\\"IEJsYWNr\\\",\\\"prob\\\":0.08681529760360718,\\\"masked\\\":true},{\\\"token\\\":\\\" Warren\\\",\\\"bytes\\\":\\\"IFdhcnJlbg==\\\",\\\"prob\\\":0.0666240006685257,\\\"masked\\\":true},{\\\"token\\\":\\\" C\\\",\\\"bytes\\\":\\\"IEM=\\\",\\\"prob\\\":0.06592471152544022,\\\"masked\\\":true},{\\\"token\\\":\\\" Benn\\\",\\\"bytes\\\":\\\"IEJlbm4=\\\",\\\"prob\\\":0.05173562094569206,\\\"masked\\\":true},{\\\"token\\\":\\\" Holmes\\\",\\\"bytes\\\":\\\"IEhvbG1lcw==\\\",\\\"prob\\\":0.04215589538216591,\\\"masked\\\":true},{\\\"token\\\":\\\" Garrett\\\",\\\"bytes\\\":\\\"IEdhcnJldHQ=\\\",\\\"prob\\\":0.03664129227399826,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Anderson\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" Anderson\\\",\\\"bytes\\\":\\\"IEFuZGVyc29u\\\",\\\"prob\\\":0.7465386986732483,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Anderson\\\",\\\"bytes\\\":\\\"IEFuZGVyc29u\\\",\\\"prob\\\":0.7465386986732483,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.04493025317788124,\\\"masked\\\":true},{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.021683380007743835,\\\"masked\\\":true},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.018654080107808113,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.018013514578342438,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" lifted\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" lifted\\\",\\\"bytes\\\":\\\"IGxpZnRlZA==\\\",\\\"prob\\\":0.000004810467089555459,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.27793219685554504,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.18200905621051788,\\\"masked\\\":true},{\\\"token\\\":\\\" founded\\\",\\\"bytes\\\":\\\"IGZvdW5kZWQ=\\\",\\\"prob\\\":0.05617247149348259,\\\"masked\\\":true},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.03680137172341347,\\\"masked\\\":true},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.02999081090092659,\\\"masked\\\":true},{\\\"token\\\":\\\" lifted\\\",\\\"bytes\\\":\\\"IGxpZnRlZA==\\\",\\\"prob\\\":0.000004810467089555459,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" her\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.1728181540966034,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.49282512068748474,\\\"masked\\\":true},{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.1728181540966034,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.12636040151119232,\\\"masked\\\":true},{\\\"token\\\":\\\" off\\\",\\\"bytes\\\":\\\"IG9mZg==\\\",\\\"prob\\\":0.04976483806967735,\\\"masked\\\":true},{\\\"token\\\":\\\" up\\\",\\\"bytes\\\":\\\"IHVw\\\",\\\"prob\\\":0.02720545046031475,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" hand\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" hand\\\",\\\"bytes\\\":\\\"IGhhbmQ=\\\",\\\"prob\\\":0.0037034032866358757,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" skirts\\\",\\\"bytes\\\":\\\"IHNraXJ0cw==\\\",\\\"prob\\\":0.24023699760437012,\\\"masked\\\":true},{\\\"token\\\":\\\" skirt\\\",\\\"bytes\\\":\\\"IHNraXJ0\\\",\\\"prob\\\":0.12859058380126953,\\\"masked\\\":true},{\\\"token\\\":\\\" eyes\\\",\\\"bytes\\\":\\\"IGV5ZXM=\\\",\\\"prob\\\":0.03564989194273949,\\\"masked\\\":true},{\\\"token\\\":\\\" head\\\",\\\"bytes\\\":\\\"IGhlYWQ=\\\",\\\"prob\\\":0.02616143599152565,\\\"masked\\\":true},{\\\"token\\\":\\\" glasses\\\",\\\"bytes\\\":\\\"IGdsYXNzZXM=\\\",\\\"prob\\\":0.02477002516388893,\\\"masked\\\":true},{\\\"token\\\":\\\" hand\\\",\\\"bytes\\\":\\\"IGhhbmQ=\\\",\\\"prob\\\":0.0037034032866358757,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" from\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.01535731926560402,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.4340270459651947,\\\"masked\\\":true},{\\\"token\\\":\\\"ker\\\",\\\"bytes\\\":\\\"a2Vy\\\",\\\"prob\\\":0.22048597037792206,\\\"masked\\\":true},{\\\"token\\\":\\\" up\\\",\\\"bytes\\\":\\\"IHVw\\\",\\\"prob\\\":0.06093664839863777,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0504530631005764,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.034053802490234375,\\\"masked\\\":true},{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.01535731926560402,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" her\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.43028098344802856,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.5087249279022217,\\\"masked\\\":true},{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.43028098344802856,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.008098610676825047,\\\"masked\\\":true},{\\\"token\\\":\\\" behind\\\",\\\"bytes\\\":\\\"IGJlaGluZA==\\\",\\\"prob\\\":0.00775935547426343,\\\"masked\\\":true},{\\\"token\\\":\\\" over\\\",\\\"bytes\\\":\\\"IG92ZXI=\\\",\\\"prob\\\":0.0030706042889505625,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dark\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" dark\\\",\\\"bytes\\\":\\\"IGRhcms=\\\",\\\"prob\\\":0.00017568432667758316,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" desk\\\",\\\"bytes\\\":\\\"IGRlc2s=\\\",\\\"prob\\\":0.21308204531669617,\\\"masked\\\":true},{\\\"token\\\":\\\" pocket\\\",\\\"bytes\\\":\\\"IHBvY2tldA==\\\",\\\"prob\\\":0.06451605260372162,\\\"masked\\\":true},{\\\"token\\\":\\\" microscope\\\",\\\"bytes\\\":\\\"IG1pY3Jvc2NvcGU=\\\",\\\"prob\\\":0.02409294806420803,\\\"masked\\\":true},{\\\"token\\\":\\\" wheelchair\\\",\\\"bytes\\\":\\\"IHdoZWVsY2hhaXI=\\\",\\\"prob\\\":0.01995842717587948,\\\"masked\\\":true},{\\\"token\\\":\\\" typ\\\",\\\"bytes\\\":\\\"IHR5cA==\\\",\\\"prob\\\":0.01982429251074791,\\\"masked\\\":true},{\\\"token\\\":\\\" dark\\\",\\\"bytes\\\":\\\"IGRhcms=\\\",\\\"prob\\\":0.00017568432667758316,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" colored\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" colored\\\",\\\"bytes\\\":\\\"IGNvbG9yZWQ=\\\",\\\"prob\\\":0.003703484544530511,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" brown\\\",\\\"bytes\\\":\\\"IGJyb3du\\\",\\\"prob\\\":0.08181092143058777,\\\"masked\\\":true},{\\\"token\\\":\\\" glasses\\\",\\\"bytes\\\":\\\"IGdsYXNzZXM=\\\",\\\"prob\\\":0.07551164925098419,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.056249115616083145,\\\"masked\\\":true},{\\\"token\\\":\\\" blue\\\",\\\"bytes\\\":\\\"IGJsdWU=\\\",\\\"prob\\\":0.03917623311281204,\\\"masked\\\":true},{\\\"token\\\":\\\" suit\\\",\\\"bytes\\\":\\\"IHN1aXQ=\\\",\\\"prob\\\":0.038500141352415085,\\\"masked\\\":true},{\\\"token\\\":\\\" colored\\\",\\\"bytes\\\":\\\"IGNvbG9yZWQ=\\\",\\\"prob\\\":0.003703484544530511,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dress\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" dress\\\",\\\"bytes\\\":\\\"IGRyZXNz\\\",\\\"prob\\\":0.12563911080360413,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" dress\\\",\\\"bytes\\\":\\\"IGRyZXNz\\\",\\\"prob\\\":0.12563911080360413,\\\"masked\\\":false},{\\\"token\\\":\\\" suit\\\",\\\"bytes\\\":\\\"IHN1aXQ=\\\",\\\"prob\\\":0.08464916050434113,\\\"masked\\\":true},{\\\"token\\\":\\\" coat\\\",\\\"bytes\\\":\\\"IGNvYXQ=\\\",\\\"prob\\\":0.06299548596143723,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.04244198277592659,\\\"masked\\\":true},{\\\"token\\\":\\\" skirt\\\",\\\"bytes\\\":\\\"IHNraXJ0\\\",\\\"prob\\\":0.03096814453601837,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.3804447650909424,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.3804447650909424,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.23169741034507751,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.09657968580722809,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.07218509167432785,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.03086436353623867,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" traced\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" traced\\\",\\\"bytes\\\":\\\"IHRyYWNlZA==\\\",\\\"prob\\\":0.00007370809180429205,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" revealed\\\",\\\"bytes\\\":\\\"IHJldmVhbGVk\\\",\\\"prob\\\":0.04991600289940834,\\\"masked\\\":true},{\\\"token\\\":\\\" began\\\",\\\"bytes\\\":\\\"IGJlZ2Fu\\\",\\\"prob\\\":0.049184419214725494,\\\"masked\\\":true},{\\\"token\\\":\\\" pulled\\\",\\\"bytes\\\":\\\"IHB1bGxlZA==\\\",\\\"prob\\\":0.033454958349466324,\\\"masked\\\":true},{\\\"token\\\":\\\" applied\\\",\\\"bytes\\\":\\\"IGFwcGxpZWQ=\\\",\\\"prob\\\":0.02797228842973709,\\\"masked\\\":true},{\\\"token\\\":\\\" examined\\\",\\\"bytes\\\":\\\"IGV4YW1pbmVk\\\",\\\"prob\\\":0.027241647243499756,\\\"masked\\\":true},{\\\"token\\\":\\\" traced\\\",\\\"bytes\\\":\\\"IHRyYWNlZA==\\\",\\\"prob\\\":0.00007370809180429205,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.7430068254470825,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.7430068254470825,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.124329574406147,\\\"masked\\\":true},{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.02454073540866375,\\\"masked\\\":true},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.01862642727792263,\\\"masked\\\":true},{\\\"token\\\":\\\" out\\\",\\\"bytes\\\":\\\"IG91dA==\\\",\\\"prob\\\":0.01304556056857109,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ph\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" ph\\\",\\\"bytes\\\":\\\"IHBo\\\",\\\"prob\\\":0.000023615428290213458,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" outline\\\",\\\"bytes\\\":\\\"IG91dGxpbmU=\\\",\\\"prob\\\":0.18359540402889252,\\\"masked\\\":true},{\\\"token\\\":\\\" shape\\\",\\\"bytes\\\":\\\"IHNoYXBl\\\",\\\"prob\\\":0.11889462918043137,\\\"masked\\\":true},{\\\"token\\\":\\\" lines\\\",\\\"bytes\\\":\\\"IGxpbmVz\\\",\\\"prob\\\":0.08979165554046631,\\\"masked\\\":true},{\\\"token\\\":\\\" intricate\\\",\\\"bytes\\\":\\\"IGludHJpY2F0ZQ==\\\",\\\"prob\\\":0.04415615648031235,\\\"masked\\\":true},{\\\"token\\\":\\\" curves\\\",\\\"bytes\\\":\\\"IGN1cnZlcw==\\\",\\\"prob\\\":0.029050951823592186,\\\"masked\\\":true},{\\\"token\\\":\\\" ph\\\",\\\"bytes\\\":\\\"IHBo\\\",\\\"prob\\\":0.000023615428290213458,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"araoh\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"araoh\\\",\\\"bytes\\\":\\\"YXJhb2g=\\\",\\\"prob\\\":0.004801436327397823,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"al\\\",\\\"bytes\\\":\\\"YWw=\\\",\\\"prob\\\":0.41280317306518555,\\\"masked\\\":true},{\\\"token\\\":\\\"rasing\\\",\\\"bytes\\\":\\\"cmFzaW5n\\\",\\\"prob\\\":0.1905769407749176,\\\"masked\\\":true},{\\\"token\\\":\\\"ren\\\",\\\"bytes\\\":\\\"cmVu\\\",\\\"prob\\\":0.06011238694190979,\\\"masked\\\":true},{\\\"token\\\":\\\"all\\\",\\\"bytes\\\":\\\"YWxs\\\",\\\"prob\\\":0.05471046268939972,\\\"masked\\\":true},{\\\"token\\\":\\\"ant\\\",\\\"bytes\\\":\\\"YW50\\\",\\\"prob\\\":0.02998683601617813,\\\"masked\\\":true},{\\\"token\\\":\\\"araoh\\\",\\\"bytes\\\":\\\"YXJhb2g=\\\",\\\"prob\\\":0.004801436327397823,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"'s\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.6843929290771484,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.6843929290771484,\\\"masked\\\":false},{\\\"token\\\":\\\"s\\\",\\\"bytes\\\":\\\"cw==\\\",\\\"prob\\\":0.21783412992954254,\\\"masked\\\":true},{\\\"token\\\":\\\"’s\\\",\\\"bytes\\\":\\\"4oCZcw==\\\",\\\"prob\\\":0.06007269769906998,\\\"masked\\\":true},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.004236963577568531,\\\"masked\\\":true},{\\\"token\\\":\\\"-like\\\",\\\"bytes\\\":\\\"LWxpa2U=\\\",\\\"prob\\\":0.003469151444733143,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cart\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" cart\\\",\\\"bytes\\\":\\\"IGNhcnQ=\\\",\\\"prob\\\":0.0015961602330207825,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" face\\\",\\\"bytes\\\":\\\"IGZhY2U=\\\",\\\"prob\\\":0.1488151252269745,\\\"masked\\\":true},{\\\"token\\\":\\\" head\\\",\\\"bytes\\\":\\\"IGhlYWQ=\\\",\\\"prob\\\":0.10134285688400269,\\\"masked\\\":true},{\\\"token\\\":\\\" staff\\\",\\\"bytes\\\":\\\"IHN0YWZm\\\",\\\"prob\\\":0.07928771525621414,\\\"masked\\\":true},{\\\"token\\\":\\\" profile\\\",\\\"bytes\\\":\\\"IHByb2ZpbGU=\\\",\\\"prob\\\":0.06633239984512329,\\\"masked\\\":true},{\\\"token\\\":\\\" symbol\\\",\\\"bytes\\\":\\\"IHN5bWJvbA==\\\",\\\"prob\\\":0.03674682229757309,\\\"masked\\\":true},{\\\"token\\\":\\\" cart\\\",\\\"bytes\\\":\\\"IGNhcnQ=\\\",\\\"prob\\\":0.0015961602330207825,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ou\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ou\\\",\\\"bytes\\\":\\\"b3U=\\\",\\\"prob\\\":0.9703624844551086,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ou\\\",\\\"bytes\\\":\\\"b3U=\\\",\\\"prob\\\":0.9703624844551086,\\\"masked\\\":false},{\\\"token\\\":\\\"ouch\\\",\\\"bytes\\\":\\\"b3VjaA==\\\",\\\"prob\\\":0.02343515306711197,\\\"masked\\\":true},{\\\"token\\\":\\\"wheel\\\",\\\"bytes\\\":\\\"d2hlZWw=\\\",\\\"prob\\\":0.0005401361850090325,\\\"masked\\\":true},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.00033108610659837723,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0003123055794276297,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"che\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"che\\\",\\\"bytes\\\":\\\"Y2hl\\\",\\\"prob\\\":0.9998965263366699,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"che\\\",\\\"bytes\\\":\\\"Y2hl\\\",\\\"prob\\\":0.9998965263366699,\\\"masked\\\":false},{\\\"token\\\":\\\" che\\\",\\\"bytes\\\":\\\"IGNoZQ==\\\",\\\"prob\\\":0.000021502699382836,\\\"masked\\\":true},{\\\"token\\\":\\\"-che\\\",\\\"bytes\\\":\\\"LWNoZQ==\\\",\\\"prob\\\":0.000012944514310220256,\\\"masked\\\":true},{\\\"token\\\":\\\"cho\\\",\\\"bytes\\\":\\\"Y2hv\\\",\\\"prob\\\":0.000011472481673990842,\\\"masked\\\":true},{\\\"token\\\":\\\"chem\\\",\\\"bytes\\\":\\\"Y2hlbQ==\\\",\\\"prob\\\":0.000008758437616052106,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" on\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.43200698494911194,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.43200698494911194,\\\"masked\\\":false},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.1602942943572998,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.08995126187801361,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.037278514355421066,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.031141752377152443,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.48007142543792725,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.48007142543792725,\\\"masked\\\":false},{\\\"token\\\":\\\" her\\\",\\\"bytes\\\":\\\"IGhlcg==\\\",\\\"prob\\\":0.28736940026283264,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.17366419732570648,\\\"masked\\\":true},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.013524496927857399,\\\"masked\\\":true},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.01155385933816433,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" newly\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" newly\\\",\\\"bytes\\\":\\\"IG5ld2x5\\\",\\\"prob\\\":0.0024431224446743727,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" wall\\\",\\\"bytes\\\":\\\"IHdhbGw=\\\",\\\"prob\\\":0.23226623237133026,\\\"masked\\\":true},{\\\"token\\\":\\\" stone\\\",\\\"bytes\\\":\\\"IHN0b25l\\\",\\\"prob\\\":0.06969720870256424,\\\"masked\\\":true},{\\\"token\\\":\\\" p\\\",\\\"bytes\\\":\\\"IHA=\\\",\\\"prob\\\":0.02453504502773285,\\\"masked\\\":true},{\\\"token\\\":\\\" white\\\",\\\"bytes\\\":\\\"IHdoaXRl\\\",\\\"prob\\\":0.02339061349630356,\\\"masked\\\":true},{\\\"token\\\":\\\" ancient\\\",\\\"bytes\\\":\\\"IGFuY2llbnQ=\\\",\\\"prob\\\":0.02215675264596939,\\\"masked\\\":true},{\\\"token\\\":\\\" newly\\\",\\\"bytes\\\":\\\"IG5ld2x5\\\",\\\"prob\\\":0.0024431224446743727,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" transported\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" transported\\\",\\\"bytes\\\":\\\"IHRyYW5zcG9ydGVk\\\",\\\"prob\\\":0.00018514483235776424,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" purchased\\\",\\\"bytes\\\":\\\"IHB1cmNoYXNlZA==\\\",\\\"prob\\\":0.05799294635653496,\\\"masked\\\":true},{\\\"token\\\":\\\" painted\\\",\\\"bytes\\\":\\\"IHBhaW50ZWQ=\\\",\\\"prob\\\":0.056616105139255524,\\\"masked\\\":true},{\\\"token\\\":\\\" acquired\\\",\\\"bytes\\\":\\\"IGFjcXVpcmVk\\\",\\\"prob\\\":0.05643632635474205,\\\"masked\\\":true},{\\\"token\\\":\\\" discovered\\\",\\\"bytes\\\":\\\"IGRpc2NvdmVyZWQ=\\\",\\\"prob\\\":0.05001359432935715,\\\"masked\\\":true},{\\\"token\\\":\\\" installed\\\",\\\"bytes\\\":\\\"IGluc3RhbGxlZA==\\\",\\\"prob\\\":0.04510718211531639,\\\"masked\\\":true},{\\\"token\\\":\\\" transported\\\",\\\"bytes\\\":\\\"IHRyYW5zcG9ydGVk\\\",\\\"prob\\\":0.00018514483235776424,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ob\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" ob\\\",\\\"bytes\\\":\\\"IG9i\\\",\\\"prob\\\":0.003551673609763384,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" p\\\",\\\"bytes\\\":\\\"IHA=\\\",\\\"prob\\\":0.2502272427082062,\\\"masked\\\":true},{\\\"token\\\":\\\" Egyptian\\\",\\\"bytes\\\":\\\"IEVneXB0aWFu\\\",\\\"prob\\\":0.21381546556949615,\\\"masked\\\":true},{\\\"token\\\":\\\" stone\\\",\\\"bytes\\\":\\\"IHN0b25l\\\",\\\"prob\\\":0.051459841430187225,\\\"masked\\\":true},{\\\"token\\\":\\\" m\\\",\\\"bytes\\\":\\\"IG0=\\\",\\\"prob\\\":0.030278462916612625,\\\"masked\\\":true},{\\\"token\\\":\\\" artifact\\\",\\\"bytes\\\":\\\"IGFydGlmYWN0\\\",\\\"prob\\\":0.02683260105550289,\\\"masked\\\":true},{\\\"token\\\":\\\" ob\\\",\\\"bytes\\\":\\\"IG9i\\\",\\\"prob\\\":0.003551673609763384,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"el\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"el\\\",\\\"bytes\\\":\\\"ZWw=\\\",\\\"prob\\\":0.9928695559501648,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"el\\\",\\\"bytes\\\":\\\"ZWw=\\\",\\\"prob\\\":0.9928695559501648,\\\"masked\\\":false},{\\\"token\\\":\\\"long\\\",\\\"bytes\\\":\\\"bG9uZw==\\\",\\\"prob\\\":0.0012368762400001287,\\\"masked\\\":true},{\\\"token\\\":\\\"els\\\",\\\"bytes\\\":\\\"ZWxz\\\",\\\"prob\\\":0.00046006328193470836,\\\"masked\\\":true},{\\\"token\\\":\\\"lique\\\",\\\"bytes\\\":\\\"bGlxdWU=\\\",\\\"prob\\\":0.00030402757693082094,\\\"masked\\\":true},{\\\"token\\\":\\\"us\\\",\\\"bytes\\\":\\\"dXM=\\\",\\\"prob\\\":0.00020999350817874074,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"isk\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"isk\\\",\\\"bytes\\\":\\\"aXNr\\\",\\\"prob\\\":0.9962995648384094,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"isk\\\",\\\"bytes\\\":\\\"aXNr\\\",\\\"prob\\\":0.9962995648384094,\\\"masked\\\":false},{\\\"token\\\":\\\"isks\\\",\\\"bytes\\\":\\\"aXNrcw==\\\",\\\"prob\\\":0.002619928913190961,\\\"masked\\\":true},{\\\"token\\\":\\\"isque\\\",\\\"bytes\\\":\\\"aXNxdWU=\\\",\\\"prob\\\":0.0002568704658187926,\\\"masked\\\":true},{\\\"token\\\":\\\"ix\\\",\\\"bytes\\\":\\\"aXg=\\\",\\\"prob\\\":0.00015459844144061208,\\\"masked\\\":true},{\\\"token\\\":\\\"ick\\\",\\\"bytes\\\":\\\"aWNr\\\",\\\"prob\\\":0.00011621390876825899,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.07763233780860901,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.4538572430610657,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.08499875664710999,\\\"masked\\\":true},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.07763233780860901,\\\"masked\\\":false},{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.053142234683036804,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.043132491409778595,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.4192604720592499,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.4192604720592499,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.07110186666250229,\\\"masked\\\":true},{\\\"token\\\":\\\" Egypt\\\",\\\"bytes\\\":\\\"IEVneXB0\\\",\\\"prob\\\":0.06556448340415955,\\\"masked\\\":true},{\\\"token\\\":\\\" Alexandria\\\",\\\"bytes\\\":\\\"IEFsZXhhbmRyaWE=\\\",\\\"prob\\\":0.05291350558400154,\\\"masked\\\":true},{\\\"token\\\":\\\" Cairo\\\",\\\"bytes\\\":\\\"IENhaXJv\\\",\\\"prob\\\":0.05078112334012985,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" City\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" City\\\",\\\"bytes\\\":\\\"IENpdHk=\\\",\\\"prob\\\":0.0011937246890738606,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Egyptian\\\",\\\"bytes\\\":\\\"IEVneXB0aWFu\\\",\\\"prob\\\":0.12475363165140152,\\\"masked\\\":true},{\\\"token\\\":\\\" newly\\\",\\\"bytes\\\":\\\"IG5ld2x5\\\",\\\"prob\\\":0.12232726067304611,\\\"masked\\\":true},{\\\"token\\\":\\\" British\\\",\\\"bytes\\\":\\\"IEJyaXRpc2g=\\\",\\\"prob\\\":0.04000399261713028,\\\"masked\\\":true},{\\\"token\\\":\\\" Great\\\",\\\"bytes\\\":\\\"IEdyZWF0\\\",\\\"prob\\\":0.03718232363462448,\\\"masked\\\":true},{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.018071739003062248,\\\"masked\\\":true},{\\\"token\\\":\\\" City\\\",\\\"bytes\\\":\\\"IENpdHk=\\\",\\\"prob\\\":0.0011937246890738606,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.8623738288879395,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.8623738288879395,\\\"masked\\\":false},{\\\"token\\\":\\\" Museum\\\",\\\"bytes\\\":\\\"IE11c2V1bQ==\\\",\\\"prob\\\":0.05760791525244713,\\\"masked\\\":true},{\\\"token\\\":\\\" Hall\\\",\\\"bytes\\\":\\\"IEhhbGw=\\\",\\\"prob\\\":0.020741933956742287,\\\"masked\\\":true},{\\\"token\\\":\\\" Palace\\\",\\\"bytes\\\":\\\"IFBhbGFjZQ==\\\",\\\"prob\\\":0.01515968982130289,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0019528131233528256,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Westminster\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\" Westminster\\\",\\\"bytes\\\":\\\"IFdlc3RtaW5zdGVy\\\",\\\"prob\\\":0.015877723693847656,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" London\\\",\\\"bytes\\\":\\\"IExvbmRvbg==\\\",\\\"prob\\\":0.3138689398765564,\\\"masked\\\":true},{\\\"token\\\":\\\" Cairo\\\",\\\"bytes\\\":\\\"IENhaXJv\\\",\\\"prob\\\":0.08632160723209381,\\\"masked\\\":true},{\\\"token\\\":\\\" Paris\\\",\\\"bytes\\\":\\\"IFBhcmlz\\\",\\\"prob\\\":0.06788907945156097,\\\"masked\\\":true},{\\\"token\\\":\\\" New\\\",\\\"bytes\\\":\\\"IE5ldw==\\\",\\\"prob\\\":0.06653479486703873,\\\"masked\\\":true},{\\\"token\\\":\\\" Alexandria\\\",\\\"bytes\\\":\\\"IEFsZXhhbmRyaWE=\\\",\\\"prob\\\":0.06466972082853317,\\\"masked\\\":true},{\\\"token\\\":\\\" Westminster\\\",\\\"bytes\\\":\\\"IFdlc3RtaW5zdGVy\\\",\\\"prob\\\":0.015877723693847656,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.037590231746435165,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.5191611647605896,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.141763836145401,\\\"masked\\\":true},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.1030205637216568,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.05633745715022087,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.037590231746435165,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"An\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.05061475560069084,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.5349602699279785,\\\"masked\\\":true},{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.05061475560069084,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\\n\\\",\\\"bytes\\\":\\\"IAoK\\\",\\\"prob\\\":0.027187945321202278,\\\"masked\\\":true},{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.019969357177615166,\\\"masked\\\":true},{\\\"token\\\":\\\"Time\\\",\\\"bytes\\\":\\\"VGltZQ==\\\",\\\"prob\\\":0.01979999616742134,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9703240990638733,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.9703240990638733,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.023077337071299553,\\\"masked\\\":true},{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.0011636944254860282,\\\"masked\\\":true},{\\\"token\\\":\\\" analysis\\\",\\\"bytes\\\":\\\"IGFuYWx5c2lz\\\",\\\"prob\\\":0.000623755156993866,\\\"masked\\\":true},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":0.0003631492145359516,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9988653659820557,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9988653659820557,\\\"masked\\\":false},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.0004480310599319637,\\\"masked\\\":true},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.00038997994852252305,\\\"masked\\\":true},{\\\"token\\\":\\\"cron\\\",\\\"bytes\\\":\\\"Y3Jvbg==\\\",\\\"prob\\\":0.00008670209354022518,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.00006627828406635672,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9283991456031799,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9283991456031799,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.03878972679376602,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.028350550681352615,\\\"masked\\\":true},{\\\"token\\\":\\\"ist\\\",\\\"bytes\\\":\\\"aXN0\\\",\\\"prob\\\":0.0010478810872882605,\\\"masked\\\":true},{\\\"token\\\":\\\"is\\\",\\\"bytes\\\":\\\"aXM=\\\",\\\"prob\\\":0.0005194456316530704,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1826617903039827,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5805149674415588,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5805149674415588,\\\"masked\\\":false},{\\\"token\\\":\\\"?\\\",\\\"bytes\\\":\\\"Pw==\\\",\\\"prob\\\":0.056852854788303375,\\\"masked\\\":true},{\\\"token\\\":\\\" detection\\\",\\\"bytes\\\":\\\"IGRldGVjdGlvbg==\\\",\\\"prob\\\":0.03748088330030441,\\\"masked\\\":true},{\\\"token\\\":\\\" check\\\",\\\"bytes\\\":\\\"IGNoZWNr\\\",\\\"prob\\\":0.03317826986312866,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.025276202708482742,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Yes\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":949.2000406607985,\\\"token\\\":{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.5123518705368042,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.5123518705368042,\\\"masked\\\":false},{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.15213796496391296,\\\"masked\\\":false},{\\\"token\\\":\\\" YES\\\",\\\"bytes\\\":\\\"IFlFUw==\\\",\\\"prob\\\":0.096733458340168,\\\"masked\\\":true},{\\\"token\\\":\\\" **\\\",\\\"bytes\\\":\\\"ICoq\\\",\\\"prob\\\":0.03304869309067726,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.026486901566386223,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":220.84912518039346,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.14821283519268036,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.2614641487598419,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.18292418122291565,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.16431249678134918,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.14821283519268036,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.0564899668097496,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":2,\\\"token reduction\\\":33.33333333333333,\\\"avg latency\\\":407.3083749972284,\\\"cpu\\\":[0.7909375,0.8498125000000001,0.7909375,0.7909375,0.8498125000000001],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":47.88856506347656,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":88213,\\\"backtrackCount\\\":0,\\\"resetCount\\\":924}\"\n      }\n     },\n     \"b5a2afc4ce3d40728870e4e4ac833b69\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":518,\\\"last_trace_id\\\":274,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_da490f68babf4ab19c5e95e9d3743383\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"Given\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"Given\\\",\\\"bytes\\\":\\\"R2l2ZW4=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" sentence\\\",\\\"bytes\\\":\\\"IHNlbnRlbmNl\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" tell\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" tell\\\",\\\"bytes\\\":\\\"IHRlbGw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" contains\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" contains\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5z\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"i\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"i\\\",\\\"bytes\\\":\\\"aQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".e\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\".e\\\",\\\"bytes\\\":\\\"LmU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" whether\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" whether\\\",\\\"bytes\\\":\\\"IHdoZXRoZXI=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" could\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" have\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" happened\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" happened\\\",\\\"bytes\\\":\\\"IGhhcHBlbmVk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"not\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"not\\\",\\\"bytes\\\":\\\"bm90\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" based\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" based\\\",\\\"bytes\\\":\\\"IGJhc2Vk\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" on\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" time\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" periods\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" periods\\\",\\\"bytes\\\":\\\"IHBlcmlvZHM=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" associated\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" associated\\\",\\\"bytes\\\":\\\"IGFzc29jaWF0ZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" entities\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" entities\\\",\\\"bytes\\\":\\\"IGVudGl0aWVz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\").\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\").\\\\n\\\\n\\\",\\\"bytes\\\":\\\"KS4KCg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Sentence\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"Sentence\\\",\\\"bytes\\\":\\\"U2VudGVuY2U=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":[],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8088568449020386,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8088568449020386,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.07535790652036667,\\\"masked\\\":true},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.03018336370587349,\\\"masked\\\":true},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.009221335873007774,\\\"masked\\\":true},{\\\"token\\\":\\\" =\\\",\\\"bytes\\\":\\\"ID0=\\\",\\\"prob\\\":0.007927772589027882,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.08716513216495514,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.6058791279792786,\\\"masked\\\":true},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.08716513216495514,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0483456589281559,\\\"masked\\\":true},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.04543218016624451,\\\"masked\\\":true},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.028718169778585434,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" T\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.0003294244525022805,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.05736997351050377,\\\"masked\\\":true},{\\\"token\\\":\\\" astronauts\\\",\\\"bytes\\\":\\\"IGFzdHJvbmF1dHM=\\\",\\\"prob\\\":0.03819066286087036,\\\"masked\\\":true},{\\\"token\\\":\\\" Beatles\\\",\\\"bytes\\\":\\\"IEJlYXRsZXM=\\\",\\\"prob\\\":0.032411810010671616,\\\"masked\\\":true},{\\\"token\\\":\\\" Roman\\\",\\\"bytes\\\":\\\"IFJvbWFu\\\",\\\"prob\\\":0.017318209633231163,\\\"masked\\\":true},{\\\"token\\\":\\\" Wright\\\",\\\"bytes\\\":\\\"IFdyaWdodA==\\\",\\\"prob\\\":0.016705216839909554,\\\"masked\\\":true},{\\\"token\\\":\\\" T\\\",\\\"bytes\\\":\\\"IFQ=\\\",\\\"prob\\\":0.0003294244525022805,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-R\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.23335328698158264,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.311137855052948,\\\"masked\\\":true},{\\\"token\\\":\\\"-R\\\",\\\"bytes\\\":\\\"LVI=\\\",\\\"prob\\\":0.23335328698158264,\\\"masked\\\":false},{\\\"token\\\":\\\"ARD\\\",\\\"bytes\\\":\\\"QVJE\\\",\\\"prob\\\":0.1873403787612915,\\\"masked\\\":true},{\\\"token\\\":\\\"ard\\\",\\\"bytes\\\":\\\"YXJk\\\",\\\"prob\\\":0.016210414469242096,\\\"masked\\\":true},{\\\"token\\\":\\\"IT\\\",\\\"bytes\\\":\\\"SVQ=\\\",\\\"prob\\\":0.009032182395458221,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ex\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9993929862976074,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ex\\\",\\\"bytes\\\":\\\"ZXg=\\\",\\\"prob\\\":0.9993929862976074,\\\"masked\\\":false},{\\\"token\\\":\\\"aptor\\\",\\\"bytes\\\":\\\"YXB0b3I=\\\",\\\"prob\\\":0.00014899518282618374,\\\"masked\\\":true},{\\\"token\\\":\\\"ext\\\",\\\"bytes\\\":\\\"ZXh0\\\",\\\"prob\\\":0.00008152715599862859,\\\"masked\\\":true},{\\\"token\\\":\\\" Rex\\\",\\\"bytes\\\":\\\"IFJleA==\\\",\\\"prob\\\":0.00006430192297557369,\\\"masked\\\":true},{\\\"token\\\":\\\"ix\\\",\\\"bytes\\\":\\\"aXg=\\\",\\\"prob\\\":0.000035422279324848205,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" bit\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" bit\\\",\\\"bytes\\\":\\\"IGJpdA==\\\",\\\"prob\\\":0.0015204090159386396,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" was\\\",\\\"bytes\\\":\\\"IHdhcw==\\\",\\\"prob\\\":0.1547476053237915,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.08017580211162567,\\\"masked\\\":true},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.04390180855989456,\\\"masked\\\":true},{\\\"token\\\":\\\" ro\\\",\\\"bytes\\\":\\\"IHJv\\\",\\\"prob\\\":0.040243323892354965,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.03988025709986687,\\\"masked\\\":true},{\\\"token\\\":\\\" bit\\\",\\\"bytes\\\":\\\"IGJpdA==\\\",\\\"prob\\\":0.0015204090159386396,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" my\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.06602426618337631,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.531055748462677,\\\"masked\\\":true},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.06602426618337631,\\\"masked\\\":false},{\\\"token\\\":\\\" his\\\",\\\"bytes\\\":\\\"IGhpcw==\\\",\\\"prob\\\":0.059568144381046295,\\\"masked\\\":true},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.047872476279735565,\\\"masked\\\":true},{\\\"token\\\":\\\" off\\\",\\\"bytes\\\":\\\"IG9mZg==\\\",\\\"prob\\\":0.04437540844082832,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" dog\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.016027942299842834,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" brother\\\",\\\"bytes\\\":\\\"IGJyb3RoZXI=\\\",\\\"prob\\\":0.19516628980636597,\\\"masked\\\":true},{\\\"token\\\":\\\" sister\\\",\\\"bytes\\\":\\\"IHNpc3Rlcg==\\\",\\\"prob\\\":0.14209093153476715,\\\"masked\\\":true},{\\\"token\\\":\\\" friend\\\",\\\"bytes\\\":\\\"IGZyaWVuZA==\\\",\\\"prob\\\":0.1330498456954956,\\\"masked\\\":true},{\\\"token\\\":\\\" cousin\\\",\\\"bytes\\\":\\\"IGNvdXNpbg==\\\",\\\"prob\\\":0.05169227346777916,\\\"masked\\\":true},{\\\"token\\\":\\\" toe\\\",\\\"bytes\\\":\\\"IHRvZQ==\\\",\\\"prob\\\":0.04155369848012924,\\\"masked\\\":true},{\\\"token\\\":\\\" dog\\\",\\\"bytes\\\":\\\"IGRvZw==\\\",\\\"prob\\\":0.016027942299842834,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.009266264736652374,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.4764108955860138,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.09259511530399323,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.07500233501195908,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.058569006621837616,\\\"masked\\\":true},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.03975249081850052,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.009266264736652374,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"An\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.10207825154066086,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"An\\\",\\\"bytes\\\":\\\"QW4=\\\",\\\"prob\\\":0.10207825154066086,\\\"masked\\\":false},{\\\"token\\\":\\\"This\\\",\\\"bytes\\\":\\\"VGhpcw==\\\",\\\"prob\\\":0.0988052487373352,\\\"masked\\\":true},{\\\"token\\\":\\\"Is\\\",\\\"bytes\\\":\\\"SXM=\\\",\\\"prob\\\":0.04265005514025688,\\\"masked\\\":true},{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.030835328623652458,\\\"masked\\\":true},{\\\"token\\\":\\\"----------------\\\",\\\"bytes\\\":\\\"LS0tLS0tLS0tLS0tLS0tLQ==\\\",\\\"prob\\\":0.02942456491291523,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ach\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.8701314330101013,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ach\\\",\\\"bytes\\\":\\\"YWNo\\\",\\\"prob\\\":0.8701314330101013,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.09820854663848877,\\\"masked\\\":true},{\\\"token\\\":\\\" answer\\\",\\\"bytes\\\":\\\"IGFuc3dlcg==\\\",\\\"prob\\\":0.0038568710442632437,\\\"masked\\\":true},{\\\"token\\\":\\\" analysis\\\",\\\"bytes\\\":\\\"IGFuYWx5c2lz\\\",\\\"prob\\\":0.0029512913897633553,\\\"masked\\\":true},{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.0027509587816894054,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ron\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9986718893051147,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ron\\\",\\\"bytes\\\":\\\"cm9u\\\",\\\"prob\\\":0.9986718893051147,\\\"masked\\\":false},{\\\"token\\\":\\\"ronym\\\",\\\"bytes\\\":\\\"cm9ueW0=\\\",\\\"prob\\\":0.0005408363649621606,\\\"masked\\\":true},{\\\"token\\\":\\\"ronic\\\",\\\"bytes\\\":\\\"cm9uaWM=\\\",\\\"prob\\\":0.0004073564487043768,\\\"masked\\\":true},{\\\"token\\\":\\\"ro\\\",\\\"bytes\\\":\\\"cm8=\\\",\\\"prob\\\":0.00015622263890691102,\\\"masked\\\":true},{\\\"token\\\":\\\"cron\\\",\\\"bytes\\\":\\\"Y3Jvbg==\\\",\\\"prob\\\":0.00005322684228303842,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ism\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9482777118682861,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ism\\\",\\\"bytes\\\":\\\"aXNt\\\",\\\"prob\\\":0.9482777118682861,\\\"masked\\\":false},{\\\"token\\\":\\\"istic\\\",\\\"bytes\\\":\\\"aXN0aWM=\\\",\\\"prob\\\":0.04570227861404419,\\\"masked\\\":true},{\\\"token\\\":\\\"isms\\\",\\\"bytes\\\":\\\"aXNtcw==\\\",\\\"prob\\\":0.001559077762067318,\\\"masked\\\":true},{\\\"token\\\":\\\"ist\\\",\\\"bytes\\\":\\\"aXN0\\\",\\\"prob\\\":0.0013803918845951557,\\\"masked\\\":true},{\\\"token\\\":\\\"is\\\",\\\"bytes\\\":\\\"aXM=\\\",\\\"prob\\\":0.0006983967032283545,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21293247118592262,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7321701645851135,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.7321701645851135,\\\"masked\\\":false},{\\\"token\\\":\\\"?\\\",\\\"bytes\\\":\\\"Pw==\\\",\\\"prob\\\":0.08846472203731537,\\\"masked\\\":true},{\\\"token\\\":\\\" check\\\",\\\"bytes\\\":\\\"IGNoZWNr\\\",\\\"prob\\\":0.011731944046914577,\\\"masked\\\":true},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.011501813307404518,\\\"masked\\\":true},{\\\"token\\\":\\\" exists\\\",\\\"bytes\\\":\\\"IGV4aXN0cw==\\\",\\\"prob\\\":0.011035866104066372,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Yes\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":477.61783422902226,\\\"token\\\":{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.4855775833129883,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Yes\\\",\\\"bytes\\\":\\\"IFllcw==\\\",\\\"prob\\\":0.4855775833129883,\\\"masked\\\":false},{\\\"token\\\":\\\" YES\\\",\\\"bytes\\\":\\\"IFlFUw==\\\",\\\"prob\\\":0.18266557157039642,\\\"masked\\\":true},{\\\"token\\\":\\\" No\\\",\\\"bytes\\\":\\\"IE5v\\\",\\\"prob\\\":0.15341342985630035,\\\"masked\\\":false},{\\\"token\\\":\\\" **\\\",\\\"bytes\\\":\\\"ICoq\\\",\\\"prob\\\":0.032566748559474945,\\\"masked\\\":true},{\\\"token\\\":\\\" yes\\\",\\\"bytes\\\":\\\"IHllcw==\\\",\\\"prob\\\":0.028169121593236923,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":242.0932501554489,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.2120223194360733,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.26652461290359497,\\\"masked\\\":true},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.23015068471431732,\\\"masked\\\":true},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.2120223194360733,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.06450030952692032,\\\"masked\\\":true},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.06328649073839188,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":2,\\\"token reduction\\\":33.33333333333333,\\\"avg latency\\\":249.00705569113293,\\\"cpu\\\":[0.24868749999999995,0.24868749999999995,0.24868749999999995,0.24868749999999995,0.24868749999999995],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":48.60646057128906,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":518,\\\"backtrackCount\\\":0,\\\"resetCount\\\":6}\"\n      }\n     },\n     \"da490f68babf4ab19c5e95e9d3743383\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     }\n    },\n    \"version_major\": 2,\n    \"version_minor\": 0\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/api_examples/library/gen.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# `gen` API Examples\\n\",\n    \"\\n\",\n    \"This notebook gives examples of how to use the `gen` command.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"\\n\",\n    \"gpt2 = models.Transformers(\\\"gpt2\\\", device=0)\\n\",\n    \"gpt3 = models.OpenAI(\\\"text-davinci-003\\\")\\n\",\n    \"gpt4 = models.OpenAI(\\\"gpt-4\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Basic usage\\n\",\n    \"\\n\",\n    \"Below we have a program that includes a basic generation call using `gen`. There are two arguments passed to `gen` one positional argument and one keyword argument. The positional argument is the name of the program variable to store the generation in. The keyword argument `stop` is a string that tells `gen` when to stop generating (in this case we stop when generating a period).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> way</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> that</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> world</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> works</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"out = gpt2 + \\\"This is a sentence about \\\" + gen(\\\"completion\\\", stop=\\\".\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'the way that the world works'\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# can access the generated text as a variable in the updated model state object\\n\",\n    \"out[\\\"completion\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `name` positional argument\\n\",\n    \"\\n\",\n    \"The `name` argument is a string that represents the key to store the results of the generation on the model state object (see above for an example).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> way</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> that</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> world</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> works</span>.\\n\",\n       \"This is another sentence with<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> a</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> different</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> meaning</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"out = gpt2 + f\\\"\\\"\\\"\\\\\\n\",\n    \"This is a sentence about {gen(\\\"sentence1\\\", stop=\\\".\\\")}.\\n\",\n    \"This is another sentence with {gen(\\\"sentence2\\\", stop=\\\".\\\")}.\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 16,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"('the way that the world works', 'a different meaning')\"\n      ]\n     },\n     \"execution_count\": 16,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"out[\\\"sentence1\\\"], out[\\\"sentence2\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `stop` keyword argument\\n\",\n    \"\\n\",\n    \"The `stop` argument can either be a string or a list of strings. If it is a string then it is the string that tells `gen` when to stop generating. If it is a list of strings then any of those strings will cause the generation to stop when they appear.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> way</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> that</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7ff5f9185950>\"\n      ]\n     },\n     \"execution_count\": 17,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"gpt2 + \\\"This is a sentence about \\\" + gen('text', stop=[\\\" the\\\", \\\" of\\\", \\\" a\\\"])\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `stop_regex` keyword argument\\n\",\n    \"\\n\",\n    \"The `stop_regex` argument is just like the `stop` argument but contains regular expressions instead of raw strings. This can be used to stop generation in a highly configurable way.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 18,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> way</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> that</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7ff5f9027c90>\"\n      ]\n     },\n     \"execution_count\": 18,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"gpt2 + \\\"This is a sentence about \\\" + gen('text', stop_regex=[\\\" of[^a-z]\\\", \\\" the[^a-z]\\\"])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 21,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Please solve the following word problem and call a calcuator with CALC(EQUATION) = ANSWER whenever you need to compute equations. For example: CALC((4+3) * 2) = 14.\\n\",\n       \"Problem: Joe has ten apples and needs run 5 tests on each apple, if each test takes 7 minutes how long will this take Joe?\\n\",\n       \"Reason step by step: <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Joe</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> has</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 10</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> apples</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> and</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> needs</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> to</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> run</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 5</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> tests</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> on</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> each</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> apple</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>This</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> means</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Joe</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> needs</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> to</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> run</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 50</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> tests</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> in</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> total</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Each</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> test</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> takes</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 7</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> minutes</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> so</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> total</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> time</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> it</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> will</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> take</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Joe</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> is</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 50</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> tests</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> multiplied</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> by</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> 7</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> minutes</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> per</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> test</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"out = gpt3 + f\\\"\\\"\\\"\\\\\\n\",\n    \"Please solve the following word problem and call a calcuator with CALC(EQUATION) = ANSWER whenever you need to compute equations. For example: CALC((4+3) * 2) = 14.\\n\",\n    \"Problem: Joe has ten apples and needs run 5 tests on each apple, if each test takes 7 minutes how long will this take Joe?\\n\",\n    \"Reason step by step: \\\"\\\"\\\" + gen('text', stop_regex=r\\\"CALC\\\\(.*\\\\) =\\\", max_tokens=100, save_stop_text=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 22,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'CALC(50 * 7) ='\"\n      ]\n     },\n     \"execution_count\": 22,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# here we can see the stop text that was saved\\n\",\n    \"out[\\\"text_stop_text\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `save_stop_text` keyword argument\\n\",\n    \"\\n\",\n    \"The `save_stop_text` argument causes the gen command to save the text that caused it to stop generating. This is useful when you have a list of strings or a regular expression that you are using to stop generation and you want to know what exact string caused the generation to stop. If set to true it will save the stop text in a variable named `variable_name + \\\"_stop_text\\\"`, if set to a string it will save the stop text to the variable with that name.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 24,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> importance</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of professional</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> development</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Professional</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> development</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> is</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> an important</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> part</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"' any '\"\n      ]\n     },\n     \"execution_count\": 24,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# stop on any three letter word, and then print the word that was stopped on\\n\",\n    \"out = gpt3 + \\\"This is a sentence about \\\" + gen('text', stop_regex=\\\" [a-z][a-z][a-z][^a-z]\\\", save_stop_text=True, temperature=1.0)\\n\",\n    \"out[\\\"text_stop_text\\\"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 25,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ent</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>reprene</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>urs</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>hip</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Ent</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>reprene</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>urs</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>hip</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> is</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> a dynamic</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> process</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of creating</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> something</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"' new '\"\n      ]\n     },\n     \"execution_count\": 25,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# stop on any three letter word, and then print the word that was stopped on\\n\",\n    \"out = gpt3 + \\\"This is a sentence about \\\" + gen('text', stop_regex=\\\" [a-z][a-z][a-z][^a-z]\\\", save_stop_text=\\\"stop\\\", temperature=1.0)\\n\",\n    \"out[\\\"stop\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `max_tokens` keyword argument\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 26,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> way</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> that</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> world</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> works</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> It</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>&#x27;s</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> not</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7ff5dcf5fd50>\"\n      ]\n     },\n     \"execution_count\": 26,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"gpt2 + \\\"This is a sentence about \\\" + gen('text', max_tokens=10)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `n` keyword argument\\n\",\n    \"\\n\",\n    \"The `n` argument controls how many generations to perform in a batch. If `n > 1` then only the first completion is used for future contex, and the rest are just stored in the variable.\\n\",\n    \"\\n\",\n    \"**NOTE! This is still a TODO for version `v0.1+`, use a `for` loop for now.**\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 30,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['the act of munch',\\n\",\n       \" 'the contradiction between defend one',\\n\",\n       \" 'genre writing, but here',\\n\",\n       \" 'a giant frog.\\\\n',\\n\",\n       \" \\\"how there's a loss\\\"]\"\n      ]\n     },\n     \"execution_count\": 30,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# use a for loop for now\\n\",\n    \"lm = gpt2\\n\",\n    \"lm.echo = False # don't draw to notebook\\n\",\n    \"lm += \\\"This is a fun sentence about \\\"\\n\",\n    \"texts = []\\n\",\n    \"for _ in range(5):\\n\",\n    \"    out = lm + gen('text', max_tokens=5, temperature=1.0)\\n\",\n    \"    texts.append(out[\\\"text\\\"])\\n\",\n    \"texts\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `temperature` keyword argument\\n\",\n    \"\\n\",\n    \"The `temperature` argument controls the sampling temperature and is passed directly to the LLM. By default `temperature` is set to 0 and the LLM does greedy sampling. This allows the LM calls to be cached and reused. If the `temperature` is set to a value greater than 0 then the LLM will do sampling and repeated calls in the same LM session (program execution) will lead to new generations (though re-runs of the same program may use caches for each of those calls in the future).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 31,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['how to make a good',\\n\",\n       \" 'how to make a good',\\n\",\n       \" 'how to make a good',\\n\",\n       \" 'how to make a good',\\n\",\n       \" 'how to make a good']\"\n      ]\n     },\n     \"execution_count\": 31,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# with a zero temperature, the generated text will be the same each time\\n\",\n    \"lm = gpt2\\n\",\n    \"lm.echo = False # don't draw to notebook\\n\",\n    \"lm += \\\"This is a fun sentence about \\\"\\n\",\n    \"texts = []\\n\",\n    \"for _ in range(5):\\n\",\n    \"    out = lm + gen('text', max_tokens=5)\\n\",\n    \"    texts.append(out[\\\"text\\\"])\\n\",\n    \"texts\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 33,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['dragons. How often entrants',\\n\",\n       \" \\\"friendliness I don't\\\",\\n\",\n       \" 'finding out about its competitors',\\n\",\n       \" 'a stray photograph sprawled',\\n\",\n       \" 'lots of suggestions we might']\"\n      ]\n     },\n     \"execution_count\": 33,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm = gpt2\\n\",\n    \"lm.echo = False # don't draw to notebook\\n\",\n    \"lm += \\\"This is a fun sentence about \\\"\\n\",\n    \"texts = []\\n\",\n    \"for _ in range(5):\\n\",\n    \"    out = lm + gen('text', max_tokens=5, temperature=1.0)\\n\",\n    \"    texts.append(out[\\\"text\\\"])\\n\",\n    \"texts\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `top_p` keyword argument\\n\",\n    \"\\n\",\n    \"The `top_p` argument controls the proportion of the probability space used from sampling. By default it is 1.0, so we sample from the whole space. Note that setting `top_p` only matters if you have a non-zero `temperature` value.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 34,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# NOT YET SUPPORTED in v0.1!\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `regex` keyword argument\\n\",\n    \"\\n\",\n    \"The `regex` argument is a regular expression that is used to contrain the text generated by the LM. When pattern is given only token that represent valid extensions of the pattern will be generated. This can be useful for enforcing formats (like only numbers). Just remember that the model does plan in advance for this contraint (yet), so you need to specify a format the model is already familar with.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 35,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>This is a sentence about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>2</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7ff5f7df8d90>\"\n      ]\n     },\n     \"execution_count\": 35,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"gpt2 + \\\"This is a sentence about \\\" + gen('text', regex=\\\"[0-9 ]+\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## `list_append` keyword argument\\n\",\n    \"\\n\",\n    \"When the `list_append` argument is True then the results of the generation will appended to the list given by the `name` argument. If not list exists with that name then a new list will be created. This can be a useful alternative to using the `geneach` command in some circumstances.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 40,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Write three story title options about the arctic circle:\\n\",\n       \"OUTLINE\\n\",\n       \"1.<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> &quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Frozen</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> North</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> A</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Journey</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Through</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Arctic</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Circle</span>&quot;\\n\",\n       \"2.<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> &quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Expl</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>oring</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Arctic</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> A</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Tale</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Adventure</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> and</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Discovery</span>&quot;\\n\",\n       \"3.<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> &quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Ic</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>y</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Depths</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Arctic</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> A</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Voy</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>age</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Discovery</span>&quot;<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['The Icy Depths of the Arctic: A Voyage of Discovery',\\n\",\n       \" 'Exploring the Arctic: A Tale of Adventure and Discovery',\\n\",\n       \" 'The Frozen North: A Journey Through the Arctic Circle']\"\n      ]\n     },\n     \"execution_count\": 40,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"out = gpt3 + f\\\"\\\"\\\"\\\\\\n\",\n    \"Write three story title options about the arctic circle:\\n\",\n    \"OUTLINE\\n\",\n    \"1. \\\"{gen('story', max_tokens=20, list_append=True, stop='\\\"')}\\\"\\n\",\n    \"2. \\\"{gen('story', max_tokens=20, list_append=True, stop='\\\"')}\\\"\\n\",\n    \"3. \\\"{gen('story', max_tokens=20, list_append=True, stop='\\\"')}\\\"\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"out[\\\"story\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"adatest\",\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.5\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/api_examples/models/AzureOpenAI.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"882fb634-0efc-42bf-8cc5-79d6a7312e26\",\n   \"metadata\": {},\n   \"source\": [\n    \"# `AzureOpenAI` API Examples\\n\",\n    \"\\n\",\n    \"You can also use an OpenAI model deployed into Azure AI.\\n\",\n    \"For this, you will provide a few pieces of information from the Azure AI playground:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"6b887dab\",\n   \"metadata\": {\n    \"tags\": [\n     \"parameters\",\n     \"remove-cell\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"call_delay_secs = 0\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"61665201-12a8-4588-bb54-801a367c7535\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"\\n\",\n    \"# If using DefaultAzureCredential below\\n\",\n    \"from azure.identity import DefaultAzureCredential, get_bearer_token_provider\\n\",\n    \"\\n\",\n    \"# This is the name of the model deployed, such as 'gpt-4' or 'gpt-3.5-turbo\\n\",\n    \"model = os.getenv(\\\"AZUREAI_OPENAI_CHAT_MODEL\\\", \\\"Please set the model\\\")\\n\",\n    \"\\n\",\n    \"# This is the deployment URL, as provided in the Azure AI playground ('view code')\\n\",\n    \"# It will end with 'openai.azure.com'\\n\",\n    \"azure_endpoint = os.getenv(\\\"AZUREAI_OPENAI_CHAT_ENDPOINT\\\", \\\"Please set the endpoint\\\")\\n\",\n    \"\\n\",\n    \"# This is the name of the deployment specified in the Azure portal\\n\",\n    \"azure_deployment = os.getenv(\\\"AZUREAI_OPENAI_CHAT_DEPLOYMENT_NAME\\\", \\\"Please set the deployment name\\\")\\n\",\n    \"\\n\",\n    \"# This is the deployed API version, such as 2024-02-15-preview\\n\",\n    \"azure_api_version = os.getenv(\\\"AZUREAI_OPENAI_CHAT_API_VERSION\\\", \\\"Please set the API version\\\")\\n\",\n    \"\\n\",\n    \"# The environment variable should be set to the API key from the Azure AI playground:\\n\",\n    \"# api_key=os.getenv(\\\"AZUREAI_CHAT_KEY\\\", \\\"Please set API key\\\")\\n\",\n    \"\\n\",\n    \"# Alternatively, we can use Entra authentication\\n\",\n    \"token_provider = get_bearer_token_provider(\\n\",\n    \"     DefaultAzureCredential(),\\n\",\n    \"     \\\"https://cognitiveservices.azure.com/.default\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"c3203ea1-00b7-4cc6-9b92-5167d453a790\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can now construct the `guidance` model object:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"29187b26-93bc-459f-bb9d-ac22feef473a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"from guidance.models import create_azure_openai_model\\n\",\n    \"\\n\",\n    \"azureai_model = create_azure_openai_model(\\n\",\n    \"    model_name=model,\\n\",\n    \"    azure_deployment=azure_deployment,\\n\",\n    \"    azure_endpoint=azure_endpoint,\\n\",\n    \"    api_version=azure_api_version,\\n\",\n    \"    # For authentication, use either\\n\",\n    \"    # api_key=api_key\\n\",\n    \"    # or\\n\",\n    \"    azure_ad_token_provider=token_provider,\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"2f95b1ef-402a-4b96-b0b0-a0bd007d582b\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can use the model as before:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"4b03a844-0c4c-446e-91ed-408494114d3a\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"51bdb8322c0141e2beeff23b44038e57\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import system, user, assistant\\n\",\n    \"\\n\",\n    \"with system():\\n\",\n    \"    lm = azureai_model + \\\"You are a helpful assistant.\\\"\\n\",\n    \"    \\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What is the meaning of life?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(\\\"response\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"id\": \"da5ea477\",\n   \"metadata\": {\n    \"tags\": [\n     \"remove-cell\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import time\\n\",\n    \"\\n\",\n    \"time.sleep(call_delay_secs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7fa274c5-01c6-46f9-a024-b8b44e16ce2c\",\n   \"metadata\": {},\n   \"source\": [\n    \"AOAI models also support constrained generation using JSON:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"id\": \"e8c9d8ff-99e2-4806-8ff5-7f57491d7361\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"80096e94cb064664a78cc159bece59b0\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"{\\n\",\n      \"    \\\"name\\\": \\\"Whiskers\\\",\\n\",\n      \"    \\\"age\\\": 3,\\n\",\n      \"    \\\"colour\\\": [\\n\",\n      \"        255,\\n\",\n      \"        200,\\n\",\n      \"        150\\n\",\n      \"    ]\\n\",\n      \"}\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import json\\n\",\n    \"\\n\",\n    \"from guidance import json as gen_json\\n\",\n    \"\\n\",\n    \"cat_schema = {\\n\",\n    \"    \\\"type\\\": \\\"object\\\",\\n\",\n    \"    \\\"properties\\\": {\\n\",\n    \"        \\\"name\\\": {\\\"type\\\": \\\"string\\\", \\\"minLength\\\": 4},\\n\",\n    \"        \\\"age\\\": {\\\"type\\\": \\\"integer\\\", \\\"minimum\\\": 0, \\\"maximum\\\": 20},\\n\",\n    \"        \\\"colour\\\": {\\n\",\n    \"            \\\"type\\\": \\\"array\\\",\\n\",\n    \"            \\\"items\\\": {\\\"type\\\": \\\"integer\\\", \\\"minimum\\\": 0, \\\"maximum\\\": 255},\\n\",\n    \"            \\\"minItems\\\": 3,\\n\",\n    \"            \\\"maxItems\\\": 3,\\n\",\n    \"        },\\n\",\n    \"    },\\n\",\n    \"    \\\"required\\\": [\\\"name\\\", \\\"age\\\", \\\"colour\\\"],\\n\",\n    \"    \\\"additionalProperties\\\": False,\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"with system():\\n\",\n    \"    lm = azureai_model + \\\"You are an expert in the ancient lore of cats\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"Create a simple description of a cat in JSON, including the name, age & colour\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen_json(schema=cat_schema, name=\\\"my_cat_text\\\", temperature=1.0)\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"my_cat = json.loads(lm[\\\"my_cat_text\\\"])\\n\",\n    \"\\n\",\n    \"print(json.dumps(my_cat, indent=4))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"id\": \"d5266819\",\n   \"metadata\": {\n    \"tags\": [\n     \"remove-cell\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"time.sleep(call_delay_secs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0c94fb3a-df2e-45e8-9fe5-134a0868dbf1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.13.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "notebooks/api_examples/models/OpenAI.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# `OpenAI` API examples\\n\",\n    \"\\n\",\n    \"This notebook contains examples of how to use the `OpenAI` LLM.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Chat usage\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"35202c6828f843c591c6a77fadacb339\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import gen, system, user, assistant\\n\",\n    \"from guidance.models import OpenAI\\n\",\n    \"\\n\",\n    \"# Set the OPENAI_API_KEY environment variable first!\\n\",\n    \"lm = OpenAI('gpt-4.1')\\n\",\n    \"\\n\",\n    \"with system():\\n\",\n    \"    lm += \\\"You only speak in ALL CAPS.\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What is the captial of Greenland?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('answer', max_tokens=20)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \".venv\",\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.12.11\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/api_examples/models/TogetherAI.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# `TogetherAI` API examples\\n\",\n    \"\\n\",\n    \"This notebook contains examples of how to use the `TogetherAI` LLM, utilizing models hosted by [together.ai](https://together.ai).\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Completion usage\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>The most famous piece of japanese literature in a JSON format is:\\n\",\n       \"{\\n\",\n       \"    &quot;title_english&quot;:<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>  </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>&quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Tal</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>e</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Gen</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ji</span>&quot;,\\n\",\n       \"    &quot;title_japanese&quot;:<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> &quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>源</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>氏</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>物</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>語</span>&quot;,\\n\",\n       \"    &quot;author&quot;:<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> &quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Mu</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ras</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>aki</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Sh</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>iki</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>bu</span>&quot;,\\n\",\n       \"    &quot;year&quot;:<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>1</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>0</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>0</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>8</span>\\n\",\n       \"}\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"\\n\",\n    \"# This relies on the environment variable TOGETHERAI_API_KEY being set\\n\",\n    \"mixtral = models.TogetherAI('mistralai/Mixtral-8x7B-v0.1')\\n\",\n    \"\\n\",\n    \"lm = mixtral\\n\",\n    \"\\n\",\n    \"stop_tokens = [\\\",\\\", \\\"}\\\", \\\"\\\\n\\\"]\\n\",\n    \"temperature = 0.0\\n\",\n    \"\\n\",\n    \"lm += f\\\"\\\"\\\"The most famous piece of japanese literature in a JSON format is:\\n\",\n    \"{{\\n\",\n    \"    \\\"title_english\\\": {gen(name='title_english', temperature=temperature, max_tokens=50, stop=stop_tokens)},\\n\",\n    \"    \\\"title_japanese\\\": {gen(name='title_japanese', temperature=temperature, max_tokens=50, stop=stop_tokens)},\\n\",\n    \"    \\\"author\\\": {gen(name='author', temperature=temperature, max_tokens=50, stop=stop_tokens)},\\n\",\n    \"    \\\"year\\\": {gen(name='year', temperature=temperature, max_tokens=50, stop=stop_tokens)}\\n\",\n    \"}}\\n\",\n    \"\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Instruct usage\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>instruction</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>What is ice cream refered to as in Italy?</div></div><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Gel</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ato</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import instruction\\n\",\n    \"\\n\",\n    \"# This relies on the environment variable TOGETHERAI_API_KEY being set\\n\",\n    \"gemma = models.TogetherAIInstruct('google/gemma-7b-it')\\n\",\n    \"\\n\",\n    \"lm = gemma\\n\",\n    \"with instruction():\\n\",\n    \"    lm += \\\"What is ice cream refered to as in Italy?\\\"\\n\",\n    \"lm += gen('flavor', max_tokens=50, stop='\\\\n')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Chat usage\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You only speak in ALL CAPS for the entirety of your response.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>What is the captial of Trinidad &amp; Tobago?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>PORT</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> OF</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> SP</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>AIN</span></div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import system, user, assistant\\n\",\n    \"\\n\",\n    \"# This relies on the environment variable TOGETHERAI_API_KEY being set\\n\",\n    \"hermes = models.TogetherAIChat('NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO')\\n\",\n    \"\\n\",\n    \"lm = hermes\\n\",\n    \"\\n\",\n    \"with system():\\n\",\n    \"    lm += \\\"You only speak in ALL CAPS for the entirety of your response.\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What is the captial of Trinidad & Tobago?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('answer', max_tokens=50, temperature=0.0, stop=\\\".\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"adatest\",\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.3\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/art_of_prompt_design/prompt_boundaries_and_token_healing.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"`The Art of Prompt Design`\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Prompt Boundaries and Token Healing\\n\",\n    \"\\n\",\n    \"This (written jointly with <a href=\\\"https://medium.com/@marcotcr\\\">Marco Tulio Ribeiro</a>) is part 2 of a series on <b>the art of prompt design</b> (part 1 <a href=\\\"https://medium.com/towards-data-science/the-art-of-prompt-design-use-clear-syntax-4fc846c1ebd5\\\">here</a>), where we talk about controlling large language models (LLMs) with <a href=\\\"https://github.com/microsoft/guidance\\\">`guidance`</a>.\\n\",\n    \"\\n\",\n    \"In this post, we'll discuss how the greedy tokenization methods used by language models can introduce unintended token splits into your prompts, leading to puzzling generations.\\n\",\n    \"\\n\",\n    \"Language models are not trained on raw text, but rather on tokens, which are chunks of text that often occur together, similar to words. This impacts how language models 'see' text, including prompts (since prompts are just sets of tokens). GPT-style models utilize tokenization methods like [Byte Pair Encoding](https://en.wikipedia.org/wiki/Byte_pair_encoding) (BPE), which map all input bytes to token ids in an optimized/greedy manner. This is fine for training, but it can lead to subtle issues during inference, as shown in the example below.\\n\",\n    \"\\n\",\n    \"<!-- TODO\\n\",\n    \"Standard greedy token mapping works well during training, but it can lead to subtle issues during prompting and inference. These issues arise because the greedy token boundaries often don't line up with the end of the prompt, especially when considering the generated tokens that will come next. While the end of a prompt will always align with a token boundary in practice, as the prompt is tokenized before being extended by the model, there may be instances where the first characters of the completion are part of a longer token that would span the prompt boundary. In such cases, the longer token cannot be used even though the model would expect it based on the training data.\\n\",\n    \"\\n\",\n    \"The inability to use tokens that span prompt boundaries can lead to subtle yet important biases in the model's output. -->\\n\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## An example of a prompt boundary problem\\n\",\n    \"Consider the following example, where we are trying to generate an HTTP URL string:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"9f8122cee6644f8580553af690800002\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'The link is <a href=\\\"http: //www.google.com/search?q'\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"import transformers\\n\",\n    \"\\n\",\n    \"# we use StableLM as an example, but these issues impact all models to varying degrees\\n\",\n    \"generator = transformers.pipeline('text-generation', model='stabilityai/stablelm-base-alpha-3b')\\n\",\n    \"\\n\",\n    \"def raw_gen(prompt, temp=0):\\n\",\n    \"    kwargs = {}\\n\",\n    \"    if temp > 0:\\n\",\n    \"        kwargs[\\\"temperature\\\"] = temp\\n\",\n    \"        kwargs[\\\"do_sample\\\"] = True\\n\",\n    \"    return generator(prompt, max_new_tokens=10, pad_token_id=0, **kwargs)[0][\\\"generated_text\\\"]\\n\",\n    \"raw_gen('The link is <a href=\\\"http:')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"9f8122cee6644f8580553af690800002\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'The link is <a href=\\\"http: //www.google.com/search?q'\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import transformers\\n\",\n    \"\\n\",\n    \"# we use StableLM as an example, but these issues impact all models to varying degrees\\n\",\n    \"generator = transformers.pipeline('text-generation', model='stabilityai/stablelm-base-alpha-3b')\\n\",\n    \"\\n\",\n    \"def raw_gen(prompt):\\n\",\n    \"    return generator(prompt, max_new_tokens=10, pad_token_id=0)[0][\\\"generated_text\\\"]\\n\",\n    \"raw_gen('The link is <a href=\\\"http:')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that the output generated by the LLM does not complete the url with the obvious next characters (two forward slashes). It instead creates an invalid URL string with a space in the middle. This is surprising, because the `//` completion is extremely obvious after `http:`. To understand why this happens, let's change our prompt boundary so that our prompt does not include the colon character:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'The link is <a href=\\\"http://www.youtube.com/v/s'\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"raw_gen('The link is <a href=\\\"http')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now the language model generates a valid url string like we expect. To understand why the  `:` matters, we need to look at the tokenized representation of the prompts. Below is the tokenization of the prompt that ends in a colon (the prompt without the colon has the same tokenization, except for the last token):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"len = 9\\n\",\n      \"510\\t`The`\\n\",\n      \"3048\\t` link`\\n\",\n      \"310\\t` is`\\n\",\n      \"654\\t` <`\\n\",\n      \"66\\t`a`\\n\",\n      \"3860\\t` href`\\n\",\n      \"568\\t`=\\\"`\\n\",\n      \"2413\\t`http`\\n\",\n      \"27\\t`:`\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"def print_tokens(tokens):\\n\",\n    \"    print(\\\"len = \\\" + str(len(tokens)))\\n\",\n    \"    for i in tokens:\\n\",\n    \"        print(str(i) + \\\"\\\\t`\\\" + generator.tokenizer.decode([i]) + \\\"`\\\")\\n\",\n    \"\\n\",\n    \"print_tokens(generator.tokenizer.encode('The link is <a href=\\\"http:'))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now note what the tokenization of a valid URL looks like, paying careful attention to token `1358`, right after `http`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"len = 18\\n\",\n      \"510\\t`The`\\n\",\n      \"3048\\t` link`\\n\",\n      \"310\\t` is`\\n\",\n      \"654\\t` <`\\n\",\n      \"66\\t`a`\\n\",\n      \"3860\\t` href`\\n\",\n      \"568\\t`=\\\"`\\n\",\n      \"2413\\t`http`\\n\",\n      \"1358\\t`://`\\n\",\n      \"2700\\t`www`\\n\",\n      \"15\\t`.`\\n\",\n      \"9906\\t`google`\\n\",\n      \"15\\t`.`\\n\",\n      \"681\\t`com`\\n\",\n      \"16\\t`/`\\n\",\n      \"8716\\t`search`\\n\",\n      \"32\\t`?`\\n\",\n      \"82\\t`q`\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print_tokens(generator.tokenizer.encode('The link is <a href=\\\"http://www.google.com/search?q'))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This particular LLM uses a greedy/optimized tokenization method, almost always preferring the longest possible token, i.e. `://` will be preferred over `:` in full text (e.g. in training).\\n\",\n    \"\\n\",\n    \"While URLs in training are encoded with token 1358 (`://`), our prompt makes the LLM see token `27` (`:`) instead, which throws off completion by artificially splitting `://`.\\n\",\n    \"In fact, the model can be pretty sure that seeing token `27` (`:`) means what comes next is very unlikely to be anything that could have been encoded together with the colon using a \\\"longer token\\\" like `://`, since in the model's training data those characters would have been encoded together with the colon (an exception to this that we will discuss later is <a href=\\\"https://arxiv.org/abs/1804.10959\\\">subword regularization</a> during training). The fact that seeing a token means both seeing the embedding of that token **and also** that whatever comes next wasn't compressed by the greedy tokenizer is easy to forget, but it is important in prompt boundaries.\\n\",\n    \"\\n\",\n    \"Let's search over the string representation of all the tokens in the model's vocabulary, to see which ones start with a colon:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"len = 34\\n\",\n      \"27\\t`:`\\n\",\n      \"1358\\t`://`\\n\",\n      \"1450\\t`::`\\n\",\n      \"5136\\t`:\\\"`\\n\",\n      \"6098\\t`:**`\\n\",\n      \"8048\\t`:\\\\`\\n\",\n      \"10477\\t`:(`\\n\",\n      \"13522\\t`:=`\\n\",\n      \"18031\\t`:\\\"){`\\n\",\n      \"18459\\t`:#`\\n\",\n      \"19282\\t`:</`\\n\",\n      \"21382\\t`:[`\\n\",\n      \"21610\\t`:/`\\n\",\n      \"22314\\t`:-`\\n\",\n      \"22426\\t`:'`\\n\",\n      \"23338\\t`:_`\\n\",\n      \"25731\\t`:@\\\"`\\n\",\n      \"25942\\t`:=\\\\`\\n\",\n      \"27506\\t`:*`\\n\",\n      \"27976\\t`:%`\\n\",\n      \"30337\\t`:``\\n\",\n      \"34417\\t`:]`\\n\",\n      \"35490\\t`:$`\\n\",\n      \"37731\\t`:)`\\n\",\n      \"41210\\t`::::`\\n\",\n      \"41924\\t`:{`\\n\",\n      \"42841\\t`:--`\\n\",\n      \"43118\\t`:.`\\n\",\n      \"44662\\t`:&`\\n\",\n      \"46064\\t`:\\\")`\\n\",\n      \"46186\\t`:{\\\\`\\n\",\n      \"47279\\t`:$$\\\\`\\n\",\n      \"48471\\t`:**]{}`\\n\",\n      \"49777\\t`:\\\",`\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"tokens = generator.tokenizer.convert_ids_to_tokens(range(generator.tokenizer.vocab_size))\\n\",\n    \"colon_tokens = [i for i,t in enumerate(tokens) if t.startswith(\\\":\\\")]\\n\",\n    \"print_tokens(colon_tokens)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that there are **34** different tokens starting with a colon, and thus ending a prompt with a colon means the model will likely not generate completions with any of these 34 token strings. *This subtle and powerful bias can have all kinds of unintended consequences.* And this applies to **any** string that could be potentially extended to make a longer single token (not just `:`).  Even our \\\"fixed\\\" prompt ending with \\\"http\\\" has a built in bias as well, as it communicates to the model that what comes after \\\"http\\\" is likely not \\\"s\\\" (otherwise \\\"http\\\" would not have been encoded as a separate token):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"len = 2\\n\",\n      \"2413\\t`http`\\n\",\n      \"3614\\t`https`\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"http_tokens = [i for i,t in enumerate(tokens) if t.startswith(\\\"http\\\")]\\n\",\n    \"print_tokens(http_tokens)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Lest you think this is an arcane problem that only touches URLs, remember that most tokenizers treat tokens differently depending on whether they start with a space, punctuation, quotes, etc, and thus **ending a prompt with any of these can lead to wrong token boundaries**, and break things:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'I read a book about ~~the~~ the history of the world and the'\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# Accidentally adding a space, will lead to weird generation\\n\",\n    \"raw_gen('I read a book about ')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'I read a book about the history of the New Orleans Mafia and the'\"\n      ]\n     },\n     \"execution_count\": 8,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# No space, works as expected\\n\",\n    \"raw_gen('I read a book about')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Another example of this is the \\\"[\\\" character. Consider the following prompt and completion:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'An example [\\\"like this\\\"] and another example [like this] are shown in FIG. 1.'\"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# guidance('''An example [\\\"like this\\\"] and another example [{{gen max_tokens=10 token_healing=False}}''', caching=False)()\\n\",\n    \"raw_gen('An example [\\\"like this\\\"] and another example [')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Why is the second string not quoted? Because by ending our prompt with the ' [' token, we are telling the model that it should not generate completions that match the following 27 longer tokens (one of which adds the quote character, `15640`):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"len = 27\\n\",\n      \"544\\t` [`\\n\",\n      \"1008\\t` [@`\\n\",\n      \"3921\\t` [*`\\n\",\n      \"4299\\t` [**`\\n\",\n      \"8168\\t` []`\\n\",\n      \"8605\\t` [[`\\n\",\n      \"14412\\t` ['`\\n\",\n      \"15640\\t` [\\\"`\\n\",\n      \"16731\\t` [$`\\n\",\n      \"20629\\t` [$\\\\`\\n\",\n      \"21810\\t` [(`\\n\",\n      \"21938\\t` […]`\\n\",\n      \"23734\\t` [****,`\\n\",\n      \"24345\\t` [],`\\n\",\n      \"24430\\t` [\\\\`\\n\",\n      \"26991\\t` [];`\\n\",\n      \"27075\\t` [^`\\n\",\n      \"27501\\t` []{`\\n\",\n      \"28591\\t` [-`\\n\",\n      \"31789\\t` [...]`\\n\",\n      \"33440\\t` [{`\\n\",\n      \"42989\\t` [_`\\n\",\n      \"43521\\t` [<`\\n\",\n      \"44308\\t` [``\\n\",\n      \"44965\\t` [[*`\\n\",\n      \"49193\\t` [#`\\n\",\n      \"49824\\t` [(\\\\[`\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"space_bracket_tokens = [i for i,t in enumerate(tokens) if t .startswith(\\\"Ġ[\\\")] # note the Ġ is converted to a space by the tokenizer\\n\",\n    \"print_tokens(space_bracket_tokens)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Token boundary bias happens everywhere. *About 70% of the 10k most common tokens for the StableLM model used above are prefixes of longer possible tokens, and so cause token boundary bias when they are the last token in a prompt.* Keeping track of all these possible extension biases during prompt design is impractical so most people just ignore them.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"69.49%\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# count the number of tokens that have longer extensions\\n\",\n    \"count = 0\\n\",\n    \"for i in range(10000):\\n\",\n    \"    m = 0\\n\",\n    \"    for j in range(generator.tokenizer.vocab_size):\\n\",\n    \"        if tokens[j].startswith(tokens[i]):\\n\",\n    \"            m += 1\\n\",\n    \"        if m > 1:\\n\",\n    \"            break\\n\",\n    \"    # m = guidance.llm.prefix_matches(guidance.llm.decode([i]))\\n\",\n    \"    if m > 1:\\n\",\n    \"        count += 1\\n\",\n    \"print(str(100*count/10000)+\\\"%\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Fixing unintended bias with \\\"token healing\\\"\\n\",\n    \"\\n\",\n    \"What can we do to avoid these unintended biases? One option is to always end our prompts with tokens that cannot be extended into longer tokens (for example a role tag for chat-based models), but this is a severe limitation.  \\n\",\n    \"\\n\",\n    \"Instead, `guidance` has a feature called \\\"token healing\\\", which automatically backs up the generation process by one token before the end of the prompt, then constrains the first token generated to have a prefix that matches the last token in the prompt. In our URL example, this would mean removing the `:`, and forcing generation of the first token to have a `:` prefix.   \\n\",\n    \"Token healing allows users to express prompts however they wish, without worrying about token boundaries.\\n\",\n    \"\\n\",\n    \"For example, let's re-run some of the URL examples above with token healing turned on (it's on by default for Transformer models, so we remove `token_healing=False`):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>The link is &lt;a href=&quot;http:<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>//</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>man</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>7</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>now</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>com</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>/</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ann</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>ounce</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>/</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7faad5dbc310>\"\n      ]\n     },\n     \"execution_count\": 12,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"\\n\",\n    \"# load StableLM from huggingface\\n\",\n    \"lm = models.Transformers(\\\"stabilityai/stablelm-base-alpha-3b\\\", device=0)\\n\",\n    \"\\n\",\n    \"# With token healing we generate valid URLs, even when the prompt ends with a colon:\\n\",\n    \"lm + 'The link is <a href=\\\"http:' + gen(max_tokens=10)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>The link is &lt;a href=&quot;http<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>://</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>download</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>mac</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>rom</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>edia</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>com</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>/</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>get</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['The link is <a href=\\\"https://www.goal.com/en-',\\n\",\n       \" 'The link is <a href=\\\"http://man7now0uvers.com/',\\n\",\n       \" 'The link is <a href=\\\"http://889946.com/Vista-',\\n\",\n       \" 'The link is <a href=\\\"http://download28.yellowoya.com/mov',\\n\",\n       \" 'The link is <a href=\\\"https://github.com/oraoutdoor/',\\n\",\n       \" 'The link is <a href=\\\"https://chrome.google.com/webstore',\\n\",\n       \" 'The link is <a href=\\\"http://usat.org/album/19/',\\n\",\n       \" 'The link is <a href=\\\"http://manapama.org/store_video',\\n\",\n       \" 'The link is <a href=\\\"https://www.hrefng.com/template',\\n\",\n       \" 'The link is <a href=\\\"http://download.macromedia.com/get']\"\n      ]\n     },\n     \"execution_count\": 13,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"[str(lm + 'The link is <a href=\\\"http' + gen(max_tokens=10, temperature=1)) for i in range(10)]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Similarly, we don't have to worry about extra spaces:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>I read a book about <span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>a</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> little</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> girl</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> who</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> had</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7faad5e19fd0>\"\n      ]\n     },\n     \"execution_count\": 14,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"\\n\",\n    \"# Accidentally adding a space will not impact generation\\n\",\n    \"lm + 'I read a book about ' + gen(max_tokens=5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 15,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>I read a book about<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> a</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> little</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> girl</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> who</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> had</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> a</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7faadc78a150>\"\n      ]\n     },\n     \"execution_count\": 15,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# This will generate the same text as above \\n\",\n    \"lm + 'I read a book about' + gen(max_tokens=6)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Similarly, we now get quoted strings even when the prompt ends with a \\\" [\\\" token:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 16,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>An example [&quot;like this&quot;] and another example [<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>&quot;</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>like</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>&quot;]</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>Hi</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> I</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>&#x27;m</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> trying</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models.transformers._transformers.Transformers at 0x7faad5e42f90>\"\n      ]\n     },\n     \"execution_count\": 16,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm + 'An example [\\\"like this\\\"] and another example [' + gen(max_tokens=10)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## What about subword regularization?\\n\",\n    \"\\n\",\n    \"If you are familiar with how language models are trained, you may be wondering how <a href=\\\"https://arxiv.org/abs/1804.10959\\\">subword regularization</a> fits into all this. Subword regularization is a technique where during training sub-optimial tokenizations are randomly introduced to increase the model's robustness to token boundary issues. This means that the model does not always see the best tokenization. Subword regularization is great at helping the model be more robust to token boundaries, but it does not remove the bias that the model has towards the standard optimized (near greedy) tokenization. This means that while depending on the amount of subword regularization during training models may exhibit more or less token boundaries bias, all models still have this bias. And as shown above it can still have a powerful and unexpected impact on the model output.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Conclusion\\n\",\n    \"\\n\",\n    \"When you write prompts, remember that greedy tokenization can have a significant impact on how language models interpret your prompts, particularly when the prompt ends with a token that could be extended into a longer token. This easy-to-miss source of bias can impact your results in surprising and unintended ways.\\n\",\n    \"\\n\",\n    \"To address to this, either end your prompt with a non-extendable token, or use something like `guidance`'s \\\"token healing\\\" feature so you can to express your prompts however you wish, without worrying about token boundary artifacts. \"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Appendix: Did we just get unlucky with the link example?\\n\",\n    \"\\n\",\n    \"No, and random sampling can verify that:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['The link is <a href=\\\"http: //www.plawesomenet.com',\\n\",\n       \" 'The link is <a href=\\\"http:\\\\\\\\\\\\\\\\\\\\\\\\/\\\\\\\\/(a|iris|art.',\\n\",\n       \" 'The link is <a href=\\\"http:\\\\n```<a href=\\\"test.pdf\\\"',\\n\",\n       \" 'The link is <a href=\\\"http://www.ihg.com/hotels',\\n\",\n       \" 'The link is <a href=\\\"http:\\\\nTUTORIAL_REVIEW_PAGE']\"\n      ]\n     },\n     \"execution_count\": 17,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# with the colon we almost always get an invalid link\\n\",\n    \"[raw_gen('The link is <a href=\\\"http:', temp=1) for _ in range(5)]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 18,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['The link is <a href=\\\"http://www.youtube.com/linksyep',\\n\",\n       \" 'The link is <a href=\\\"http://www.realceteam.com/',\\n\",\n       \" 'The link is <a href=\\\"http://a.k-k-2.html',\\n\",\n       \" 'The link is <a href=\\\"http://www.scotlanded.gov.',\\n\",\n       \" 'The link is <a href=\\\"http://info.infoabooks.com/']\"\n      ]\n     },\n     \"execution_count\": 18,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# without the colon we always get a valid link\\n\",\n    \"[raw_gen('The link is <a href=\\\"http', temp=1) for _ in range(5)]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"base\",\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.5\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/art_of_prompt_design/rag.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"`The Art of Prompt Design`\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Retrevial Augmented Generation (RAG)\\n\",\n    \"\\n\",\n    \"In this notebook we create an example of a simple chatbot that searches the web in order to respond.  \\n\",\n    \"This is only meant as an example, and is not meant to be a state-of-the-art chatbot. *(and this notebook is a work in progress)*\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext autoreload\\n\",\n    \"%autoreload 2\\n\",\n    \"import guidance\\n\",\n    \"from guidance import models, gen, select, substring, string, prefix_tree, regex, user, assistant, system\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"llama2 = models.LlamaCpp(\\\"/home/marcotcr_google_com/work/models/llama-2-13b-chat.Q6_K.gguf\\\", n_gpu_layers=-1, n_ctx=4096)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"llama2 = models.OpenAI(\\\"gpt-3.5-turbo\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Code for calling a search engine (Bing)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"You need to set up a bing api project (it's free), and change the api_key file path below\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"import diskcache\\n\",\n    \"import pathlib\\n\",\n    \"import requests\\n\",\n    \"import html\\n\",\n    \"from urllib.parse import urlparse\\n\",\n    \"import urllib.parse\\n\",\n    \"import io\\n\",\n    \"import html\\n\",\n    \"import html.parser\\n\",\n    \"\\n\",\n    \"curr_dir = './'\\n\",\n    \"_bing_cache = diskcache.Cache(f\\\"{curr_dir}/../bing.diskcache\\\")\\n\",\n    \"\\n\",\n    \"with open(os.path.expanduser('/home/scottlundberg_google_com/.bing_api_key'), 'r') as file:\\n\",\n    \"    subscription_key = file.read().replace('\\\\n', '')\\n\",\n    \"\\n\",\n    \"class MLStripper(html.parser.HTMLParser):\\n\",\n    \"    def __init__(self):\\n\",\n    \"        super().__init__()\\n\",\n    \"        self.reset()\\n\",\n    \"        self.strict = False\\n\",\n    \"        self.convert_charrefs = True\\n\",\n    \"        self.text = io.StringIO()\\n\",\n    \"    def handle_data(self, d):\\n\",\n    \"        self.text.write(d)\\n\",\n    \"    def get_data(self):\\n\",\n    \"        return self.text.getvalue()\\n\",\n    \"\\n\",\n    \"def strip_tags(html):\\n\",\n    \"    s = MLStripper()\\n\",\n    \"    s.feed(html)\\n\",\n    \"    return s.get_data()\\n\",\n    \"\\n\",\n    \"def bing_search(search_terms, count=10):\\n\",\n    \"    if type(search_terms) == str:\\n\",\n    \"        search_terms = [search_terms]\\n\",\n    \"    search_url = \\\"https://api.bing.microsoft.com/v7.0/search\\\"\\n\",\n    \"\\n\",\n    \"    headers = {\\\"Ocp-Apim-Subscription-Key\\\": subscription_key}\\n\",\n    \"    search_results = []\\n\",\n    \"    for search_term in search_terms:\\n\",\n    \"        params = {\\\"q\\\": search_term, \\\"textDecorations\\\": True, \\\"textFormat\\\": \\\"HTML\\\", \\\"cout\\\": count}\\n\",\n    \"        params_key = search_term + \\\"-___-\\\" + str(count)\\n\",\n    \"        if params_key not in _bing_cache or \\\"webPages\\\" not in _bing_cache[params_key]:\\n\",\n    \"            response = requests.get(search_url, headers=headers, params=params)\\n\",\n    \"            response.raise_for_status()\\n\",\n    \"            _bing_cache[params_key] = response.json()\\n\",\n    \"        data = _bing_cache[params_key][\\\"webPages\\\"][\\\"value\\\"]\\n\",\n    \"        for r in data:\\n\",\n    \"            r[\\\"snippet_text\\\"] = strip_tags(r[\\\"snippet\\\"])\\n\",\n    \"        search_results.extend(data)\\n\",\n    \"    return search_results\\n\",\n    \"def top_snippets(query, n=3):\\n\",\n    \"    results = bing_search(query, count=n)[:n]\\n\",\n    \"    return [{'title': x['name'], 'snippet': x['snippet_text']} for x in results]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[1] President of the United States - Wikipedia\\n\",\n      \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States of America. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president ...\\n\",\n      \"\\n\",\n      \"[2] Joe Biden: The President | The White House\\n\",\n      \"Joe Biden The President Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the 47th Vice President of the United States. As...\\n\",\n      \"\\n\",\n      \"[3] Presidents, vice presidents, and first ladies | USAGov\\n\",\n      \"U.S. facts and figures Presidents, vice presidents, and first ladies Presidents, vice presidents, and first ladies Learn about the duties of president, vice president, and first lady of the United States. Find out how to contact and learn more about current and past leaders. President of the United States Vice president of the United States\\n\",\n      \"\\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"def format_snippets(snippets, start=1):\\n\",\n    \"    ret = ''\\n\",\n    \"    for i, s in enumerate(snippets, start=start):\\n\",\n    \"        title = s['title']\\n\",\n    \"        snippet = s['snippet']\\n\",\n    \"        ret += f'[{i}] {title}\\\\n'\\n\",\n    \"        ret += f'{snippet}\\\\n\\\\n'\\n\",\n    \"    return ret\\n\",\n    \"        \\n\",\n    \"print(format_snippets(top_snippets('current us president')))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Guidance code\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import gen, select, silent, capture, Tool, one_or_more, any_char, commit_point\\n\",\n    \"import collections\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"First, let's write an initial prompt with some few-shot examples of REACT.  \\n\",\n    \"This prompt is trying to get the model to:\\n\",\n    \"1. Search the web to find answers to questions\\n\",\n    \"2. Read snippets, extract quotes that are relevant (to minimize hallucination)\\n\",\n    \"3. Do extra searches if need\\n\",\n    \"4. Print all of the quotes it gathered (from all search queries)\\n\",\n    \"5. Answer\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def init_system(lm):\\n\",\n    \"    # silent makes this whole thing not appear in the jupyter notebook visualization\\n\",\n    \"    with silent():\\n\",\n    \"        with system():\\n\",\n    \"            lm += '''\\\\\\n\",\n    \"            You are a nice chatbot that answers users' queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n    \"            You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n    \"            After searching, if you find information in the snippets, you should extract quotes.\\n\",\n    \"            If you need, you can make multiple searches.\\n\",\n    \"            You should only ask the user for more information is their question is ambiguous.\\n\",\n    \"            If the snippets are ambiguous or don't contain enough information, you should make additional searches instead of asking the user.\\n\",\n    \"            Here are some example interactions:\\n\",\n    \"            ---\\n\",\n    \"            User: Who is the current president of the US?\\n\",\n    \"            Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n    \"            Act: search(current US president)\\n\",\n    \"            Observation: \\n\",\n    \"            [1] Joe Biden: The President | The White House\\n\",\n    \"            Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n    \"\\n\",\n    \"            [2] President of the United States - Wikipedia\\n\",\n    \"            The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n    \"\\n\",\n    \"            [3] List of presidents of the United States - Wikipedia\\n\",\n    \"            Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n    \"            \\n\",\n    \"            Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n    \"            Act: extract_quotes()\\n\",\n    \"            Question: Who is the current president of the US?\\n\",\n    \"            Relevant quotes from the snippets:\\n\",\n    \"            - Snippet 1: \\\"Joe Biden: The President | White House\\\"\\n\",\n    \"            - Snippet 3: \\\"The incumbent president is Joe Biden\\\"\\n\",\n    \"            Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n    \"            Act: list_quotes()\\n\",\n    \"            Question: Who is the current president of the US?\\n\",\n    \"            Query: current US president\\n\",\n    \"            - Snippet 1: \\\"Joe Biden: The President | White House\\\"\\n\",\n    \"            - Snippet 3: \\\"The incumbent president is Joe Biden\\\"\\n\",\n    \"            Thought: I will write a response now.\\n\",\n    \"            Act: respond(The current president of the US is Joe Biden)\\n\",\n    \"            ---\\n\",\n    \"            User: What is the capital of France?\\n\",\n    \"            Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don't need to search the web, and can respond.\\n\",\n    \"            Act: respond(The capital of France is Paris)\\n\",\n    \"            ---\\n\",\n    \"            User: What is the capital of Georgia?\\n\",\n    \"            Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n    \"            Act: respond(Do you mean the state or the country?)\\n\",\n    \"            Observation:\\n\",\n    \"            User: The state\\n\",\n    \"            Thought: The capital of Georgia probably didn't change since my database was last updated, so I can respond. \\n\",\n    \"            Act: respond(The capital of Georgia is Atlanta)\\n\",\n    \"            ---\\n\",\n    \"            User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n    \"            Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n    \"            Act: search(Ronaldinho Gaucho net worth)\\n\",\n    \"            Observation:\\n\",\n    \"            [1] Ronaldinho&#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n    \"            Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n    \"\\n\",\n    \"            [2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n    \"            Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n    \"\\n\",\n    \"            [3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp; Lifestyle - Players Bio\\n\",\n    \"            A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n    \"            \\n\",\n    \"            Thought: All snippets seem to talk about his net worth.\\n\",\n    \"            Act: extract_quotes()\\n\",\n    \"            Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n    \"            Relevant quotes from the snippets:\\n\",\n    \"            - Snippet 1: \\\"Ronaldinho’s net worth is estimated to be roughly $90 Million\\\"\\n\",\n    \"            - Snippet 2: \\\"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.\\\"\\n\",\n    \"            - Snippet 3: \\\"Ronaldinho has an outstanding net worth of $90 million\\\"\\n\",\n    \"            Thought: I still need to search for Messi's net worth and compare\\n\",\n    \"            Act: search(messi net worth)\\n\",\n    \"            Observation:\\n\",\n    \"            [1] Lionel Messi - Forbes\\n\",\n    \"            $130M 2023 The World's Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d'Or as the world's best...\\n\",\n    \"\\n\",\n    \"            [2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n    \"            CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n    \"\\n\",\n    \"            [3] Lionel Messi Net Worth\\n\",\n    \"            $600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n    \"\\n\",\n    \"            Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n    \"            Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n    \"            I will make the search narrower using quotes.\\n\",\n    \"            Act: search(messi \\\"net worth\\\")\\n\",\n    \"            Observation:\\n\",\n    \"            [1] Lionel Messi - Forbes\\n\",\n    \"            About Lionel Messi. Messi claimed the Ballon d'Or as the world's best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n    \"\\n\",\n    \"            [2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n    \"            His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That's according to Celebrity Net Worth. Advertisement\\n\",\n    \"\\n\",\n    \"            [3] Lionel Messi&#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n    \"            In 2023, Messi's net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi's extravagant lifestyle is a sleek Bentley...\\n\",\n    \"\\n\",\n    \"            Thought: Snippets 2 and 3 list his net worth.\\n\",\n    \"            Act: extract_quotes()\\n\",\n    \"            Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n    \"            Relevant quotes from the snippets:\\n\",\n    \"            - Snippet 2: \\\"His net worth is an eye-watering $600 million\\\"\\n\",\n    \"            - Snippet 3: \\\"In 2023, Messi's net worth is a staggering $620 million\\\"\\n\",\n    \"            Thought: I have all the information I need to respond, so I'll list the quotes and then respond.\\n\",\n    \"            Act: list_quotes()\\n\",\n    \"            Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n    \"            Query: Ronaldinho Gaucho net worth\\n\",\n    \"            - Snippet 1: \\\"Ronaldinho’s net worth is estimated to be roughly $90 Million\\\"\\n\",\n    \"            - Snippet 2: \\\"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.\\\"\\n\",\n    \"            - Snippet 3: \\\"Ronaldinho has an outstanding net worth of $90 million\\\"\\n\",\n    \"            Query: messi \\\"net worth\\\"\\n\",\n    \"            - Snippet 2: \\\"His net worth is an eye-watering $600 million\\\"\\n\",\n    \"            - Snippet 3: \\\"In 2023, Messi's net worth is a staggering $620 million\\\"\\n\",\n    \"            Thought: I will write a response now.\\n\",\n    \"            Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n    \"            '''\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now let's define the functions that search and extract quotes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def search(lm, query):\\n\",\n    \"    # Setting this for later use\\n\",\n    \"    lm = lm.set('query', query)\\n\",\n    \"    # This is where search actually gets called\\n\",\n    \"    lm = lm.set('snippets', format_snippets(top_snippets(query)))\\n\",\n    \"    lm += '\\\\nObservation:\\\\n' + lm['snippets']\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def extract_quotes(lm):\\n\",\n    \"    query = lm['query']\\n\",\n    \"    snippets = lm['snippets'].split('\\\\n\\\\n')[:-1]\\n\",\n    \"    snippet_substrings = [substring(x) for x in snippets]\\n\",\n    \"    # By default we have 3 snippets. The model can pick (1) which snippets it's going to quote, and then (2) a substring of that snippet\\n\",\n    \"    snippet = '- Snippet ' + select([\\n\",\n    \"        '1: \\\"' + snippet_substrings[0] + '\\\"',\\n\",\n    \"        '2: \\\"' + snippet_substrings[1] + '\\\"',\\n\",\n    \"        '3: \\\"' + snippet_substrings[2] + '\\\"',]) + '\\\\n'\\n\",\n    \"    # We can do one or more quotes\\n\",\n    \"    lm += capture(one_or_more(snippet), name='temp_gen')\\n\",\n    \"    # We save all of the quotes so that we can print them at the end\\n\",\n    \"    current_quotes = lm.get('current_quotes', '')\\n\",\n    \"    current_quotes += f'''Query: {query}\\\\n{lm['temp_gen']}'''\\n\",\n    \"    lm = lm.set('current_quotes', current_quotes)\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here is an example of search, and how it adds snippets to an lm:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>\\n\",\n       \"Observation:\\n\",\n       \"[1] President of the United States - Wikipedia\\n\",\n       \"t. e. The president of the United States ( POTUS) [A] is the head of state and head of government of the United States of America. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first ...\\n\",\n       \"\\n\",\n       \"[2] list of presidents of the United States - Encyclopedia Britannica\\n\",\n       \"As the head of the government of the United States, the president is arguably the most powerful government official in the world. The president is elected to a four-year term via an electoral college system. Since the Twenty-second Amendment was adopted in 1951, the American presidency has been\\n\",\n       \"\\n\",\n       \"[3] Presidents, vice presidents, and first ladies | USAGov\\n\",\n       \"U.S. facts and figures Presidents, vice presidents, and first ladies Presidents, vice presidents, and first ladies Learn about the duties of president, vice president, and first lady of the United States. Find out how to contact and learn more about current and past leaders. President of the United States Vice president of the United States\\n\",\n       \"\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = llama2 + search('current use president')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And here is an example of extract_quotes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>\\n\",\n       \"Observation:\\n\",\n       \"[1] President of the United States - Wikipedia\\n\",\n       \"t. e. The president of the United States ( POTUS) [A] is the head of state and head of government of the United States of America. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first ...\\n\",\n       \"\\n\",\n       \"[2] list of presidents of the United States - Encyclopedia Britannica\\n\",\n       \"As the head of the government of the United States, the president is arguably the most powerful government official in the world. The president is elected to a four-year term via an electoral college system. Since the Twenty-second Amendment was adopted in 1951, the American presidency has been\\n\",\n       \"\\n\",\n       \"[3] Presidents, vice presidents, and first ladies | USAGov\\n\",\n       \"U.S. facts and figures Presidents, vice presidents, and first ladies Presidents, vice presidents, and first ladies Learn about the duties of president, vice president, and first lady of the United States. Find out how to contact and learn more about current and past leaders. President of the United States Vice president of the United States\\n\",\n       \"\\n\",\n       \"Now I will extract quotes relevant to the question &quot;What does the president do?&quot;\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"ename\": \"ValueError\",\n     \"evalue\": \"The OpenAI model gpt-3.5-turbo is a Chat-based model and requires role tags in the prompt!             Make sure you are using guidance context managers like `with system():`, `with user():` and `with assistant():`             to appropriately format your guidance program for this type of model.\",\n     \"output_type\": \"error\",\n     \"traceback\": [\n      \"\\u001b[0;31m---------------------------------------------------------------------------\\u001b[0m\",\n      \"\\u001b[0;31mValueError\\u001b[0m                                Traceback (most recent call last)\",\n      \"Cell \\u001b[0;32mIn[9], line 1\\u001b[0m\\n\\u001b[0;32m----> 1\\u001b[0m \\u001b[43mlm\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m+\\u001b[39;49m\\u001b[43m \\u001b[49m\\u001b[38;5;124;43m'\\u001b[39;49m\\u001b[38;5;124;43mNow I will extract quotes relevant to the question \\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mWhat does the president do?\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;130;43;01m\\\\n\\u001b[39;49;00m\\u001b[38;5;124;43m'\\u001b[39;49m\\u001b[38;5;241;43m+\\u001b[39;49m\\u001b[43m  \\u001b[49m\\u001b[43mextract_quotes\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_model.py:300\\u001b[0m, in \\u001b[0;36mModel.__add__\\u001b[0;34m(self, value)\\u001b[0m\\n\\u001b[1;32m    296\\u001b[0m     out \\u001b[38;5;241m=\\u001b[39m lm\\u001b[38;5;241m.\\u001b[39m_run_stateless(value)\\n\\u001b[1;32m    298\\u001b[0m \\u001b[38;5;66;03m# run stateful functions\\u001b[39;00m\\n\\u001b[1;32m    299\\u001b[0m \\u001b[38;5;28;01melse\\u001b[39;00m:\\n\\u001b[0;32m--> 300\\u001b[0m     out \\u001b[38;5;241m=\\u001b[39m \\u001b[43mvalue\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mlm\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m    301\\u001b[0m     \\u001b[38;5;28;01mif\\u001b[39;00m out \\u001b[38;5;129;01mis\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m:\\n\\u001b[1;32m    302\\u001b[0m         \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mException\\u001b[39;00m(\\u001b[38;5;124mf\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mA guidance function did not return a model object! Did you forget to return the new lm at the end of your function?\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m)\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/_grammar.py:45\\u001b[0m, in \\u001b[0;36mStatefulFunction.__call__\\u001b[0;34m(self, model)\\u001b[0m\\n\\u001b[1;32m     44\\u001b[0m \\u001b[38;5;28;01mdef\\u001b[39;00m \\u001b[38;5;21m__call__\\u001b[39m(\\u001b[38;5;28mself\\u001b[39m, model):\\n\\u001b[0;32m---> 45\\u001b[0m     \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mf\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mmodel\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43margs\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n      \"Cell \\u001b[0;32mIn[7], line 21\\u001b[0m, in \\u001b[0;36mextract_quotes\\u001b[0;34m(lm)\\u001b[0m\\n\\u001b[1;32m     16\\u001b[0m snippet \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m- Snippet \\u001b[39m\\u001b[38;5;124m'\\u001b[39m \\u001b[38;5;241m+\\u001b[39m select([\\n\\u001b[1;32m     17\\u001b[0m     \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m1: \\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m \\u001b[38;5;241m+\\u001b[39m snippet_substrings[\\u001b[38;5;241m0\\u001b[39m] \\u001b[38;5;241m+\\u001b[39m \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m,\\n\\u001b[1;32m     18\\u001b[0m     \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m2: \\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m \\u001b[38;5;241m+\\u001b[39m snippet_substrings[\\u001b[38;5;241m1\\u001b[39m] \\u001b[38;5;241m+\\u001b[39m \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m,\\n\\u001b[1;32m     19\\u001b[0m     \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m3: \\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m \\u001b[38;5;241m+\\u001b[39m snippet_substrings[\\u001b[38;5;241m2\\u001b[39m] \\u001b[38;5;241m+\\u001b[39m \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m,]) \\u001b[38;5;241m+\\u001b[39m \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;130;01m\\\\n\\u001b[39;00m\\u001b[38;5;124m'\\u001b[39m\\n\\u001b[1;32m     20\\u001b[0m \\u001b[38;5;66;03m# We can do one or more quotes\\u001b[39;00m\\n\\u001b[0;32m---> 21\\u001b[0m \\u001b[43mlm\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m+\\u001b[39;49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43m \\u001b[49m\\u001b[43mcapture\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mone_or_more\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43msnippet\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mname\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;124;43m'\\u001b[39;49m\\u001b[38;5;124;43mtemp_gen\\u001b[39;49m\\u001b[38;5;124;43m'\\u001b[39;49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m     22\\u001b[0m \\u001b[38;5;66;03m# We save all of the quotes so that we can print them at the end\\u001b[39;00m\\n\\u001b[1;32m     23\\u001b[0m current_quotes \\u001b[38;5;241m=\\u001b[39m lm\\u001b[38;5;241m.\\u001b[39mget(\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124mcurrent_quotes\\u001b[39m\\u001b[38;5;124m'\\u001b[39m, \\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m'\\u001b[39m)\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_model.py:296\\u001b[0m, in \\u001b[0;36mModel.__add__\\u001b[0;34m(self, value)\\u001b[0m\\n\\u001b[1;32m    294\\u001b[0m \\u001b[38;5;66;03m# run stateless functions (grammar nodes)\\u001b[39;00m\\n\\u001b[1;32m    295\\u001b[0m \\u001b[38;5;28;01melif\\u001b[39;00m \\u001b[38;5;28misinstance\\u001b[39m(value, StatelessFunction):\\n\\u001b[0;32m--> 296\\u001b[0m     out \\u001b[38;5;241m=\\u001b[39m \\u001b[43mlm\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_run_stateless\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mvalue\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m    298\\u001b[0m \\u001b[38;5;66;03m# run stateful functions\\u001b[39;00m\\n\\u001b[1;32m    299\\u001b[0m \\u001b[38;5;28;01melse\\u001b[39;00m:\\n\\u001b[1;32m    300\\u001b[0m     out \\u001b[38;5;241m=\\u001b[39m value(lm)\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_model.py:459\\u001b[0m, in \\u001b[0;36mModel._run_stateless\\u001b[0;34m(lm, stateless_function, temperature, top_p, n)\\u001b[0m\\n\\u001b[1;32m    457\\u001b[0m delayed_bytes \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;124mb\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\n\\u001b[1;32m    458\\u001b[0m \\u001b[38;5;66;03m# last_is_generated = False\\u001b[39;00m\\n\\u001b[0;32m--> 459\\u001b[0m \\u001b[38;5;28;01mfor\\u001b[39;00m new_bytes, is_generated, new_bytes_prob, capture_groups, capture_group_log_probs, new_token_count \\u001b[38;5;129;01min\\u001b[39;00m gen_obj:\\n\\u001b[1;32m    460\\u001b[0m \\n\\u001b[1;32m    461\\u001b[0m     \\u001b[38;5;66;03m# we make everything full probability if we are not computing uncertainty\\u001b[39;00m\\n\\u001b[1;32m    462\\u001b[0m     \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;129;01mnot\\u001b[39;00m lm\\u001b[38;5;241m.\\u001b[39mcompute_log_probs:\\n\\u001b[1;32m    463\\u001b[0m         new_bytes_prob \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;241m1.0\\u001b[39m\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_model.py:778\\u001b[0m, in \\u001b[0;36mModel.__call__\\u001b[0;34m(self, grammar, max_tokens, n, top_p, temperature, ensure_bos_token)\\u001b[0m\\n\\u001b[1;32m    776\\u001b[0m grammar_temp \\u001b[38;5;241m=\\u001b[39m parser\\u001b[38;5;241m.\\u001b[39mnext_byte_temperature()\\n\\u001b[1;32m    777\\u001b[0m current_temp \\u001b[38;5;241m=\\u001b[39m grammar_temp \\u001b[38;5;28;01mif\\u001b[39;00m grammar_temp \\u001b[38;5;241m>\\u001b[39m\\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;241m0\\u001b[39m \\u001b[38;5;28;01melse\\u001b[39;00m temperature \\u001b[38;5;66;03m# we prefer to use the grammar temp when it is specified\\u001b[39;00m\\n\\u001b[0;32m--> 778\\u001b[0m logits \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_get_logits\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mtoken_ids\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mparser\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mbytes\\u001b[49m\\u001b[43m[\\u001b[49m\\u001b[43mstart_pos\\u001b[49m\\u001b[43m:\\u001b[49m\\u001b[43mforced_pos\\u001b[49m\\u001b[43m]\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mcurrent_temp\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m    780\\u001b[0m \\u001b[38;5;66;03m# if requested we compute the log probabilities so we can track the probabilities of each node\\u001b[39;00m\\n\\u001b[1;32m    781\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mcompute_log_probs:\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_remote.py:250\\u001b[0m, in \\u001b[0;36mRemote._get_logits\\u001b[0;34m(self, token_ids, forced_bytes, current_temp)\\u001b[0m\\n\\u001b[1;32m    248\\u001b[0m new_bytes \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39m_shared_state[\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mdata_queue\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m]\\u001b[38;5;241m.\\u001b[39mget_nowait()\\n\\u001b[1;32m    249\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28misinstance\\u001b[39m(new_bytes, \\u001b[38;5;167;01mException\\u001b[39;00m):\\n\\u001b[0;32m--> 250\\u001b[0m     \\u001b[38;5;28;01mraise\\u001b[39;00m new_bytes\\n\\u001b[1;32m    252\\u001b[0m \\u001b[38;5;66;03m# if we are at the end of the generation then we try again allowing for early token stopping\\u001b[39;00m\\n\\u001b[1;32m    253\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28mlen\\u001b[39m(new_bytes) \\u001b[38;5;241m==\\u001b[39m \\u001b[38;5;241m0\\u001b[39m:\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_remote.py:106\\u001b[0m, in \\u001b[0;36mRemote._start_generator_stream\\u001b[0;34m(self, generator)\\u001b[0m\\n\\u001b[1;32m    104\\u001b[0m first_iteration \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;01mTrue\\u001b[39;00m\\n\\u001b[1;32m    105\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m: \\n\\u001b[0;32m--> 106\\u001b[0m     \\u001b[38;5;28;01mfor\\u001b[39;00m chunk \\u001b[38;5;129;01min\\u001b[39;00m generator:\\n\\u001b[1;32m    107\\u001b[0m         logger\\u001b[38;5;241m.\\u001b[39mdebug(\\u001b[38;5;124mf\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mGot chunk: \\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m \\u001b[38;5;241m+\\u001b[39m \\u001b[38;5;28mstr\\u001b[39m(chunk))\\n\\u001b[1;32m    108\\u001b[0m         \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28mlen\\u001b[39m(chunk) \\u001b[38;5;241m>\\u001b[39m \\u001b[38;5;241m0\\u001b[39m:\\n\",\n      \"File \\u001b[0;32m~/projects/guidance/guidance/models/_openai.py:165\\u001b[0m, in \\u001b[0;36mOAIChatMixin._generator\\u001b[0;34m(self, prompt, temperature)\\u001b[0m\\n\\u001b[1;32m    162\\u001b[0m \\u001b[38;5;66;03m# Add nice exception if no role tags were used in the prompt.\\u001b[39;00m\\n\\u001b[1;32m    163\\u001b[0m \\u001b[38;5;66;03m# TODO: Move this somewhere more general for all chat models?\\u001b[39;00m\\n\\u001b[1;32m    164\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m messages \\u001b[38;5;241m==\\u001b[39m []:\\n\\u001b[0;32m--> 165\\u001b[0m     \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mValueError\\u001b[39;00m(\\u001b[38;5;124mf\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mThe OpenAI model \\u001b[39m\\u001b[38;5;132;01m{\\u001b[39;00m\\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mmodel_name\\u001b[38;5;132;01m}\\u001b[39;00m\\u001b[38;5;124m is a Chat-based model and requires role tags in the prompt! \\u001b[39m\\u001b[38;5;130;01m\\\\\\u001b[39;00m\\n\\u001b[1;32m    166\\u001b[0m \\u001b[38;5;124m    Make sure you are using guidance context managers like `with system():`, `with user():` and `with assistant():` \\u001b[39m\\u001b[38;5;130;01m\\\\\\u001b[39;00m\\n\\u001b[1;32m    167\\u001b[0m \\u001b[38;5;124m    to appropriately format your guidance program for this type of model.\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m)\\n\\u001b[1;32m    169\\u001b[0m \\u001b[38;5;66;03m# update our shared data state\\u001b[39;00m\\n\\u001b[1;32m    170\\u001b[0m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39m_reset_shared_data(prompt[:pos], temperature)\\n\",\n      \"\\u001b[0;31mValueError\\u001b[0m: The OpenAI model gpt-3.5-turbo is a Chat-based model and requires role tags in the prompt!             Make sure you are using guidance context managers like `with system():`, `with user():` and `with assistant():`             to appropriately format your guidance program for this type of model.\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"lm + 'Now I will extract quotes relevant to the question \\\"What does the president do?\\\"\\\\n'+  extract_quotes()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now let's write functions to start / restart the chat, and to do the react loop:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 16,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def chat_search(lm, query):\\n\",\n    \"    with user():\\n\",\n    \"        lm += f'User: {query}'\\n\",\n    \"        lm = lm.set('user_query', query)\\n\",\n    \"    with assistant():\\n\",\n    \"        lm += react_loop()\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def react_loop(lm):\\n\",\n    \"    while True:\\n\",\n    \"        lm += 'Thought: ' + gen('thought', list_append=True, stop='Act:')\\n\",\n    \"        lm += 'Act: ' + select(['search', 'respond', 'extract_quotes', 'list_quotes'], name='action')\\n\",\n    \"        action = lm['action']\\n\",\n    \"        if action == 'search':\\n\",\n    \"            # generate the search query\\n\",\n    \"            lm += f'''({gen(name='arg', stop=')')})\\\\n'''\\n\",\n    \"            # search the web and paste result into the prompt\\n\",\n    \"            lm += search(lm['arg'])\\n\",\n    \"        if action == 'respond':\\n\",\n    \"            # generate the response and stop the loop\\n\",\n    \"            lm += f'''({gen(name='arg', stop=')')})\\\\n'''\\n\",\n    \"            break\\n\",\n    \"        if action == 'extract_quotes':\\n\",\n    \"            lm += '()\\\\n'\\n\",\n    \"            lm += 'Question: ' + lm['user_query'] + '\\\\n'\\n\",\n    \"            lm += 'Relevant quotes from the snippets:\\\\n'\\n\",\n    \"            lm += extract_quotes()\\n\",\n    \"        if action == 'list_quotes':\\n\",\n    \"            lm += '()\\\\n'\\n\",\n    \"            lm += 'Question: ' + lm['user_query'] + '\\\\n'\\n\",\n    \"            # Just paste all of the quotes we gathered throughout the loop\\n\",\n    \"            lm += lm['current_quotes']\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# Pre-load the prompt and system message so we can reuse this\\n\",\n    \"search_lm = llama2 + init_system()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try a few prompts:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 18,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: Where does Sam Altman work?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> most</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> up</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>date</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> work</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] A timeline of Sam Altman&amp;#39;s firing from OpenAI - TechCrunch\\n\",\n       \"In a dramatic turn of events late Friday, ex-Y Combinator president Sam Altman was fired as CEO of AI startup OpenAI, the company behind viral AI hits like , and , by OpenAI’s board of...\\n\",\n       \"\\n\",\n       \"[2] Sam Altman is back at OpenAI … with a guest badge - CNN\\n\",\n       \"New York CNN — Sam Altman is back at OpenAI. Well… he’s back at the OpenAI headquarters in San Francisco, anyway. Whether or not he returns as CEO of the ChatGPT parent company is still up in...\\n\",\n       \"\\n\",\n       \"[3] OpenAI CEO Sam Altman lands new job at Microsoft after surprise firing\\n\",\n       \"Sam Altman, the former CEO of OpenAI, is to start a new venture at Microsoft, just days after being fired by the company behind ChatGPT and DALL-E. Here&#x27;s a quick summary of the big shake-up in...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> All</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> sni</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ppets</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> seem</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> be</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> talking</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> about</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&#x27;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> departure</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> from</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> extract</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: Where does Sam Altman work?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>1</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> was</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> fired</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> as</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> CE</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>O</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> A</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> startup</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> back</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>3</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> former</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> CE</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>O</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> start</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> new</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> vent</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ure</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> still</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> confirm</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> if</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> he</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> still</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] Sam Altman joins Microsoft as OpenAI taps Emmett Shear for ... - CNN\\n\",\n       \"Sam Altman, who was ousted as CEO of OpenAI in a chaotic boardroom coup Friday, is joining Microsoft, the tech giant said Monday. Meanwhile, Emmett Shear, the former CEO of streaming service...\\n\",\n       \"\\n\",\n       \"[2] Ousted OpenAI leader Sam Altman joins Microsoft : NPR\\n\",\n       \"Sam Altman, who co-founded OpenAI, the influential maker of ChatGPT, will join Microsoft to help lead a new advanced artificial intelligence team. The surprise development follows Altman&#x27;s abrupt ...\\n\",\n       \"\\n\",\n       \"[3] Microsoft hires Sam Altman, new OpenAI CEO vows to investigate his ...\\n\",\n       \"Microsoft snapped up Sam Altman and another architect of OpenAI for a new venture after their sudden departures shocked the artificial intelligence world, leaving the newly installed CEO of...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> All</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> snippet</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> indicate</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> that</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> now</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> working</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> currently</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> works</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = search_lm + chat_search('Where does Sam Altman work?')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We didn't prompt the model with follow up questions, but let's give it a shot anyway:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 19,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: Where does Sam Altman work?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> most</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> up</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>date</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> work</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] A timeline of Sam Altman&amp;#39;s firing from OpenAI - TechCrunch\\n\",\n       \"In a dramatic turn of events late Friday, ex-Y Combinator president Sam Altman was fired as CEO of AI startup OpenAI, the company behind viral AI hits like , and , by OpenAI’s board of...\\n\",\n       \"\\n\",\n       \"[2] Sam Altman is back at OpenAI … with a guest badge - CNN\\n\",\n       \"New York CNN — Sam Altman is back at OpenAI. Well… he’s back at the OpenAI headquarters in San Francisco, anyway. Whether or not he returns as CEO of the ChatGPT parent company is still up in...\\n\",\n       \"\\n\",\n       \"[3] OpenAI CEO Sam Altman lands new job at Microsoft after surprise firing\\n\",\n       \"Sam Altman, the former CEO of OpenAI, is to start a new venture at Microsoft, just days after being fired by the company behind ChatGPT and DALL-E. Here&#x27;s a quick summary of the big shake-up in...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> All</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> sni</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ppets</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> seem</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> be</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> talking</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> about</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&#x27;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> departure</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> from</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> extract</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: Where does Sam Altman work?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>1</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> was</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> fired</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> as</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> CE</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>O</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> A</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> startup</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> back</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>3</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> former</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> CE</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>O</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> start</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> new</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> vent</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ure</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> still</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> confirm</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> if</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> he</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> still</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] Sam Altman joins Microsoft as OpenAI taps Emmett Shear for ... - CNN\\n\",\n       \"Sam Altman, who was ousted as CEO of OpenAI in a chaotic boardroom coup Friday, is joining Microsoft, the tech giant said Monday. Meanwhile, Emmett Shear, the former CEO of streaming service...\\n\",\n       \"\\n\",\n       \"[2] Ousted OpenAI leader Sam Altman joins Microsoft : NPR\\n\",\n       \"Sam Altman, who co-founded OpenAI, the influential maker of ChatGPT, will join Microsoft to help lead a new advanced artificial intelligence team. The surprise development follows Altman&#x27;s abrupt ...\\n\",\n       \"\\n\",\n       \"[3] Microsoft hires Sam Altman, new OpenAI CEO vows to investigate his ...\\n\",\n       \"Microsoft snapped up Sam Altman and another architect of OpenAI for a new venture after their sudden departures shocked the artificial intelligence world, leaving the newly installed CEO of...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> All</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> snippet</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> indicate</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> that</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> now</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> working</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> currently</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> works</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Microsoft</span>)\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: Why did he leave OpenAI?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> most</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> up</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>date</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> departure</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] Sam Altman Departs OpenAI | TIME\\n\",\n       \"Sam Altman Departs OpenAI After Board Loses Confidence in Him. ... The sudden departure comes as a shock to the tech world. Altman was an OpenAI founding co-chair in 2015 along with Elon Musk.\\n\",\n       \"\\n\",\n       \"[2] OpenAI announces leadership transition\\n\",\n       \"November 17, 2023 Authors OpenAI Announcements Chief technology officer Mira Murati appointed interim CEO to lead OpenAI; Sam Altman departs the company. Search process underway to identify permanent successor.\\n\",\n       \"\\n\",\n       \"[3] ChatGPT parent company OpenAI fires CEO Sam Altman - CNN\\n\",\n       \"OpenAI, the organization behind the viral chatbot ChatGPT, announced on Friday its CEO and founder, Sam Altman, was fired and will be departing the company, effective immediately. The...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> All</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> snippet</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> indicate</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> that</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> was</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> fired</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> from</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> extract</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: Why did he leave OpenAI?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>1</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Depart</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> After</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Board</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Los</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>es</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Conf</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>idence</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Him</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> announ</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ces</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> leadership</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> transition</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>3</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Ch</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>GP</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> have</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> enough</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> so</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> will</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> list</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> quotes</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> and</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> then</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> list</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: Why did he leave OpenAI?\\n\",\n       \"Query: Sam Altman work\\n\",\n       \"- Snippet 1: &quot;Sam Altman was fired as CEO of AI startup OpenAI&quot;\\n\",\n       \"- Snippet 2: &quot;Sam Altman is back at OpenAI&quot;\\n\",\n       \"- Snippet 3: &quot;Sam Altman, the former CEO of OpenAI, is to start a new venture at Microsoft&quot;\\n\",\n       \"Query: Sam Altman OpenAI departure\\n\",\n       \"- Snippet 1: &quot;Sam Altman Departs OpenAI After Board Loses Confidence in Him&quot;\\n\",\n       \"- Snippet 2: &quot;OpenAI announces leadership transition&quot;\\n\",\n       \"- Snippet 3: &quot;ChatGP&quot;\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> will</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> write</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> response</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> now</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>Sam</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Alt</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>man</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> was</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> fired</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> from</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Open</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>AI</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm += chat_search('Why did he leave OpenAI?')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try a few other questions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 21,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: What new discoveries from the James Webb Space Telescope can I tell my 9 year old about?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> James</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>b</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Space</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> T</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>eles</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>cope</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> (</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>J</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>W</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ST</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> relatively</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> new</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> space</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> observ</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>atory</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> and</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> as</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> such</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> there</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> may</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> not</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> be</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> many</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> new</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> available</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> yet</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> However</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> can</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> still</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> try</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> some</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> about</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> its</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> current</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>j</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>w</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>st</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] 12 amazing James Webb Space Telescope discoveries across the universe\\n\",\n       \"The James Webb Space Telescope (Webb or JWST) is a pathfinder of scientific discovery, generating incredible insights about galaxies, planets, stars and all sorts of interesting cosmic objects ...\\n\",\n       \"\\n\",\n       \"[2] James Webb Space Telescope - NASA Science\\n\",\n       \"The James Webb Space Telescope is a giant leap forward in our quest to understand the Universe and our origins. Webb is examining every phase of cosmic history: from the first luminous glows after the Big Bang to the formation of galaxies, stars, and planets to the evolution of our own solar system. Learn about the 4 main science themes for ...\\n\",\n       \"\\n\",\n       \"[3] James Webb telescope discovers &amp;#39;Cosmic Vine&amp;#39; of 20 connected galaxies ...\\n\",\n       \"The James Webb Space Telescope has discovered a massive chain of 20 galaxies in the early universe, raising questions about the formation of the largest structures in the cosmos.\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> sni</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ppets</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> mention</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> several</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> made</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> by</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> J</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>W</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ST</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> but</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> they</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> do</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> not</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> seem</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> be</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> specifically</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> aim</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ed</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> at</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>9</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>year</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>old</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> audience</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> extract</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: What new discoveries from the James Webb Space Telescope can I tell my 9 year old about?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>1</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> amaz</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ing</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> James</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>b</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Space</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Tele</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>scope</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> across</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> universe</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> James</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>b</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Space</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Tele</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>scope</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> giant</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> le</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ap</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> forward</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> our</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> quest</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> understand</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Un</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>iverse</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> and</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> our</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> origin</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>-</span> Snippet<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>3</span>:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> &quot;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> James</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>b</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Space</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Tele</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>scope</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> has</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discovered</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> massive</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> chain</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> galaxies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> early</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> universe</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&quot;</span>\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> have</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> enough</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> so</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> will</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> list</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> quotes</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> and</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> then</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> list</span>_quote<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>s</span>()\\n\",\n       \"Question: What new discoveries from the James Webb Space Telescope can I tell my 9 year old about?\\n\",\n       \"Query: jwst discoveries\\n\",\n       \"- Snippet 1: &quot;12 amazing James Webb Space Telescope discoveries across the universe&quot;\\n\",\n       \"- Snippet 2: &quot;The James Webb Space Telescope is a giant leap forward in our quest to understand the Universe and our origin&quot;\\n\",\n       \"- Snippet 3: &quot;The James Webb Space Telescope has discovered a massive chain of 20 galaxies in the early universe&quot;\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> will</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> write</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> response</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> now</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> J</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>WS</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> teles</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>cope</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> has</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> made</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> several</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> recent</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> discover</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> including</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> chain</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> galaxies</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> early</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> universe</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> which</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> are</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> all</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> fasc</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ating</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> and</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> worth</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> expl</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>oring</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> further</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"query = \\\"What new discoveries from the James Webb Space Telescope can I tell my 9 year old about?\\\" \\n\",\n    \"lm = search_lm + chat_search(query)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 22,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: What is 2 + 5?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> This</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> simple</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> arithmetic</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> question</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> so</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> don</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&#x27;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>t</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> can</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> directly</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>5</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> equal</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>7</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"query = \\\"What is 2 + 5?\\\"\\n\",\n    \"lm = search_lm + chat_search(query)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 23,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: What is the capital of Brazil?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> know</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> capital</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Brazil</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> so</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> can</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> directly</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> capital</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Brazil</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> Bras</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ília</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"query = \\\"What is the capital of Brazil?\\\"\\n\",\n    \"lm = search_lm + chat_search(query)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 24,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><div style='display: inline-block; cursor: pointer; opacity: 0.5; width: 2px; margin-left: -2px;' onClick='this.nextSibling.style.display = \\\"inline\\\"; this.style.display = \\\"none\\\"'>&caron;</div><div style='display: none;'>You are a nice chatbot that answers users&#x27; queries. Whenever you get a question, you run a loop of [Thought, Act, Observation] until you hit a response, where Act is one of (search, respond, extract_quotes, list_quotes).\\n\",\n       \"You have a storehouse of facts, but you *always* search if you need information that depends on current events, since what you know may be out-of-date.\\n\",\n       \"After searching, if you find information in the snippets, you should extract quotes.\\n\",\n       \"If you need, you can make multiple searches.\\n\",\n       \"You should only ask the user for more information is their question is ambiguous.\\n\",\n       \"If the snippets are ambiguous or don&#x27;t contain enough information, you should make additional searches instead of asking the user.\\n\",\n       \"Here are some example interactions:\\n\",\n       \"---\\n\",\n       \"User: Who is the current president of the US?\\n\",\n       \"Thought: Since the president may have changed, my information may be out of date. Thus, I need to search the web for this.\\n\",\n       \"Act: search(current US president)\\n\",\n       \"Observation: \\n\",\n       \"[1] Joe Biden: The President | The White House\\n\",\n       \"Joe Biden The President House — with thousands of train rides in between Download Official Portrait President Biden represented Delaware for 36 years in the U.S. Senate before becoming the...\\n\",\n       \"\\n\",\n       \"[2] President of the United States - Wikipedia\\n\",\n       \"The president of the United States ( POTUS) [A] is the head of state and head of government of the United States. The president directs the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces . The power of the presidency has grown substantially [11] since the first president, George ...\\n\",\n       \"\\n\",\n       \"[3] List of presidents of the United States - Wikipedia\\n\",\n       \"Grover Cleveland served two non-consecutive terms and is therefore counted as the 22nd and 24th president of the United States, giving rise to the discrepancy between the number of presidencies and the number of persons who have served as president. [5] The incumbent president is Joe Biden. [6]\\n\",\n       \"\\n\",\n       \"Thought: Snippets [1] and [3] clearly indicate that Joe Biden is the current president.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I have enough information to respond, so I will list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is the current president of the US?\\n\",\n       \"Query: current US president\\n\",\n       \"- Snippet 1: &quot;Joe Biden: The President | White House&quot;\\n\",\n       \"- Snippet 3: &quot;The incumbent president is Joe Biden&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(The current president of the US is Joe Biden)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of France?\\n\",\n       \"Thought: It is really unlikely that the capital of France changed since my database was last updated. So, I don&#x27;t need to search the web, and can respond.\\n\",\n       \"Act: respond(The capital of France is Paris)\\n\",\n       \"---\\n\",\n       \"User: What is the capital of Georgia?\\n\",\n       \"Thought: The user can be asking about Georgia the country or Georgia the state. I should confirm which one before issuing a final response\\n\",\n       \"Act: respond(Do you mean the state or the country?)\\n\",\n       \"Observation:\\n\",\n       \"User: The state\\n\",\n       \"Thought: The capital of Georgia probably didn&#x27;t change since my database was last updated, so I can respond. \\n\",\n       \"Act: respond(The capital of Georgia is Atlanta)\\n\",\n       \"---\\n\",\n       \"User: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Thought: To answer this, I will need to search for each of their net worths, and then compare.\\n\",\n       \"Act: search(Ronaldinho Gaucho net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Ronaldinho&amp;#39;s Net Worth (Updated 2023) | Wealthy Gorilla\\n\",\n       \"Introduction As of September 2023, Ronaldinho’s net worth is estimated to be roughly $90 Million. Ronaldo de Assis Moreira, better known as Ronaldinho, is a Brazilian former professional footballer and ambassador for Barcelona. from Porto Alegre. He is regarded to be one of the best football players of all time. Early Life\\n\",\n       \"\\n\",\n       \"[2] Ronaldinho Net Worth | Celebrity Net Worth\\n\",\n       \"Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million. Ronaldinho was once considered to be the best soccer player in the world. He was twice the...\\n\",\n       \"\\n\",\n       \"[3] Ronaldinho Net Worth: 2022, Career, House, Cars &amp;amp; Lifestyle - Players Bio\\n\",\n       \"A Brazilian legend, Ronaldinho has an outstanding net worth of $90 million. Even at his time, this sum was as impressive as it is now. Ronaldinho is $90 million rich because of football. But let me stop you right there. It’s not in everybody’s forte to excel as the Brazilian did.\\n\",\n       \"\\n\",\n       \"Thought: All snippets seem to talk about his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Thought: I still need to search for Messi&#x27;s net worth and compare\\n\",\n       \"Act: search(messi net worth)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"$130M 2023 The World&#x27;s Highest-Paid Athletes Earnings as of 5/16/23 Photo by Antonio Borga/Eurasia Sport Images/Getty Images About Lionel Messi Messi claimed the Ballon d&#x27;Or as the world&#x27;s best...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"CHANDAN KHANNA/Getty Images Messi took home a mind-boggling $65 million in on-field earnings over the last year — more than all but one soccer player on the planet. His Inter Miami salary alone is worth $20,446,667 annually, per AP News, which means he earns roughly $393,000 per week or $56,000 per day from the Major League Soccer club.\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi Net Worth\\n\",\n       \"$600 Million Salary: $75 Million Date of Birth: Jun 24, 1987 (36 years old) Place of Birth: Rosario, Argentina Gender: Male Height: 5 ft 6 in (1.69 m) Profession: Football player Nationality:...\\n\",\n       \"\\n\",\n       \"Thought: Snippet 1 says $130M, but it may be referring to other athletes based on the rest of the snippet.\\n\",\n       \"Snippets 2 and 3 talk about his salary (with contradictory numbers), but not his net worth. Thus, there are no relevant quotes here, and I should make another search.\\n\",\n       \"I will make the search narrower using quotes.\\n\",\n       \"Act: search(messi &quot;net worth&quot;)\\n\",\n       \"Observation:\\n\",\n       \"[1] Lionel Messi - Forbes\\n\",\n       \"About Lionel Messi. Messi claimed the Ballon d&#x27;Or as the world&#x27;s best soccer player for a record seventh time in 2021, putting him two ahead of his rival Cristiano Ronaldo. He transferred to Paris ...\\n\",\n       \"\\n\",\n       \"[2] Lionel Messi Net Worth: How the Soccer Star Makes and Spends ... - Insider\\n\",\n       \"His net worth is an eye-watering $600 million. Leo Messi of Paris Saint-Germain looks on during warmup before the Ligue 1 Uber Eats match between Paris Saint Germain and ESTAC Troyes at Parc des Princes on May 08, 2022 in Paris, France. Photo by Aurelien Meunier - PSG/PSG via Getty Images That&#x27;s according to Celebrity Net Worth. Advertisement\\n\",\n       \"\\n\",\n       \"[3] Lionel Messi&amp;#39;s new $650,000 Bentley shows of his massive net worth\\n\",\n       \"In 2023, Messi&#x27;s net worth is a staggering $620 million, securing his place as the third-highest-paid athlete globally. A recent addition to Messi&#x27;s extravagant lifestyle is a sleek Bentley...\\n\",\n       \"\\n\",\n       \"Thought: Snippets 2 and 3 list his net worth.\\n\",\n       \"Act: extract_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Relevant quotes from the snippets:\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I have all the information I need to respond, so I&#x27;ll list the quotes and then respond.\\n\",\n       \"Act: list_quotes()\\n\",\n       \"Question: Who is richer, Messi or Ronaldinho Gaucho?\\n\",\n       \"Query: Ronaldinho Gaucho net worth\\n\",\n       \"- Snippet 1: &quot;Ronaldinho’s net worth is estimated to be roughly $90 Million&quot;\\n\",\n       \"- Snippet 2: &quot;Ronaldinho is a retired Brazilian football (soccer) player who has a net worth of $90 million.&quot;\\n\",\n       \"- Snippet 3: &quot;Ronaldinho has an outstanding net worth of $90 million&quot;\\n\",\n       \"Query: messi &quot;net worth&quot;\\n\",\n       \"- Snippet 2: &quot;His net worth is an eye-watering $600 million&quot;\\n\",\n       \"- Snippet 3: &quot;In 2023, Messi&#x27;s net worth is a staggering $620 million&quot;\\n\",\n       \"Thought: I will write a response now.\\n\",\n       \"Act: respond(Messi has an estimated net worth between $600 and $620 million, while Ronaldinho has an estimated net worth of $90 million. Thus, Messi is richer)\\n\",\n       \"</div></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>User: Who created the guidance library?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> need</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> web</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> to</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> search</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>gu</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>id</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ance</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> library</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> cre</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ator</span>)\\n\",\n       \"\\n\",\n       \"Observation:\\n\",\n       \"[1] GitHub - guidance-ai/guidance: A guidance language for controlling ...\\n\",\n       \"from guidance import substring # define a set of possible statements text = &#x27;guidance is awesome. guidance is so great. guidance is the best thing since sliced bread.&#x27; # force the model to make an exact quote llama2 + f&#x27;Here is a true statement about the guidance library: &quot;{substring (text)} &quot;&#x27;\\n\",\n       \"\\n\",\n       \"[2] guidance.library.gen — Guidance latest documentation - Read the Docs\\n\",\n       \"Use the LLM to generate a completion. Parameters: namestr or None The name of a variable to store the generated value in. If none the value is just returned. stopstr The stop string to use for stopping generation. If not provided, the next node’s text will be used if that text matches a closing quote, XML tag, or role end.\\n\",\n       \"\\n\",\n       \"[3] Creator kit - GitHub\\n\",\n       \"The kit contains a component library, several commonly used &lt;a href=\\\\&quot;/MicrosoftDocs/power-platform/blob/main/power-apps/developer/component-framework/overview\\\\&quot;&gt;Power Apps component framework controls&lt;/a&gt;, a set of templates, and other utilities that increase developer productivity.&lt;/p&gt;\\\\n&lt;p dir=\\\\&quot;auto\\\\&quot;&gt;All controls and components included in t...\\n\",\n       \"\\n\",\n       \"Thought:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> The</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> cre</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ator</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> guidance</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> library</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> is</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> not</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> explicitly</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> mentioned</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> in</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> any</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> sni</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ppets</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>Act:<span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> respond</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>I</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> couldn</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>&#x27;</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>t</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> find</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> information</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> on</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> cre</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'>ator</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> of</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> guidance</span><span style='background-color: rgba(0, 165, 0, 0.15); border-radius: 3px;' title='0.0'> library</span>)\\n\",\n       \"</div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"query = \\\"Who created the guidance library?\\\"\\n\",\n    \"lm = search_lm + chat_search(query)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"guidance_env\",\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.5\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/art_of_prompt_design/react.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"`The Art of Prompt Design`\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# ReAct Design Pattern\\n\",\n    \"\\n\",\n    \"*Authors: @Sam1320, @slundberg*\\n\",\n    \"\\n\",\n    \"The ReAct prompting strategy (by <a href=\\\"https://arxiv.org/abs/2210.03629\\\">Yao et al.</a>) consists of prompting a language model to generate explicit reasoning traces that contain an \\\"action\\\" step. The action step selects actions to execute in order to gain more information. ReAct can be viewed as a specific form of chain of thought combined with tool use. To execute the ReAct pattern we just need to follow the standard tool use paradigm of executing the selected actions and injecting the result (aka. Observation) back into the prompt and repeating the process until a final answer is found. This \\n\",\n    \"\\n\",\n    \"This notebook shows two different ways to leverage `guidance` to implement this pattern:\\n\",\n    \"\\n\",\n    \"1. <a href=\\\"#gen_with_tools\\\">Using the `tools` API of the `gen` function.</a>\\n\",\n    \"2. <a href=\\\"#raw_function\\\">Using a ReAct-specific stateful guidance function.</a>\\n\",\n    \"<!-- 3. Adapting ReAct to use the function calling APIs using by remote model services like Vertex AI and OpenAI. -->\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Setup\\n\",\n    \"\\n\",\n    \"First let's import the necessary modules and load the LLM:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import math\\n\",\n    \"\\n\",\n    \"from huggingface_hub import hf_hub_download\\n\",\n    \"\\n\",\n    \"import guidance\\n\",\n    \"from guidance import models, gen, select\\n\",\n    \"\\n\",\n    \"repo_id = \\\"TheBloke/Mistral-7B-Instruct-v0.2-GGUF\\\"\\n\",\n    \"filename = \\\"mistral-7b-instruct-v0.2.Q8_0.gguf\\\"\\n\",\n    \"model_kwargs = {\\\"verbose\\\": True, \\\"n_gpu_layers\\\": -1, \\\"n_ctx\\\": 4096}\\n\",\n    \"\\n\",\n    \"downloaded_file = hf_hub_download(repo_id=repo_id, filename=filename)\\n\",\n    \"mistral7 = guidance.models.LlamaCpp(downloaded_file, **model_kwargs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can use the same prompt for both approaches so let's define it here. We will use two simple functions `sqrt` and `age` (returns age of a famous person) as tools to demonstrate the pattern. \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"prompt = \\\"\\\"\\\"Answer the following questions as best you can. You have access only to the following tools:\\n\",\n    \"\\n\",\n    \"{tools}\\n\",\n    \"\\n\",\n    \"Use the following format:\\n\",\n    \"\\n\",\n    \"Question: the input question you must answer\\n\",\n    \"Thought 1: you should always think about what to do\\n\",\n    \"Action 1: the action to take, has to be one of {tool_names}\\n\",\n    \"Observation 1: the result of the action\\n\",\n    \"... (this Thought/Action/Action Input/Observation can repeat N times)\\n\",\n    \"Thought N: I now know the final answer.\\n\",\n    \"Final Answer: the final answer to the original input question.\\n\",\n    \"Done.\\n\",\n    \"\\n\",\n    \"Example:\\n\",\n    \"Question: What is the square root of the age of Brad Pitt?\\n\",\n    \"Thought 1: I should find out how old Brad Pitt is.\\n\",\n    \"Action 1: age(Brad Pitt)\\n\",\n    \"Observation 1: 56\\n\",\n    \"Thought 2: I should find the square root of 56.\\n\",\n    \"Action 2: sqrt(56)\\n\",\n    \"Observation 2: 7.48\\n\",\n    \"Thought 3: I now know the final answer.\\n\",\n    \"Final Answer: 7.48\\n\",\n    \"Done.\\n\",\n    \"\\n\",\n    \"Question: {query}\\n\",\n    \"\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Implementing ReAct using the `tools` API of the `gen` function<a id=\\\"gen_with_tools\\\"></a>\\n\",\n    \"We can define tools that can be used and then pass them as arguments to `gen`. Guidance will identify when the model generates something that matches the grammar of a tool call, execute it and then resume generation.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's first define our set of functions that can be used as tools. The output of these functions is inserted back into the program right after the call to the function. For this reason, in order to match the pattern of the prompt above, we'll add \\\"Observation N\\\" before the output of the function.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import regex\\n\",\n    \"\\n\",\n    \"ages_db = {\\n\",\n    \"    \\\"Leonardo DiCaprio\\\": 49,\\n\",\n    \"    \\\"Brad Pitt\\\": 59\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def sqrt(lm, number):\\n\",\n    \"    lm += f'\\\\nObservation {regex(r\\\"[0-9]+\\\")}: ' + f'{math.sqrt(float(number))}\\\\n'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def log(lm, number):\\n\",\n    \"    lm += f'\\\\nObservation {regex(r\\\"[0-9]+\\\")}: {math.log(float(number)):.4f}\\\\n'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def age(lm, person):\\n\",\n    \"    lm += f'\\\\nObservation {regex(r\\\"[0-9]+\\\")}: {ages_db.get(person)}\\\\n'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"tools = {\\n\",\n    \"    \\\"sqrt\\\": \\\"Computes the square root of a number.\\\", \\n\",\n    \"    \\\"age\\\": \\\"Returns the age of a person.\\\", \\n\",\n    \"    \\\"log\\\": \\\"Computes the logarithm of a number.\\\"\\n\",\n    \"}\\n\",\n    \"tool_map = {\\n\",\n    \"    \\\"sqrt\\\": sqrt,\\n\",\n    \"    \\\"age\\\": age,\\n\",\n    \"    \\\"log\\\": log\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Run the Program\\n\",\n    \"Now we can start generation just by adding the model and the prompt to `gen` and passing the tools as arguments.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"query = \\\"What is the logarithm of Leonardo DiCaprio's age?\\\"\\n\",\n    \"prompt_with_query = prompt.format(tools=tools, tool_names=list(tools.keys()), query=query)\\n\",\n    \"lm = mistral7 + prompt_with_query + gen(max_tokens=200, tools=[sqrt, age, log], stop=\\\"Done.\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Implementing ReAct Directly Using Stateful Control <a id=\\\"raw_function\\\"></a>\\n\",\n    \"Instead of passing the tools as arguments to `gen` we can use stateful control to guide the execution of the program. This allows for more fine grained control. \\n\",\n    \"\\n\",\n    \"In this case we'll define a function that runs the ReAct loop. Note that now `select` constrains the model to select one of the available tools. Also, we don't need to add prefixes to the tools since all the context is finely controlled inside the loop.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tool_map = {\\n\",\n    \"    \\\"sqrt\\\": lambda x: str(math.sqrt(float(x))),\\n\",\n    \"    \\\"age\\\": lambda x: str(ages_db.get(x)),\\n\",\n    \"    \\\"log\\\": lambda x: str(math.log(float(x)))\\n\",\n    \"}\\n\",\n    \"@guidance\\n\",\n    \"def react_prompt_example(lm, question, tools, max_rounds=10):\\n\",\n    \"    tool_names = list(tools.keys())\\n\",\n    \"    lm += prompt.format(tools=tools, tool_names=tool_names, query=question)\\n\",\n    \"    i = 1\\n\",\n    \"    while True:\\n\",\n    \"        lm += f'Thought {i}: ' + gen(name='thought', suffix='\\\\n')\\n\",\n    \"        if 'final answer' in lm['thought'] or i == max_rounds:\\n\",\n    \"            lm += 'Final Answer: ' + gen(name='answer', suffix='\\\\n')\\n\",\n    \"            break\\n\",\n    \"        lm += f'Act {i}: ' + select(tool_names, name='act') \\n\",\n    \"        lm += '(' + gen(name='arg', suffix=')') + '\\\\n'\\n\",\n    \"        if lm['act'] in tool_map:\\n\",\n    \"            lm += f'Observation {i}: ' + tool_map[lm['act']](lm['arg']) + '\\\\n'\\n\",\n    \"        i += 1\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"lm = mistral7\\n\",\n    \"lm += react_prompt_example(\\\"What is the logarithm of Leonardo DiCaprio's age?\\\", tools)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"#### We can access the final answer which we stored in the program state.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(query) \\n\",\n    \"print(f\\\"Response: {lm['answer']}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.12.2\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/art_of_prompt_design/tool_use.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Getting language models to use external tools (a.k.a. function calls)\\n\",\n    \"\\n\",\n    \"**NOTE! This notebook has not yet been updated to use the new `v0.1+` pythonic syntax. We are working through the notebooks still. (PRs are welcome)**\\n\",\n    \"\\n\",\n    \"**Note that this notebook is a work in progress, and is not in its final article-style form. But it is already a working introduction to tool use and function calling in guidance.**\\n\",\n    \"\\n\",\n    \"This notebook demonstrates how to get LLMs to call external tools when needed. Tools use can be implementated many ways, because there are many possible ways to design prompts that then produce outputs that can be parsed to trigger external tool calls. You can create and parse of all this syntax yourself, but Guidance also has special support commands for this that align with both the way LLMs are actually executed and with popular APIs like OpenAI. Using this syntax will also help ensure you align your prompts with any fine-tuning the LLM may have undergone for tool use (assuming the corresponding LLM object in Guidance has support built in).\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## OpenAI Chat Models\\n\",\n    \"\\n\",\n    \"Tool use in Guidance is designed to align with how the model actually processes the text you give it. This means you give the model the actual function definition text the model sees, and you watch for the text generated by the model when it wants to make a function call. While the OpenAI Chat API abstracts away all these details, Guidance re-exposes them so you can interact with OpenAI models in the same way you would interact with any other model.\\n\",\n    \"\\n\",\n    \"So in the examples below you will see text going into the model's system prompt, and function calls coming out of the model as though you were watching the raw model output inside the `assistant` role. But behind the scenes the `guidance.llms.OpenAI` class translates this text into the corrresponding API calls. Note that the text that Guidance puts into the system prompt follows the TypeScript format that ChatGPT claims to expect on the backend, so you are seeing what things look like to the LLM itself (we just asked ChatGPT what it expects in order to get this format).\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Define the tool(s) we want to use\\n\",\n    \"\\n\",\n    \"Here we use the same mock tool that is used in the OpenAI docs, a mock weather service function.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# define a tool we would like the model to use\\n\",\n    \"import json\\n\",\n    \"def get_current_weather(location, unit=\\\"fahrenheit\\\"):\\n\",\n    \"    \\\"\\\"\\\" Get the current weather in a given location.\\n\",\n    \"    \\n\",\n    \"    Parameters\\n\",\n    \"    ----------\\n\",\n    \"    location : string\\n\",\n    \"        The city and state, e.g. San Francisco, CA\\n\",\n    \"    unit : \\\"celsius\\\" or \\\"fahrenheit\\\"\\n\",\n    \"    \\\"\\\"\\\"\\n\",\n    \"    weather_info = {\\n\",\n    \"        \\\"location\\\": location,\\n\",\n    \"        \\\"temperature\\\": \\\"71\\\",\\n\",\n    \"        \\\"unit\\\": unit,\\n\",\n    \"        \\\"forecast\\\": [\\\"sunny\\\", \\\"windy\\\"],\\n\",\n    \"    }\\n\",\n    \"    return json.dumps(weather_info)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Define a guidance program that uses the tool(s)\\n\",\n    \"\\n\",\n    \"To get the LLM to use tools when it needs to you need to first specify which tools it can use, then you need to watch for when the LLM wants to use a tool.\\n\",\n    \"\\n\",\n    \"**Function definition**: There are many ways you can tell the LLM about functions it can use, but in Guidance by convention we use the `tool_def` partial to write this definition. Each LLM object defines `tool_def` so that you can use it and know that if your model was fine tuned for tool use you will align with how the model was trained. The `tool_def` program is (normally) defined by the LLM running your program and it will convert a list of function definitions into a format that the model understands (where the function definitions are the same as the OpenAI API expects). For OpenAI models the text generated by `tool_def` is TypeScript type definitions and belongs at the end of the `system` message. *Note: Any variables not found in the current program scope fall back to the LLM object, so writing `tool_def` falls back to `llm.tool_def` unless you have explicitly defined a custom `tool_def` variable in the current program.*\\n\",\n    \"\\n\",\n    \"**Call detection:** Calls to functions by the LLM can be detected manually by setting the `stop` or `stop_regex` parameters of the `gen` command to something that signifies that the LLM is making a function call. But a cleaner way is to use the `function_call=\\\"auto\\\"` parameter. This will get passed directly to the LLM object so that it can set the appropriate `stop_regex` parameter or API parameter (to change how this work you can override the `function_call_stop` or `function_call_stop_regex` variables). There is also a `extract_function_call` variable that allows you to extract a callable object from the text returned by `gen` calls. Rather that calling this manually you can also treat the returned text just like a function and Guidance will use the `extract_function_call` command in the background, so calling the string will result in calling the tool call embedded in that string. This makes it easy to work with tool call outputs in the same way you work with other outputs from the LLM.\\n\",\n    \"\\n\",\n    \"In summary there are four special variables and one `gen` argument that are used to implement tool use in Guidance. All of them have default implementations defined by the LLM object, but you can override them to change how tool use works:\\n\",\n    \"\\n\",\n    \"- `tool_def`: A guidance program that defines the tool(s) that the LLM can use, it looks for a `functions` variable that has function definitions in the OpenAI dictionary-style function definition syntax.\\n\",\n    \"- `function_call`: This parameter of the `gen` command is passed directly to the LLM object to tell it if it should generate function calls.\\n\",\n    \"- `extract_function_call`: A function that takes the text returned by the LLM and extracts a callable object from it.\\n\",\n    \"- `function_call_stop`: A string that is used to detect when the LLM is making a function call.\\n\",\n    \"- `function_call_stop_regex`: A regex that is used to detect when the LLM is making a function call.\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"Below is an example that puts all this together for the OpenAI Chat API:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import guidance\\n\",\n    \"\\n\",\n    \"# define the chat model we want to use (must be a recent model supporting function calls)\\n\",\n    \"guidance.llm = guidance.llms.OpenAI(\\\"gpt-3.5-turbo-0613\\\", caching=False)\\n\",\n    \"\\n\",\n    \"# define a guidance program that uses tools\\n\",\n    \"program = guidance(\\\"\\\"\\\"\\n\",\n    \"{{~#system~}}\\n\",\n    \"You are a helpful assistant.\\n\",\n    \"{{>tool_def functions=functions}}\\n\",\n    \"{{~/system~}}\\n\",\n    \"\\n\",\n    \"{{~#user~}}\\n\",\n    \"Get the current weather in New York City.\\n\",\n    \"{{~/user~}}\\n\",\n    \"\\n\",\n    \"{{~#each range(10)~}}\\n\",\n    \"    {{~#assistant~}}\\n\",\n    \"    {{gen 'answer' max_tokens=50 function_call=\\\"auto\\\"}}\\n\",\n    \"    {{~/assistant~}}\\n\",\n    \"\\n\",\n    \"    {{#if not callable(answer)}}{{break}}{{/if}}\\n\",\n    \"    \\n\",\n    \"    {{~#function name=answer.__name__~}}\\n\",\n    \"    {{answer()}}\\n\",\n    \"    {{~/function~}}\\n\",\n    \"{{~/each~}}\\\"\\\"\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that in the program above we make a maximum of 10 consecutive function calls. Once the model generates text that does not include a function call we break out and leave the text from that final answer in the `answer` variable.\\n\",\n    \"\\n\",\n    \"### Calling the guidance program\\n\",\n    \"\\n\",\n    \"To call the program above we need to pass in a function definition and the actual function to call.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-6ad8e50d-1a62-4325-8a49-ec3eeb12df5f\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-6ad8e50d-1a62-4325-8a49-ec3eeb12df5f\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You are a helpful assistant.\\n\",\n       \"\\n\",\n       \"# Tools\\n\",\n       \"\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if len(functions) &gt; 0~}}\\n\",\n       \"## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"} // namespace functions\\n\",\n       \"{{~/if~}}'>## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.description}}'>Get the current weather in a given location</span>\\n\",\n       \"type <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.name}}'>get_current_weather</span> = (_: <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}'></span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.description}}'>The city and state, e.g. San Francisco, CA</span>\\n\",\n       \"</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>location</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'></span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.type}}'>string</span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'>,</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>unit</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'>?</span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}'>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>celsius</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'> | </span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>fahrenheit</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'></span></span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'></span></span>\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"</span>} // namespace functions</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Get the current weather in New York City.</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each range(10)~}}\\n\",\n       \"    {{~#assistant~}}\\n\",\n       \"    {{gen &#x27;answer&#x27; max_tokens=50 function_call=&quot;auto&quot;}}\\n\",\n       \"    {{~/assistant~}}\\n\",\n       \"\\n\",\n       \"    {{#if not callable(answer)}}{{break}}{{/if}}\\n\",\n       \"    \\n\",\n       \"    {{~#function name=answer.__name__~}}\\n\",\n       \"    {{answer()}}\\n\",\n       \"    {{~/function~}}\\n\",\n       \"{{~/each~}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; max_tokens=50 function_call=&quot;auto&quot;}}'>\\n\",\n       \"```typescript\\n\",\n       \"functions.get_current_weather({\\n\",\n       \"  &quot;location&quot;: &quot;New York City&quot;\\n\",\n       \"})```</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if not callable(answer)}}{{break}}{{/if}}'></span><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>function</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{answer()}}'>{&quot;location&quot;: &quot;New York City&quot;, &quot;temperature&quot;: &quot;71&quot;, &quot;unit&quot;: &quot;fahrenheit&quot;, &quot;forecast&quot;: [&quot;sunny&quot;, &quot;windy&quot;]}</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; max_tokens=50 function_call=&quot;auto&quot;}}'>The current weather in New York City is 71°F and it is sunny and windy.</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if not callable(answer)}}{{break}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{break}}'></span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"6ad8e50d-1a62-4325-8a49-ec3eeb12df5f\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# call the program, passing in the function definition we want to use as JSON\\n\",\n    \"executed_program = program(functions=[\\n\",\n    \"    {\\n\",\n    \"        \\\"name\\\": \\\"get_current_weather\\\",\\n\",\n    \"        \\\"description\\\": \\\"Get the current weather in a given location\\\",\\n\",\n    \"        \\\"parameters\\\": {\\n\",\n    \"            \\\"type\\\": \\\"object\\\",\\n\",\n    \"            \\\"properties\\\": {\\n\",\n    \"                \\\"location\\\": {\\n\",\n    \"                    \\\"type\\\": \\\"string\\\",\\n\",\n    \"                    \\\"description\\\": \\\"The city and state, e.g. San Francisco, CA\\\",\\n\",\n    \"                },\\n\",\n    \"                \\\"unit\\\": {\\\"type\\\": \\\"string\\\", \\\"enum\\\": [\\\"celsius\\\", \\\"fahrenheit\\\"]},\\n\",\n    \"            },\\n\",\n    \"            \\\"required\\\": [\\\"location\\\"],\\n\",\n    \"        }\\n\",\n    \"    }\\n\",\n    \"], get_current_weather=get_current_weather)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'The current weather in New York City is 71°F and it is sunny and windy.'\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"executed_program[\\\"answer\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Factoring out the loop calling code\\n\",\n    \"\\n\",\n    \"There is a non-trivial amount of logic and syntax required to create a loop of function calls. We can make this easer by factoring out that loop into its own guidance program:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-afc32bba-76bf-4676-88b7-82826d000548\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-afc32bba-76bf-4676-88b7-82826d000548\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You are a helpful assistant.\\n\",\n       \"\\n\",\n       \"# Tools\\n\",\n       \"\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if len(functions) &gt; 0~}}\\n\",\n       \"## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"} // namespace functions\\n\",\n       \"{{~/if~}}'>## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.description}}'>Get the current weather in a given location</span>\\n\",\n       \"type <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.name}}'>get_current_weather</span> = (_: <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}'></span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.description}}'>The city and state, e.g. San Francisco, CA</span>\\n\",\n       \"</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>location</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'></span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.type}}'>string</span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'>,</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>unit</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'>?</span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}'>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>celsius</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'> | </span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>fahrenheit</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'></span></span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'></span></span>\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"</span>} // namespace functions</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Get the current weather in New York City.</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each range(max_calls)~}}\\n\",\n       \"    {{~#assistant~}}\\n\",\n       \"    {{gen &#x27;func_inner&#x27; temperature=temperature max_tokens=max_tokens_per_chunk function_call=function_call~}}\\n\",\n       \"    {{~/assistant~}}\\n\",\n       \"\\n\",\n       \"    {{#if not callable(func_inner)}}{{break}}{{/if}}\\n\",\n       \"\\n\",\n       \"    {{~#function name=func_inner.__name__~}}\\n\",\n       \"    {{func_inner()}}\\n\",\n       \"    {{~/function~}}\\n\",\n       \"{{~/each~}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;func_inner&#x27; temperature=temperature max_tokens=max_tokens_per_chunk function_call=function_call~}}\\n\",\n       \"    '>\\n\",\n       \"```typescript\\n\",\n       \"functions.get_current_weather({\\n\",\n       \"  &quot;location&quot;: &quot;New York City&quot;\\n\",\n       \"})```</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if not callable(func_inner)}}{{break}}{{/if}}'></span><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>function</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{func_inner()}}'>{&quot;location&quot;: &quot;New York City&quot;, &quot;temperature&quot;: &quot;71&quot;, &quot;unit&quot;: &quot;fahrenheit&quot;, &quot;forecast&quot;: [&quot;sunny&quot;, &quot;windy&quot;]}</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;func_inner&#x27; temperature=temperature max_tokens=max_tokens_per_chunk function_call=function_call~}}\\n\",\n       \"    '>The current weather in New York City is 71°F and sunny with windy conditions.</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if not callable(func_inner)}}{{break}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{break}}'></span></span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set args[0] func_inner}}'></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"afc32bba-76bf-4676-88b7-82826d000548\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# this is a reusabe component for calling functions as intermediate steps in a generation\\n\",\n    \"# (note that args[0] refers to the first positional argument passed to the program when it is included)\\n\",\n    \"chat_tool_gen = guidance(\\\"\\\"\\\"{{~#each range(max_calls)~}}\\n\",\n    \"    {{~#assistant~}}\\n\",\n    \"    {{gen 'func_inner' temperature=temperature max_tokens=max_tokens_per_chunk function_call=function_call~}}\\n\",\n    \"    {{~/assistant~}}\\n\",\n    \"\\n\",\n    \"    {{#if not callable(func_inner)}}{{break}}{{/if}}\\n\",\n    \"\\n\",\n    \"    {{~#function name=func_inner.__name__~}}\\n\",\n    \"    {{func_inner()}}\\n\",\n    \"    {{~/function~}}\\n\",\n    \"{{~/each~}}{{set args[0] func_inner}}\\\"\\\"\\\", max_calls=20, function_call=\\\"auto\\\", max_tokens_per_chunk=500, temperature=0.0)\\n\",\n    \"\\n\",\n    \"# define a guidance program that uses chat_tool_gen\\n\",\n    \"program2 = guidance(\\\"\\\"\\\"\\n\",\n    \"{{~#system~}}\\n\",\n    \"You are a helpful assistant.\\n\",\n    \"{{>tool_def functions=functions}}\\n\",\n    \"{{~/system~}}\\n\",\n    \"\\n\",\n    \"{{~#user~}}\\n\",\n    \"Get the current weather in New York City.\\n\",\n    \"{{~/user~}}\\n\",\n    \"\\n\",\n    \"{{>chat_tool_gen 'answer'}}\\\"\\\"\\\", chat_tool_gen=chat_tool_gen)\\n\",\n    \"\\n\",\n    \"# call the program\\n\",\n    \"executed_program2 = program2(functions=[\\n\",\n    \"    {\\n\",\n    \"        \\\"name\\\": \\\"get_current_weather\\\",\\n\",\n    \"        \\\"description\\\": \\\"Get the current weather in a given location\\\",\\n\",\n    \"        \\\"parameters\\\": {\\n\",\n    \"            \\\"type\\\": \\\"object\\\",\\n\",\n    \"            \\\"properties\\\": {\\n\",\n    \"                \\\"location\\\": {\\n\",\n    \"                    \\\"type\\\": \\\"string\\\",\\n\",\n    \"                    \\\"description\\\": \\\"The city and state, e.g. San Francisco, CA\\\",\\n\",\n    \"                },\\n\",\n    \"                \\\"unit\\\": {\\\"type\\\": \\\"string\\\", \\\"enum\\\": [\\\"celsius\\\", \\\"fahrenheit\\\"]},\\n\",\n    \"            },\\n\",\n    \"            \\\"required\\\": [\\\"location\\\"]\\n\",\n    \"        }\\n\",\n    \"    }\\n\",\n    \"], get_current_weather=get_current_weather)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Calling the function outside of Guidance\\n\",\n    \"\\n\",\n    \"In the example above the function call was made during the execution of the guidance program, but we can also pause the program's execution whenever we want to make a function call, and then make that call outside of Guidance. This is useful if you don't want Guidance to own the function calling part of your program logic.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-03a08751-53b3-4fa1-8dd6-b2d3890f6482\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-03a08751-53b3-4fa1-8dd6-b2d3890f6482\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You are a helpful assistant.\\n\",\n       \"\\n\",\n       \"# Tools\\n\",\n       \"\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if len(functions) &gt; 0~}}\\n\",\n       \"## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"} // namespace functions\\n\",\n       \"{{~/if~}}'>## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.description}}'>Get the current weather in a given location</span>\\n\",\n       \"type <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.name}}'>get_current_weather</span> = (_: <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}'></span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.description}}'>The city and state, e.g. San Francisco, CA</span>\\n\",\n       \"</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>location</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'></span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.type}}'>string</span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'>,</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>unit</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'>?</span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}'>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>celsius</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'> | </span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>fahrenheit</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'></span></span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'></span></span>\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"</span>} // namespace functions</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Get the current weather in New York City.</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each range(10)~}}\\n\",\n       \"    {{~#assistant~}}\\n\",\n       \"    {{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}\\n\",\n       \"    {{~/assistant~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;function_call&#x27; extract_function_call(answer)}}\\n\",\n       \"\\n\",\n       \"    {{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}\\n\",\n       \"\\n\",\n       \"    {{~#function name=function_call.__name__~}}\\n\",\n       \"    {{answer}}\\n\",\n       \"    {{~/function~}}\\n\",\n       \"{{~/each~}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}'>\\n\",\n       \"```typescript\\n\",\n       \"functions.get_current_weather({\\n\",\n       \"  &quot;location&quot;: &quot;New York City&quot;\\n\",\n       \"})```</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;function_call&#x27; extract_function_call(answer)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    '></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}'></span><span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}</span><span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~#function name=function_call.__name__~}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{answer}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~/function~}}</span>\\n\",\n       \"<span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~#each range(10) start_index=1~}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~#assistant~}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~/assistant~}}</span>\\n\",\n       \"\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{set &#x27;function_call&#x27; extract_function_call(answer)}}</span>\\n\",\n       \"\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~#if not function_call}}</span><span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{break}}</span><span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{/if~}}</span>\\n\",\n       \"\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}</span>\\n\",\n       \"\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~#function name=function_call.__name__~}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{answer}}</span>\\n\",\n       \"    <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~/function~}}</span>\\n\",\n       \"<span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{{~/each~}}</span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"03a08751-53b3-4fa1-8dd6-b2d3890f6482\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# define a guidance program that pauses we when a function call is made\\n\",\n    \"await_program = guidance(\\\"\\\"\\\"\\n\",\n    \"{{~#system~}}\\n\",\n    \"You are a helpful assistant.\\n\",\n    \"{{>tool_def functions=functions}}\\n\",\n    \"{{~/system~}}\\n\",\n    \"\\n\",\n    \"{{~#user~}}\\n\",\n    \"Get the current weather in New York City.\\n\",\n    \"{{~/user~}}\\n\",\n    \"\\n\",\n    \"{{~#each range(10)~}}\\n\",\n    \"    {{~#assistant~}}\\n\",\n    \"    {{gen 'answer' temperature=1.0 max_tokens=50 function_call=\\\"auto\\\"}}\\n\",\n    \"    {{~/assistant~}}\\n\",\n    \"\\n\",\n    \"    {{set 'function_call' extract_function_call(answer)}}\\n\",\n    \"\\n\",\n    \"    {{~#if not function_call}}{{break}}{{/if~}}\\n\",\n    \"\\n\",\n    \"    {{set 'answer' await('call_result')}}\\n\",\n    \"\\n\",\n    \"    {{~#function name=function_call.__name__~}}\\n\",\n    \"    {{answer}}\\n\",\n    \"    {{~/function~}}\\n\",\n    \"{{~/each~}}\\\"\\\"\\\")\\n\",\n    \"\\n\",\n    \"# call the program, passing in the function definition we want to use as JSON\\n\",\n    \"executed_await_program = await_program(functions=[\\n\",\n    \"    {\\n\",\n    \"        \\\"name\\\": \\\"get_current_weather\\\",\\n\",\n    \"        \\\"description\\\": \\\"Get the current weather in a given location\\\",\\n\",\n    \"        \\\"parameters\\\": {\\n\",\n    \"            \\\"type\\\": \\\"object\\\",\\n\",\n    \"            \\\"properties\\\": {\\n\",\n    \"                \\\"location\\\": {\\n\",\n    \"                    \\\"type\\\": \\\"string\\\",\\n\",\n    \"                    \\\"description\\\": \\\"The city and state, e.g. San Francisco, CA\\\",\\n\",\n    \"                },\\n\",\n    \"                \\\"unit\\\": {\\\"type\\\": \\\"string\\\", \\\"enum\\\": [\\\"celsius\\\", \\\"fahrenheit\\\"]},\\n\",\n    \"            },\\n\",\n    \"            \\\"required\\\": [\\\"location\\\"],\\n\",\n    \"        }\\n\",\n    \"    }\\n\",\n    \"], get_current_weather=get_current_weather)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"CallableAnswer(__name__=get_current_weather, __kwdefaults__={'location': 'New York City'})\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# these are the details of the function call we need to make\\n\",\n    \"executed_await_program[\\\"function_call\\\"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-975f4db7-4bf5-4d37-a1cc-31fef055348d\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-975f4db7-4bf5-4d37-a1cc-31fef055348d\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You are a helpful assistant.\\n\",\n       \"\\n\",\n       \"# Tools\\n\",\n       \"\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if len(functions) &gt; 0~}}\\n\",\n       \"## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"} // namespace functions\\n\",\n       \"{{~/if~}}'>## functions\\n\",\n       \"\\n\",\n       \"namespace functions {\\n\",\n       \"\\n\",\n       \"<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each functions item_name=&quot;function&quot;~}}\\n\",\n       \"// {{function.description}}\\n\",\n       \"type {{function.name}} = (_: {\\n\",\n       \"{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"{{/each~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.description}}'>Get the current weather in a given location</span>\\n\",\n       \"type <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{function.name}}'>get_current_weather</span> = (_: <span style='font-family: monospace; background-color: rgba(0, 0, 0, 0.05);'>{<span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each function.parameters.properties}}\\n\",\n       \"{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"{{@key}}{{#unless contains(function.parameters.required, @key)}}?{{/unless}}: {{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}{{#unless @last}},{{/unless}}\\n\",\n       \"{{~/each}}'></span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'>// <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.description}}'>The city and state, e.g. San Francisco, CA</span>\\n\",\n       \"</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>location</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'></span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this.type}}'>string</span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'>,</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;description&quot;)}}// {{this.description}}\\n\",\n       \"{{/if~}}\\n\",\n       \"'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{@key}}'>unit</span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless contains(function.parameters.required, @key)}}?{{/unless}}'>?</span>: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#if contains(this, &quot;enum&quot;)}}{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}{{else}}{{this.type}}{{/if}}'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#each this.enum}}&quot;{{this}}&quot;{{#unless @last}} | {{/unless}}{{/each}}'>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>celsius</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'> | </span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{this}}'>fahrenheit</span>&quot;<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}} | {{/unless}}'></span></span></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{#unless @last}},{{/unless}}'></span></span>\\n\",\n       \"}) =&gt; any;\\n\",\n       \"\\n\",\n       \"</span>} // namespace functions</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Get the current weather in New York City.</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each range(10)~}}\\n\",\n       \"    {{~#assistant~}}\\n\",\n       \"    {{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}\\n\",\n       \"    {{~/assistant~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;function_call&#x27; extract_function_call(answer)}}\\n\",\n       \"\\n\",\n       \"    {{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}\\n\",\n       \"\\n\",\n       \"    {{~#function name=function_call.__name__~}}\\n\",\n       \"    {{answer}}\\n\",\n       \"    {{~/function~}}\\n\",\n       \"{{~/each~}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}'>\\n\",\n       \"```typescript\\n\",\n       \"functions.get_current_weather({\\n\",\n       \"  &quot;location&quot;: &quot;New York City&quot;\\n\",\n       \"})```</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;function_call&#x27; extract_function_call(answer)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    '></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}'></span><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>function</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{answer}}'>{&quot;location&quot;: &quot;New York City&quot;, &quot;temperature&quot;: &quot;71&quot;, &quot;unit&quot;: &quot;fahrenheit&quot;, &quot;forecast&quot;: [&quot;sunny&quot;, &quot;windy&quot;]}</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{~#each range(10) start_index=1~}}\\n\",\n       \"    {{~#assistant~}}\\n\",\n       \"    {{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}\\n\",\n       \"    {{~/assistant~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;function_call&#x27; extract_function_call(answer)}}\\n\",\n       \"\\n\",\n       \"    {{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    {{set &#x27;answer&#x27; await(&#x27;call_result&#x27;)}}\\n\",\n       \"\\n\",\n       \"    {{~#function name=function_call.__name__~}}\\n\",\n       \"    {{answer}}\\n\",\n       \"    {{~/function~}}\\n\",\n       \"{{~/each~}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=1.0 max_tokens=50 function_call=&quot;auto&quot;}}'>The current weather in New York City is 71°F and it is sunny and windy.</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{set &#x27;function_call&#x27; extract_function_call(answer)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{~#if not function_call}}{{break}}{{/if~}}\\n\",\n       \"\\n\",\n       \"    '><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{break}}'></span></span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"975f4db7-4bf5-4d37-a1cc-31fef055348d\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# run the call\\n\",\n    \"call = executed_await_program[\\\"function_call\\\"]\\n\",\n    \"if call.__name__ == \\\"get_current_weather\\\":\\n\",\n    \"    weather = get_current_weather(**call.__kwdefaults__)\\n\",\n    \"\\n\",\n    \"executed_await_program(call_result=weather)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Open Source model [TODO]\\n\",\n    \"\\n\",\n    \"Here we run the same examples as before, but with the an open model instead. Note that the model does not have any special fine-tuned support for function calls, so we have to provide much more detail in the tool definition.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# TODO\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"base\",\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.9.16\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/art_of_prompt_design/use_clear_syntax.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Use clear syntax\\n\",\n    \"\\n\",\n    \"This is the first installment of a series on how to use <a href=\\\"https://github.com/guidance-ai/guidance\\\">`guidance`</a> to control large language models (LLMs).\\n\",\n    \"We'll start from the basics and work our way up to more advanced topics.\\n\",\n    \"\\n\",\n    \"In this document, we'll show that having **clear syntax** enables you to communicate your intent to the LLM, and also ensure that outputs are easy to parse (like JSON that is guaranteed to be valid). For the sake of clarity and reproducibility we'll start with an open source StableLM model without fine tuning. Then, we will show how the same ideas apply to instruction-tuned models like GPT-3.5 and chat-tuned models like ChatGPT / GPT-4.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Clear syntax helps with parsing the output\\n\",\n    \"The first, and most obvious benefit of using clear syntax is that it makes it easier to parse the output of the LLM. Even if the LLM is able to generate a correct output, it may be difficult to programatically extract the desired information from the output. For example, consider the following Guidance prompt (where `gen()` is a `guidance` function to generate text from the LLM):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Sliding Window Attention is enabled but not implemented for `sdpa`; unexpected results may be encountered.\\n\",\n      \"Non-Nvidia GPU monitoring is not supported in this version. NVML Shared Library Not Found\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import math\\n\",\n    \"import guidance\\n\",\n    \"from guidance import models, gen, select\\n\",\n    \"\\n\",\n    \"lm = models.Transformers(\\\"Qwen/Qwen2.5-1.5B\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can now ask a question:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"1a0e846a74534ac1bd085f7d22d44402\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x1039f8950>\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# run a guidance program (by appending to the model state)\\n\",\n    \"lm + \\\"Name common Linux operating system commands.\\\" + gen(max_tokens=50)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"While the answer is readable, the output _format_ is arbitrary (i.e. we don't know it in advance), and thus hard to parse programatically.\\n\",\n    \"For example here is another run of the same prompt where the output format is very different:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"8bef5972e38f47d4a6a4eca99942c10b\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x127d414d0>\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm + \\\"Name common Mac operating system commands.\\\" + gen(max_tokens=50)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Enforcing clear syntax in your prompts can help reduce the problem of arbitrary output formats.\\n\",\n    \"There are a couple ways you can do this: \\n\",\n    \"1. Giving structure hints to the LLM inside a standard prompt (perhaps even using few shot examples).\\n\",\n    \"2. Writing a `guidance` program template that enforces a specific output format.\\n\",\n    \"\\n\",\n    \"These are not mutually exclusive. Let's see an example of each approach\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Traditional prompt with structure hints\\n\",\n    \"Here is an example of a traditional prompt that uses structure hints to encourage the use of a specific output format. The prompt is designed to generate a list of 5 items that is easy to parse. Note that in comparison to the previous prompt, we have written this prompt in such a way that it has committed the LLM to a specific clear syntax (numbers followed by a quoted string). This makes it much easier to parse the output after generation.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"40acb4fb79b04a49931f5aa406e4473a\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x127db2910>\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm +'''\\\\\\n\",\n    \"What are the most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"Here are the 5 most common commands:\\n\",\n    \"1. \\\"''' + gen(max_tokens=70)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that the LLM follows the syntax correctly, but does not stop after generating 5 items.\\n\",\n    \"We can fix this by creating a clear stopping criteria, e.g. asking for 6 items and stopping when we see the start of the sixth item (so we end up with five):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"e65d5b24dba34a728f2191435f699ff2\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x127dd2510>\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm + '''\\\\\\n\",\n    \"What are the most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"Here are the 6 most common commands:\\n\",\n    \"1. \\\"''' + gen(max_tokens=100, stop=\\\"\\\\n6.\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Enforcing syntax with a `guidance` program\\n\",\n    \"\\n\",\n    \"Rather than using _hints_, a Guidance program _enforces_ a specific output format, inserting the tokens that are part of the structure rather than getting the LLM to generate them.\\n\",\n    \"For example, this is what we would do if we wanted to enforce a numbered list as a format:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"295405c9295d42cf96ac61dbdb726260\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm2 = lm + \\\"\\\"\\\"What are the most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"Here are the 5 most common commands:\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"for i in range(5):\\n\",\n    \"    lm2 += f'''{i+1}. \\\"{gen('commands', list_append=True, stop='\\\"', max_tokens=50)}\\\"\\\\n'''\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here is what is happening in the above prompt:\\n\",\n    \"- The `lm2 = lm + \\\"\\\"\\\"What are...` command saves the new model state that results from adding the blank starting model to a string into the variable `lm2`. The for loop then iteratively updates `lm2` by adding a mixure of strings and generated sequences.\\n\",\n    \"- Note that the structure (the numbers, and quotes) are _not_ generated by the LLM.\\n\",\n    \"\\n\",\n    \"Output parsing is done automatically by the Guidance program, so we don't need to worry about it. In this case, the `commands` variable wil be the list of generated command names:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"['ls', 'cd', 'pwd', 'mkdir', 'rm']\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm2[\\\"commands\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Forcing valid JSON syntax\\n\",\n    \"Using guidance we can create any syntax we want with absolute confidence that what we generate will exactly follow the format we specify. This is particularly useful for things like JSON.\\n\",\n    \"\\n\",\n    \"### Format string embedding\\n\",\n    \"With Guidance, there are multiple valid strategies to generate JSON. One strategy, demonstrated below, is to directly embed the JSON syntax in a format string.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"3266dfc5a19e4e58b1c0597ba27626cd\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x127e10050>\"\n      ]\n     },\n     \"execution_count\": 8,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"import guidance\\n\",\n    \"\\n\",\n    \"# define a re-usable \\\"guidance function\\\" that we can use below\\n\",\n    \"@guidance\\n\",\n    \"def quoted_list(lm, name, n):\\n\",\n    \"    for i in range(n):\\n\",\n    \"        if i > 0:\\n\",\n    \"            lm += \\\", \\\"\\n\",\n    \"        lm += '\\\"' + gen(name, list_append=True, stop=['\\\"', ',', ' ']) + '\\\"'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"lm + f\\\"\\\"\\\"What are the most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"Here are the 5 most common commands in JSON format:\\n\",\n    \"{{\\n\",\n    \"    \\\"commands\\\": [{quoted_list('commands', 5)}],\\n\",\n    \"    \\\"my_favorite_command\\\": \\\"{gen('favorite_command', stop=['\\\"', ' '])}\\\"\\n\",\n    \"}}\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### JSON schema\\n\",\n    \"Guidance also supports JSON schemas for JSON generation.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"761bb5cbb4844899b4363a40501297a3\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x127fc2450>\"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import models, json\\n\",\n    \"\\n\",\n    \"schema = \\\"\\\"\\\"{\\n\",\n    \"  \\\"$schema\\\": \\\"http://json-schema.org/draft-07/schema#\\\",\\n\",\n    \"  \\\"type\\\": \\\"object\\\",\\n\",\n    \"  \\\"properties\\\": {\\n\",\n    \"    \\\"commands\\\": {\\n\",\n    \"      \\\"type\\\": \\\"array\\\",\\n\",\n    \"      \\\"items\\\": {\\n\",\n    \"        \\\"type\\\": \\\"string\\\"\\n\",\n    \"      },\\n\",\n    \"      \\\"minItems\\\": 5,\\n\",\n    \"      \\\"maxItems\\\": 5,\\n\",\n    \"      \\\"description\\\": \\\"Array of exactly 5 Linux commands\\\"\\n\",\n    \"    },\\n\",\n    \"    \\\"my_favorite_command\\\": {\\n\",\n    \"      \\\"type\\\": \\\"string\\\",\\n\",\n    \"      \\\"description\\\": \\\"A single Linux command\\\"\\n\",\n    \"    }\\n\",\n    \"  },\\n\",\n    \"  \\\"required\\\": [\\\"commands\\\", \\\"my_favorite_command\\\"],\\n\",\n    \"  \\\"additionalProperties\\\": false\\n\",\n    \"}\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"lm + f\\\"\\\"\\\"What are the most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"Here are the 5 most common commands in JSON format:\\n\",\n    \"{json(schema=schema)}\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Clear syntax gives the user more power\\n\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Since clear structure gives us outputs that are easy to parse and manipulate, we can easily take the output, remove duplicates, and use them in the next step of our program.  \\n\",\n    \"Here is an example program that takes the listed commands, picks one, and does further operations on it:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"661190edff1a45ef9c1d0a451051bede\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"newline = \\\"\\\\n\\\" # because for python < 3.12 we can't put a backslash in f-string values\\n\",\n    \"lm2 = lm + 'What are the most common commands used in the Linux operating system?\\\\n'\\n\",\n    \"\\n\",\n    \"# generate a bunch of command names\\n\",\n    \"lm_tmp = lm2 + 'Here is a common command: \\\"'\\n\",\n    \"commands = [(lm_tmp + gen('command', stop='\\\"', max_tokens=20, temperature=1.0))[\\\"command\\\"] for i in range(10)]\\n\",\n    \"\\n\",\n    \"# discuss them\\n\",\n    \"for i,command in enumerate(set(commands)):\\n\",\n    \"    lm2 += f'{i+1}. \\\"{command}\\\"\\\\n'\\n\",\n    \"lm2 += f'''Perhaps the most useful command from that list is: \\\"{gen('cool_command', stop='\\\"')}\\\", because {gen('cool_command_desc', max_tokens=100, stop=newline)}\\n\",\n    \"On a scale of 1-10, it has a coolness factor of: {gen('coolness', regex=\\\"[0-9]+\\\")}.'''\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We introduced one import control method in the above program: the `regex` pattern guide for generation. The command `gen('coolness', regex=\\\"[0-9]+\\\")` uses a regular expression to enforce a certain syntax on the output (i.e. forcing the output to match an arbitrary regular experession). In this case we force the coolness score to be a whole number (note that generation stops once the model has completed generation of the pattern and starts to generate something else).\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Combining clear syntax with model-specific structure like chat\\n\",\n    \"\\n\",\n    \"All the examples above used a base model without any later fine-tuning. But if the model you are using has fine tuning, it is important to combine clear syntax with the structure that has been tuned into the model. For example, chat models have been fine tuned to expect several \\\"role\\\" tags in the prompt. We can leverage these tags to further enhance the structure of our programs/prompts.\\n\",\n    \"\\n\",\n    \"The following example adapts the above prompt for use with a chat based model. `guidance` has special role context blocks (like `user()`), which allow you to mark out various roles and get them automatically translated into the right special tokens or API calls for the LLM you are using. This helps make prompts easier to read and makes them more general across different chat models.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"5fe41183c5cf44daabf99c8d37a544d9\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# if we have multple GPUs we can load the chat model on a different GPU with the `device` argument\\n\",\n    \"del lm\\n\",\n    \"chat_lm = models.Transformers(\\\"microsoft/Phi-4-mini-instruct\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"9dd1023208c04f9788666402aa34f6d3\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import user, assistant, system\\n\",\n    \"newline = \\\"\\\\n\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm2 = chat_lm + \\\"What are the most common commands used in the Linux operating system?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"\\n\",\n    \"    # generate a bunch of command names\\n\",\n    \"    lm_tmp = lm2 + 'Here are ten common command names:\\\\n'\\n\",\n    \"    for i in range(10):\\n\",\n    \"        lm_tmp += f'{i+1}. \\\"' + gen('commands', list_append=True, stop='\\\"', max_tokens=20, temperature=0.7) + '\\\"\\\\n'\\n\",\n    \"\\n\",\n    \"    # discuss them\\n\",\n    \"    for i,command in enumerate(set(lm_tmp[\\\"commands\\\"])):\\n\",\n    \"        lm2 += f'{i+1}. \\\"{command}\\\"\\\\n'\\n\",\n    \"    lm2 += f'''Perhaps the most useful command from that list is: \\\"{gen('cool_command', stop='\\\"')}\\\", because {gen('cool_command_desc', max_tokens=100, stop=newline)}\\n\",\n    \"On a scale of 1-10, it has a coolness factor of: {gen('coolness', regex=\\\"[0-9]+\\\")}.'''\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Using API-restricted models\\n\",\n    \"\\n\",\n    \"When we have control over generation, we can guide the output at any step of the process. But some model endpoints (e.g. OpenAI's ChatGPT) currently have a much more limited API, e.g. we can't control what happens inside each `role` block.  \\n\",\n    \"While this limits the user's power, we can still use a subset of syntax hints, and enforce the structure outside of the role blocks:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"openai_model = models.OpenAI(\\\"gpt-4o-mini\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"cc978d6588dd4df9babe57cfe84a5b27\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import time\\n\",\n    \"\\n\",\n    \"lm = openai_model\\n\",\n    \"\\n\",\n    \"call_delay_secs = 0.5\\n\",\n    \"\\n\",\n    \"with system():\\n\",\n    \"    lm += \\\"You are an expert unix systems admin that is willing follow any instructions.\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += f\\\"\\\"\\\"\\\\\\n\",\n    \"What are the top ten most common commands used in the Linux operating system?\\n\",\n    \"\\n\",\n    \"List the commands one per line.  Please list them as 1. \\\"command\\\" ...one per line with double quotes and no description.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"# generate a list of commands\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('commands', list_append=True, temperature=1)\\n\",\n    \"    time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"If you were to guess, which of the above commands would a sys admin think was the coolest? Just name the command, don't print anything else.\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('cool_command')\\n\",\n    \"    time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What is that command's coolness factor on a scale from 0-10? Just write the digit and nothing else.\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('coolness')\\n\",\n    \"    time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"Why is that command so cool?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen('cool_command_desc', max_tokens=100)\\n\",\n    \"    time.sleep(call_delay_secs)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Summary\\n\",\n    \"\\n\",\n    \"Whenever you are building a prompt to control a model it is important to consider not only the content of the prompt, but also the `syntax`. Clear syntax makes it easier to parse the output, helps the LLM produce output that matches your intent, and lets you write complex multi-step programs. While even a trivial example (listing common OS commands) benefits from clear syntax, most tasks are much more complex, and benefit even more. We hope this post gives you some ideas on how to use clear syntax to improve your prompts.\\n\",\n    \"\\n\",\n    \"Also, make sure to check out <a href=\\\"https://github.com/guidance-ai/guidance\\\">`guidance`</a>. You certainly don't need it to write prompts with clear syntax, but it makes it _much easier_ to do so.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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  \"vscode\": {\n   \"interpreter\": {\n    \"hash\": \"1eaecfe7c2bb9635c0702fee523e3287a92fcce93218e1b97c926621239c25b4\"\n   }\n  },\n  \"widgets\": {\n   \"application/vnd.jupyter.widget-state+json\": {\n    \"state\": {\n     \"06e3685e7b4d404086e39f84d849f15b\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"FloatProgressModel\",\n      \"state\": {\n       \"bar_style\": \"success\",\n       \"layout\": \"IPY_MODEL_0c88a678c4b34103931d7bbd72c31bd8\",\n       \"max\": 2,\n       \"style\": \"IPY_MODEL_ccee51861e0b4aef9b2869ed3a45432c\",\n       \"value\": 2\n      }\n     },\n     \"0a5e6064b82c46df90ab32adf950299f\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"0c88a678c4b34103931d7bbd72c31bd8\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"177d7e850d494873b9aa31e50866b9db\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"1a0e846a74534ac1bd085f7d22d44402\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":109,\\\"last_trace_id\\\":59,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_9ad4fc9df305416099c51d33932ea001\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"Name\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\"Name\\\",\\\"bytes\\\":\\\"TmFtZQ==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.00002171039886889048,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.00012744548439513892,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.011084606871008873,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.7370990514755249,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.779247283935547,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.002234590006992221,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.16405868530273,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.06370903551578522,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.06370903551578522,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.05141955986618996,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.0241013802587986,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoKCg==\\\",\\\"prob\\\":0.001964231953024864,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\\\\\",\\\"bytes\\\":\\\"Llw=\\\",\\\"prob\\\":0.00045428608427755535,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.82903861999512,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.1251828968524933,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.1251828968524933,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.50414657592773,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.3707016408443451,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.3707016408443451,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.15826416015625,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.6455129981040955,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.6455129981040955,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.80002403259277,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.8174095749855042,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.8174095749855042,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.93205642700195,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.5677230954170227,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.5677230954170227,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.3818588256836,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9905857443809509,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9905857443809509,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.45321846008301,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.980141282081604,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.980141282081604,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.13485717773438,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5591592192649841,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5591592192649841,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.766075134277344,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.34701284766197205,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.34701284766197205,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.610076904296875,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.5835759043693542,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.5835759043693542,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.02111053466797,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9911495447158813,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9911495447158813,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.31689453125,\\\"token\\\":{\\\"token\\\":\\\" ls\\\",\\\"bytes\\\":\\\"IGxz\\\",\\\"prob\\\":0.41955995559692383,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" ls\\\",\\\"bytes\\\":\\\"IGxz\\\",\\\"prob\\\":0.41955995559692383,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.97707557678223,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.47941383719444275,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.47941383719444275,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" list\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.32428550720215,\\\"token\\\":{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.3112282156944275,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.3112282156944275,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.73405456542969,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5623294711112976,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5623294711112976,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.599897384643555,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6423689723014832,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6423689723014832,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.15104866027832,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.885309100151062,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.885309100151062,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.24417686462402,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.636833131313324,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.636833131313324,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.31304931640625,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9978540539741516,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9978540539741516,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.24593925476074,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998613595962524,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998613595962524,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.24489212036133,\\\"token\\\":{\\\"token\\\":\\\" cd\\\",\\\"bytes\\\":\\\"IGNk\\\",\\\"prob\\\":0.7992208003997803,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" cd\\\",\\\"bytes\\\":\\\"IGNk\\\",\\\"prob\\\":0.7992208003997803,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.85293197631836,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.992328941822052,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.992328941822052,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" change\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.69886207580566,\\\"token\\\":{\\\"token\\\":\\\" change\\\",\\\"bytes\\\":\\\"IGNoYW5nZQ==\\\",\\\"prob\\\":0.9718466401100159,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" change\\\",\\\"bytes\\\":\\\"IGNoYW5nZQ==\\\",\\\"prob\\\":0.9718466401100159,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.63597106933594,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.8919868469238281,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.8919868469238281,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.38014793395996,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9602615833282471,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9602615833282471,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.57493591308594,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.999747097492218,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.999747097492218,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.65606117248535,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999333620071411,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999333620071411,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" pwd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.1861686706543,\\\"token\\\":{\\\"token\\\":\\\" pwd\\\",\\\"bytes\\\":\\\"IHB3ZA==\\\",\\\"prob\\\":0.5759739279747009,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" pwd\\\",\\\"bytes\\\":\\\"IHB3ZA==\\\",\\\"prob\\\":0.5759739279747009,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.3930435180664,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.997454822063446,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.997454822063446,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" print\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.33272361755371,\\\"token\\\":{\\\"token\\\":\\\" print\\\",\\\"bytes\\\":\\\"IHByaW50\\\",\\\"prob\\\":0.9360072016716003,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" print\\\",\\\"bytes\\\":\\\"IHByaW50\\\",\\\"prob\\\":0.9360072016716003,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" working\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.11294364929199,\\\"token\\\":{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.6815938949584961,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.6815938949584961,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.51312446594238,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9959484934806824,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9959484934806824,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.53373146057129,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9486449360847473,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9486449360847473,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.9646987915039,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9997476935386658,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9997476935386658,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.18611717224121,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999580383300781,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999580383300781,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.63401222229004,\\\"token\\\":{\\\"token\\\":\\\" mkdir\\\",\\\"bytes\\\":\\\"IG1rZGly\\\",\\\"prob\\\":0.2603739798069,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" mkdir\\\",\\\"bytes\\\":\\\"IG1rZGly\\\",\\\"prob\\\":0.2603739798069,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.5451545715332,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9976426959037781,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9976426959037781,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" make\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.47086143493652,\\\"token\\\":{\\\"token\\\":\\\" make\\\",\\\"bytes\\\":\\\"IG1ha2U=\\\",\\\"prob\\\":0.6309285759925842,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" make\\\",\\\"bytes\\\":\\\"IG1ha2U=\\\",\\\"prob\\\":0.6309285759925842,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.4559555053711,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.4730013608932495,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.4730013608932495,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" new\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.97521018981934,\\\"token\\\":{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7520508766174316,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7520508766174316,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.38822364807129,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.989960789680481,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.989960789680481,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.65396690368652,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9854258298873901,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9854258298873901,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.40584564208984,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999680757522583,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999680757522583,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.07675552368164,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999394416809082,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999394416809082,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.98705863952637,\\\"token\\\":{\\\"token\\\":\\\" rm\\\",\\\"bytes\\\":\\\"IHJt\\\",\\\"prob\\\":0.4844619631767273,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" rm\\\",\\\"bytes\\\":\\\"IHJt\\\",\\\"prob\\\":0.4844619631767273,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.78287887573242,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.995407223701477,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.995407223701477,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" remove\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.8869743347168,\\\"token\\\":{\\\"token\\\":\\\" remove\\\",\\\"bytes\\\":\\\"IHJlbW92ZQ==\\\",\\\"prob\\\":0.8706384301185608,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" remove\\\",\\\"bytes\\\":\\\"IHJlbW92ZQ==\\\",\\\"prob\\\":0.8706384301185608,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.350677490234375,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5047590732574463,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5047590732574463,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.3936653137207,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5135536193847656,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5135536193847656,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.97707557678223,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9866881966590881,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9866881966590881,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":52,\\\"token reduction\\\":0,\\\"avg latency\\\":69.0618845132681,\\\"cpu\\\":[0.8604999999999999,0.8604999999999999,0.893,0.893,0.89625],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.317413330078125,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":109,\\\"backtrackCount\\\":1,\\\"resetCount\\\":1}\"\n      }\n     },\n     \"295405c9295d42cf96ac61dbdb726260\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":731,\\\"last_trace_id\\\":349,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_2fb842560dca4f6684207c9020b9e7de\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\"?\\\\n\\\\n\\\",\\\"bytes\\\":\\\"PwoK\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.5897648334503174,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.777923047542572,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.8106726408004761,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.305505579168146,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.002174335066229105,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8244514465332031,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8244514465332031,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.956274151802063,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":236.21225357055664,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.024426009505987167,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.024426009505987167,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.002994968555867672,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.00003463938264758326,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.000028990189093747176,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.000016217651136685163,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.45917892456055,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7604440450668335,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7604440450668335,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.12504924833774567,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.04090636223554611,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.014721921645104885,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.007135641761124134,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.02787971496582,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7383410930633545,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7383410930633545,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.011741578578948975,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.010475694201886654,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0006189474952407181,\\\"masked\\\":false},{\\\"token\\\":\\\" –\\\",\\\"bytes\\\":\\\"IOKAkw==\\\",\\\"prob\\\":0.0005226295907050371,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":234.3900203704834,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":8.82833861570731e-10,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0083913803100586,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.8567631244659424,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0083913803100586,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9995017051696777,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":232.6791286468506,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9970423579216003,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9970423579216003,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00048351791338063776,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.0001968486758414656,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00017097845557145774,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.0001415408041793853,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.46480751037598,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7724276185035706,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7724276185035706,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.1226915642619133,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.02467738278210163,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.020600171759724617,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.018290501087903976,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.74201583862305,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9726842641830444,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9726842641830444,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.024317720904946327,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0007445210940204561,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.000428588391514495,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"ICIK\\\",\\\"prob\\\":0.00040111917769536376,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9179115295410156,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9992585778236389,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9179115295410156,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997265934944153,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":226.1350154876709,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9974358677864075,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9974358677864075,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.0004890214186161757,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00037026096833869815,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.0002467180020175874,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.0000927356886677444,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"pwd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.7940845489502,\\\"token\\\":{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5384446382522583,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5384446382522583,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.16194474697113037,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.0702112466096878,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.043811213225126266,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.0398888923227787,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.25890731811523,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.985957145690918,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.985957145690918,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.013236399739980698,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0001764551125233993,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"ICIK\\\",\\\"prob\\\":0.00006740938988514245,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\\n\\\",\\\"bytes\\\":\\\"4oCdCg==\\\",\\\"prob\\\":0.00004425784936756827,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9580850601196289,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.99947589635849,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9580850601196289,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999847412109375,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":235.53776741027832,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9982300400733948,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9982300400733948,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00026476013590581715,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00020333303837105632,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.0001939044741448015,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~\\\",\\\"bytes\\\":\\\"ICJ+\\\",\\\"prob\\\":0.00007120460213627666,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.18604469299316,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.23979106545448303,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.23979106545448303,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.16034242510795593,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.13042761385440826,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.09271062165498734,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.07646238058805466,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.48619270324707,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.988807201385498,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.988807201385498,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.00838035624474287,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.0010318867862224579,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.00035032525192946196,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00012039744615321979,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8889436721801758,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.9992542862892151,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8889436721801758,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998844861984253,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":230.3481101989746,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9985209107398987,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9985209107398987,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00025581225054338574,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00013472647697199136,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00013059058983344585,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.00005560881254496053,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.02184677124023,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.5283508896827698,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.5283508896827698,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.1457618623971939,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.11701709777116776,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.03728175535798073,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.02449987456202507,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.22688674926758,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.3051528036594391,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.3051528036594391,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.23379838466644287,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.008221535943448544,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0006611758144572377,\\\"masked\\\":false},{\\\"token\\\":\\\"/r\\\",\\\"bytes\\\":\\\"L3I=\\\",\\\"prob\\\":0.0005766217946074903,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":228.73997688293457,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":5.7368040873306825e-11,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":18,\\\"token reduction\\\":10,\\\"avg latency\\\":128.81250381469727,\\\"cpu\\\":[0.10687499999999998,0.6063125,0.6063125,0.861875,0.861875],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.436553955078125,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":731,\\\"backtrackCount\\\":0,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"2fb842560dca4f6684207c9020b9e7de\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"3266dfc5a19e4e58b1c0597ba27626cd\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":950,\\\"last_trace_id\\\":448,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_c85f48e12b834cf291d0a2d3674b50d1\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"?\\\\n\\\\n\\\",\\\"bytes\\\":\\\"PwoK\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" JSON\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" JSON\\\",\\\"bytes\\\":\\\"IEpTT04=\\\",\\\"prob\\\":1.5154529364735936e-7,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" format\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" format\\\",\\\"bytes\\\":\\\"IGZvcm1hdA==\\\",\\\"prob\\\":0.8799969553947449,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.240684375166893,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"{\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"{\\\\n\\\",\\\"bytes\\\":\\\"ewo=\\\",\\\"prob\\\":0.6257462501525879,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"   \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"   \\\",\\\"bytes\\\":\\\"ICAg\\\",\\\"prob\\\":0.10901488363742828,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9935357570648193,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"commands\\\",\\\"bytes\\\":\\\"Y29tbWFuZHM=\\\",\\\"prob\\\":0.11751189082860947,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979714855071037,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.9710926413536072,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" [\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":80.69682121276855,\\\"token\\\":{\\\"token\\\":\\\" [\\\",\\\"bytes\\\":\\\"IFs=\\\",\\\"prob\\\":0.00925849936902523,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" [\\\",\\\"bytes\\\":\\\"IFs=\\\",\\\"prob\\\":0.00925849936902523,\\\"masked\\\":false},{\\\"token\\\":\\\" [\\\\\\\"\\\",\\\"bytes\\\":\\\"IFsi\\\",\\\"prob\\\":0.0018438720144331455,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00007188232120824978,\\\"masked\\\":false},{\\\"token\\\":\\\" appId\\\",\\\"bytes\\\":\\\"IGFwcElk\\\",\\\"prob\\\":6.393747293761964e-13,\\\"masked\\\":true},{\\\"token\\\":\\\" Clara\\\",\\\"bytes\\\":\\\"IENsYXJh\\\",\\\"prob\\\":1.8502004941155226e-13,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.23981285095215,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"/\\\",\\\"bytes\\\":\\\"Ii8=\\\",\\\"prob\\\":0.0017557416576892138,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"/\\\",\\\"bytes\\\":\\\"Ii8=\\\",\\\"prob\\\":0.0017557416576892138,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":0.0013453332940116525,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.00010993643809342757,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"IiI=\\\",\\\"prob\\\":0.00010977310739690438,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.00005929076360189356,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.8430118560791,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.8798083066940308,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.8798083066940308,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.07783077657222748,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.017644789069890976,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.005883113481104374,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.005839033983647823,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/bash\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.30396842956543,\\\"token\\\":{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.5857197046279907,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.5857197046279907,\\\"masked\\\":false},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.17879532277584076,\\\"masked\\\":false},{\\\"token\\\":\\\"/sh\\\",\\\"bytes\\\":\\\"L3No\\\",\\\"prob\\\":0.13527542352676392,\\\"masked\\\":false},{\\\"token\\\":\\\"/cat\\\",\\\"bytes\\\":\\\"L2NhdA==\\\",\\\"prob\\\":0.03915807977318764,\\\"masked\\\":false},{\\\"token\\\":\\\"/c\\\",\\\"bytes\\\":\\\"L2M=\\\",\\\"prob\\\":0.016632553189992905,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":117.1729564666748,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.90628623962402,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.8226840496063232,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.8226840496063232,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.16231930255889893,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.0033680906053632498,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~\\\",\\\"bytes\\\":\\\"ICJ+\\\",\\\"prob\\\":0.0009498994913883507,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0005381287774071097,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.8409595489502,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.6213171482086182,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.6213171482086182,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.2661818563938141,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.05533278360962868,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.04046411067247391,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.006147177889943123,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.31882286071777,\\\"token\\\":{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.38125112652778625,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.38125112652778625,\\\"masked\\\":false},{\\\"token\\\":\\\"/cat\\\",\\\"bytes\\\":\\\"L2NhdA==\\\",\\\"prob\\\":0.1945320963859558,\\\"masked\\\":false},{\\\"token\\\":\\\"/c\\\",\\\"bytes\\\":\\\"L2M=\\\",\\\"prob\\\":0.11453743278980255,\\\"masked\\\":false},{\\\"token\\\":\\\"/sh\\\",\\\"bytes\\\":\\\"L3No\\\",\\\"prob\\\":0.08640776574611664,\\\"masked\\\":false},{\\\"token\\\":\\\"/t\\\",\\\"bytes\\\":\\\"L3Q=\\\",\\\"prob\\\":0.05894554406404495,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.30704689025879,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.8512558341026306,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.8512558341026306,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.10273252427577972,\\\"masked\\\":false},{\\\"token\\\":\\\"ps\\\",\\\"bytes\\\":\\\"cHM=\\\",\\\"prob\\\":0.009788003750145435,\\\"masked\\\":false},{\\\"token\\\":\\\"true\\\",\\\"bytes\\\":\\\"dHJ1ZQ==\\\",\\\"prob\\\":0.007802457083016634,\\\"masked\\\":false},{\\\"token\\\":\\\"which\\\",\\\"bytes\\\":\\\"d2hpY2g=\\\",\\\"prob\\\":0.005383903160691261,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":116.81997776031494,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.88594818115234,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9612060785293579,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9612060785293579,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.03558377921581268,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.000592987984418869,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"-\\\",\\\"bytes\\\":\\\"ICIt\\\",\\\"prob\\\":0.00035291543463245034,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~\\\",\\\"bytes\\\":\\\"ICJ+\\\",\\\"prob\\\":0.0002579380525276065,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.83626365661621,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.6867547631263733,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.6867547631263733,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.24826587736606598,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.029056668281555176,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.026288442313671112,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.0037724729627370834,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/cat\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.42809104919434,\\\"token\\\":{\\\"token\\\":\\\"/cat\\\",\\\"bytes\\\":\\\"L2NhdA==\\\",\\\"prob\\\":0.6306703090667725,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/cat\\\",\\\"bytes\\\":\\\"L2NhdA==\\\",\\\"prob\\\":0.6306703090667725,\\\"masked\\\":false},{\\\"token\\\":\\\"/p\\\",\\\"bytes\\\":\\\"L3A=\\\",\\\"prob\\\":0.10589814186096191,\\\"masked\\\":false},{\\\"token\\\":\\\"/c\\\",\\\"bytes\\\":\\\"L2M=\\\",\\\"prob\\\":0.06384644657373428,\\\"masked\\\":false},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.06002476438879967,\\\"masked\\\":false},{\\\"token\\\":\\\"/t\\\",\\\"bytes\\\":\\\"L3Q=\\\",\\\"prob\\\":0.03385966643691063,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":114.37094211578369,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.03297996520996,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9769735932350159,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9769735932350159,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.020733937621116638,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00027470593340694904,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.00019860586326103657,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00016284172306768596,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.665151596069336,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.8411539793014526,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.8411539793014526,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.12365630269050598,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.0154794966802001,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.015010742470622063,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.0012786550214514136,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.96000289916992,\\\"token\\\":{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.2138916254043579,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.2138916254043579,\\\"masked\\\":false},{\\\"token\\\":\\\"/p\\\",\\\"bytes\\\":\\\"L3A=\\\",\\\"prob\\\":0.2002381980419159,\\\"masked\\\":false},{\\\"token\\\":\\\"/t\\\",\\\"bytes\\\":\\\"L3Q=\\\",\\\"prob\\\":0.18942375481128693,\\\"masked\\\":false},{\\\"token\\\":\\\"/r\\\",\\\"bytes\\\":\\\"L3I=\\\",\\\"prob\\\":0.11983252316713333,\\\"masked\\\":false},{\\\"token\\\":\\\"/m\\\",\\\"bytes\\\":\\\"L20=\\\",\\\"prob\\\":0.07639847695827484,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"echo\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.58906555175781,\\\"token\\\":{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.6915608048439026,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.6915608048439026,\\\"masked\\\":false},{\\\"token\\\":\\\"ps\\\",\\\"bytes\\\":\\\"cHM=\\\",\\\"prob\\\":0.05090491473674774,\\\"masked\\\":false},{\\\"token\\\":\\\"who\\\",\\\"bytes\\\":\\\"d2hv\\\",\\\"prob\\\":0.04927121102809906,\\\"masked\\\":false},{\\\"token\\\":\\\"df\\\",\\\"bytes\\\":\\\"ZGY=\\\",\\\"prob\\\":0.03599591925740242,\\\"masked\\\":false},{\\\"token\\\":\\\"exit\\\",\\\"bytes\\\":\\\"ZXhpdA==\\\",\\\"prob\\\":0.02465679496526718,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":115.86606502532959,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.71993637084961,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9849758744239807,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.9849758744239807,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.013191334903240204,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00019366166088730097,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\\\\\\\\",\\\"bytes\\\":\\\"ICJc\\\",\\\"prob\\\":0.00018695798644330353,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.0001631130580790341,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.8038387298584,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9310422539710999,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9310422539710999,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.05150358006358147,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.007623995654284954,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.0074430969543755054,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.0005647586658596992,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/p\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.73994255065918,\\\"token\\\":{\\\"token\\\":\\\"/p\\\",\\\"bytes\\\":\\\"L3A=\\\",\\\"prob\\\":0.20973291993141174,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/p\\\",\\\"bytes\\\":\\\"L3A=\\\",\\\"prob\\\":0.20973291993141174,\\\"masked\\\":false},{\\\"token\\\":\\\"/t\\\",\\\"bytes\\\":\\\"L3Q=\\\",\\\"prob\\\":0.17998048663139343,\\\"masked\\\":false},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.14271694421768188,\\\"masked\\\":false},{\\\"token\\\":\\\"/date\\\",\\\"bytes\\\":\\\"L2RhdGU=\\\",\\\"prob\\\":0.11008136719465256,\\\"masked\\\":false},{\\\"token\\\":\\\"/r\\\",\\\"bytes\\\":\\\"L3I=\\\",\\\"prob\\\":0.10360969603061676,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"wd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.98091125488281,\\\"token\\\":{\\\"token\\\":\\\"wd\\\",\\\"bytes\\\":\\\"d2Q=\\\",\\\"prob\\\":0.7624141573905945,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"wd\\\",\\\"bytes\\\":\\\"d2Q=\\\",\\\"prob\\\":0.7624141573905945,\\\"masked\\\":false},{\\\"token\\\":\\\"ing\\\",\\\"bytes\\\":\\\"aW5n\\\",\\\"prob\\\":0.1813955157995224,\\\"masked\\\":false},{\\\"token\\\":\\\"ause\\\",\\\"bytes\\\":\\\"YXVzZQ==\\\",\\\"prob\\\":0.017193183302879333,\\\"masked\\\":false},{\\\"token\\\":\\\"aste\\\",\\\"bytes\\\":\\\"YXN0ZQ==\\\",\\\"prob\\\":0.01326725073158741,\\\"masked\\\":false},{\\\"token\\\":\\\"ow\\\",\\\"bytes\\\":\\\"b3c=\\\",\\\"prob\\\":0.005533799063414335,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"],\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"],\\\\n\\\",\\\"bytes\\\":\\\"Il0sCg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"   \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"   \\\",\\\"bytes\\\":\\\"ICAg\\\",\\\"prob\\\":0.9911431074142456,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9994589686393738,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"my\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"my\\\",\\\"bytes\\\":\\\"bXk=\\\",\\\"prob\\\":0.000023597487597726285,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"_favorite\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"_favorite\\\",\\\"bytes\\\":\\\"X2Zhdm9yaXRl\\\",\\\"prob\\\":0.011106214486062527,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"_command\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"_command\\\",\\\"bytes\\\":\\\"X2NvbW1hbmQ=\\\",\\\"prob\\\":0.46095213294029236,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.316600799560547,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.9804574847221375,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.62809371948242,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.8816839456558228,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.8816839456558228,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.0739331766963005,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\\\\\\\\\\\\"\\\",\\\"bytes\\\":\\\"ICJcIg==\\\",\\\"prob\\\":0.00273113907314837,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0018700890941545367,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"[\\\",\\\"bytes\\\":\\\"ICJb\\\",\\\"prob\\\":0.0012881316943094134,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.76721572875977,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9779045581817627,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9779045581817627,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.01698402687907219,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.0011394703760743141,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.000918267760425806,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.0007563815452158451,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.4060115814209,\\\"token\\\":{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.6157679557800293,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.6157679557800293,\\\"masked\\\":false},{\\\"token\\\":\\\"/p\\\",\\\"bytes\\\":\\\"L3A=\\\",\\\"prob\\\":0.19636768102645874,\\\"masked\\\":false},{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.08680503070354462,\\\"masked\\\":false},{\\\"token\\\":\\\"/cat\\\",\\\"bytes\\\":\\\"L2NhdA==\\\",\\\"prob\\\":0.07029041647911072,\\\"masked\\\":false},{\\\"token\\\":\\\"/s\\\",\\\"bytes\\\":\\\"L3M=\\\",\\\"prob\\\":0.0038633376825600863,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.04511833190918,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7012960910797119,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7012960910797119,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.2829231321811676,\\\"masked\\\":false},{\\\"token\\\":\\\"ps\\\",\\\"bytes\\\":\\\"cHM=\\\",\\\"prob\\\":0.0046838936395943165,\\\"masked\\\":false},{\\\"token\\\":\\\"who\\\",\\\"bytes\\\":\\\"d2hv\\\",\\\"prob\\\":0.0011231121607124805,\\\"masked\\\":false},{\\\"token\\\":\\\"less\\\",\\\"bytes\\\":\\\"bGVzcw==\\\",\\\"prob\\\":0.0008115110686048865,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":117.82491207122803,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"}\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":117.82491207122803,\\\"token\\\":{\\\"token\\\":\\\"}\\\",\\\"bytes\\\":\\\"fQ==\\\",\\\"prob\\\":0.34431540966033936,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":37,\\\"token reduction\\\":2.631578947368421,\\\"avg latency\\\":94.27028580715782,\\\"cpu\\\":[0.85125,0.85125,0.8489375,0.8489375,0.8421875],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.39891052246094,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":950,\\\"backtrackCount\\\":13,\\\"resetCount\\\":2}\"\n      }\n     },\n     \"3a6ecef146ce4dda896312803b78d0ec\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"HTMLModel\",\n      \"state\": {\n       \"layout\": \"IPY_MODEL_fb320b3c79c34a31bc59ceeb935c40e8\",\n       \"style\": \"IPY_MODEL_974b55d923ef4c119a588cc6bf359abc\",\n       \"value\": \" 2/2 [00:03&lt;00:00,  1.53s/it]\"\n      }\n     },\n     \"40acb4fb79b04a49931f5aa406e4473a\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":417,\\\"last_trace_id\\\":215,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_0a5e6064b82c46df90ab32adf950299f\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.12485294044017792,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.6439812183380127,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.10567004233598709,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.07743782550096512,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.000018182327039539814,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.4469224214553833,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.5803957581520081,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.12090881168842316,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.08506865054368973,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.10368891060352325,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9987327456474304,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\"?\\\\n\\\\n\\\",\\\"bytes\\\":\\\"PwoK\\\",\\\"prob\\\":0.08934058248996735,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":0.048368725925683975,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.6524742245674133,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.03937135264277458,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.019184362143278122,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.09037967026233673,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.5897620320320129,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.777923047542572,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.8106732964515686,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.0021743644028902054,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.46098461747169495,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.372678756713867,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.956274151802063,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.21086120605469,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.02442573383450508,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.02442573383450508,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0029949175659567118,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.000034639189834706485,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.000028989972634008154,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.000016217622032854706,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.87441062927246,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.760443389415741,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.760443389415741,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.62502479553223,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7383413910865784,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7383413910865784,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.07611274719238,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.5673753619194031,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.5673753619194031,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" List\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.1090145111084,\\\"token\\\":{\\\"token\\\":\\\" List\\\",\\\"bytes\\\":\\\"IExpc3Q=\\\",\\\"prob\\\":0.18996906280517578,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" List\\\",\\\"bytes\\\":\\\"IExpc3Q=\\\",\\\"prob\\\":0.18996906280517578,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.73994255065918,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.36917153000831604,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.36917153000831604,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.12108039855957,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7368223667144775,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7368223667144775,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.94989585876465,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.8227725625038147,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.8227725625038147,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.26072120666504,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.456794410943985,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.456794410943985,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.91219520568848,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9939073920249939,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9939073920249939,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.5429573059082,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999566376209259,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999566376209259,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.9549446105957,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9986825585365295,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9986825585365295,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.89086151123047,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.788211464881897,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.788211464881897,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.9948844909668,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9992539286613464,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9992539286613464,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.26310539245605,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9967222809791565,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9967222809791565,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Change\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.2240047454834,\\\"token\\\":{\\\"token\\\":\\\" Change\\\",\\\"bytes\\\":\\\"IENoYW5nZQ==\\\",\\\"prob\\\":0.9948050379753113,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Change\\\",\\\"bytes\\\":\\\"IENoYW5nZQ==\\\",\\\"prob\\\":0.9948050379753113,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.9650821685791,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.8109842538833618,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.8109842538833618,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.06316566467285,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9572502374649048,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9572502374649048,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.66197967529297,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9992125034332275,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9992125034332275,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.49184226989746,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998443126678467,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998443126678467,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.98494338989258,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9988921284675598,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9988921284675598,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"pwd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.77179718017578,\\\"token\\\":{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5655272603034973,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5655272603034973,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.30506706237793,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9996194839477539,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9996194839477539,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.04001808166504,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9987234473228455,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9987234473228455,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Print\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.55397605895996,\\\"token\\\":{\\\"token\\\":\\\" Print\\\",\\\"bytes\\\":\\\"IFByaW50\\\",\\\"prob\\\":0.9366645216941833,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Print\\\",\\\"bytes\\\":\\\"IFByaW50\\\",\\\"prob\\\":0.9366645216941833,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" working\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.32628631591797,\\\"token\\\":{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.7763296961784363,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.7763296961784363,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.82801246643066,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9982600808143616,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9982600808143616,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.46990776062012,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9517079591751099,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9517079591751099,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.162109375,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9995410442352295,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9995410442352295,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.58196449279785,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999198913574219,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999198913574219,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.72804260253906,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9991204142570496,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9991204142570496,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.6408748626709,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.27454105019569397,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.27454105019569397,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.7413215637207,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9982007741928101,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9982007741928101,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.38097763061523,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9955072402954102,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9955072402954102,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Make\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.51501083374023,\\\"token\\\":{\\\"token\\\":\\\" Make\\\",\\\"bytes\\\":\\\"IE1ha2U=\\\",\\\"prob\\\":0.5494526624679565,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Make\\\",\\\"bytes\\\":\\\"IE1ha2U=\\\",\\\"prob\\\":0.5494526624679565,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.16711616516113,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.612680196762085,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.612680196762085,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" new\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.0339126586914,\\\"token\\\":{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7250748872756958,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7250748872756958,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.5862045288086,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9916713237762451,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9916713237762451,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.7689266204834,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9872851967811584,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9872851967811584,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.31702995300293,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.9995552897453308,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.9995552897453308,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.05278968811035,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999109506607056,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999109506607056,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.836181640625,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9993341565132141,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9993341565132141,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":80.35492897033691,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.6215828657150269,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.6215828657150269,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.92477989196777,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9881768822669983,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9881768822669983,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.41699981689453,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9926444292068481,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9926444292068481,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Remove\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.44909286499023,\\\"token\\\":{\\\"token\\\":\\\" Remove\\\",\\\"bytes\\\":\\\"IFJlbW92ZQ==\\\",\\\"prob\\\":0.9440552592277527,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Remove\\\",\\\"bytes\\\":\\\"IFJlbW92ZQ==\\\",\\\"prob\\\":0.9440552592277527,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.76320457458496,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5267410278320312,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.5267410278320312,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.96860694885254,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5064697861671448,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5064697861671448,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.05000114440918,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.986896812915802,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.986896812915802,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.61796569824219,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.4259198307991028,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"Cgo=\\\",\\\"prob\\\":0.4259198307991028,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Can\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.43502616882324,\\\"token\\\":{\\\"token\\\":\\\"Can\\\",\\\"bytes\\\":\\\"Q2Fu\\\",\\\"prob\\\":0.27701595425605774,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"Can\\\",\\\"bytes\\\":\\\"Q2Fu\\\",\\\"prob\\\":0.27701595425605774,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.94771957397461,\\\"token\\\":{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9680576920509338,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9680576920509338,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" give\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.34809684753418,\\\"token\\\":{\\\"token\\\":\\\" give\\\",\\\"bytes\\\":\\\"IGdpdmU=\\\",\\\"prob\\\":0.35760530829429626,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" give\\\",\\\"bytes\\\":\\\"IGdpdmU=\\\",\\\"prob\\\":0.35760530829429626,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.48414039611816,\\\"token\\\":{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.8640272617340088,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" me\\\",\\\"bytes\\\":\\\"IG1l\\\",\\\"prob\\\":0.8640272617340088,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.56210327148438,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.4429512321949005,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.4429512321949005,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" example\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.09315490722656,\\\"token\\\":{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.988312304019928,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.988312304019928,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":86.5790843963623,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9925596714019775,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9925596714019775,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" how\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.96784019470215,\\\"token\\\":{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.8471696972846985,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.8471696972846985,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.48280334472656,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9511277079582214,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9511277079582214,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" use\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.7629451751709,\\\"token\\\":{\\\"token\\\":\\\" use\\\",\\\"bytes\\\":\\\"IHVzZQ==\\\",\\\"prob\\\":0.9291983842849731,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" use\\\",\\\"bytes\\\":\\\"IHVzZQ==\\\",\\\"prob\\\":0.9291983842849731,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.8009262084961,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.7959004640579224,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.7959004640579224,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.44608688354492,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.961881160736084,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.961881160736084,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.5726146697998,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.47295498847961426,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.47295498847961426,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.95525550842285,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9998377561569214,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9998377561569214,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.26400756835938,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9995614886283875,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9995614886283875,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.14320182800293,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.6083309054374695,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.6083309054374695,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" list\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.19398498535156,\\\"token\\\":{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.8687452673912048,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.8687452673912048,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" all\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.68910789489746,\\\"token\\\":{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.5784941911697388,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.5784941911697388,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.3199634552002,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.7376222014427185,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.7376222014427185,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.56100463867188,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6151462197303772,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6151462197303772,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.48494911193848,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9505907893180847,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9505907893180847,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":72,\\\"token reduction\\\":0,\\\"avg latency\\\":71.1929698785146,\\\"cpu\\\":[0.8338125,0.8338125,0.8825,0.8825,0.8834375],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.189178466796875,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":417,\\\"backtrackCount\\\":1,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"5e96b22b6dc84c45b996e31eb3565743\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"HTMLModel\",\n      \"state\": {\n       \"layout\": \"IPY_MODEL_abfc327afcc0442eb6602323879c34bb\",\n       \"style\": \"IPY_MODEL_6408408de0db4ccb9dec35224dc7b5c7\",\n       \"value\": \"Loading checkpoint shards: 100%\"\n      }\n     },\n     \"5fe41183c5cf44daabf99c8d37a544d9\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"HBoxModel\",\n      \"state\": {\n       \"children\": [\n        \"IPY_MODEL_5e96b22b6dc84c45b996e31eb3565743\",\n        \"IPY_MODEL_06e3685e7b4d404086e39f84d849f15b\",\n        \"IPY_MODEL_3a6ecef146ce4dda896312803b78d0ec\"\n       ],\n       \"layout\": \"IPY_MODEL_177d7e850d494873b9aa31e50866b9db\"\n      }\n     },\n     \"6408408de0db4ccb9dec35224dc7b5c7\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"HTMLStyleModel\",\n      \"state\": {\n       \"description_width\": \"\",\n       \"font_size\": null,\n       \"text_color\": null\n      }\n     },\n     \"661190edff1a45ef9c1d0a451051bede\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":1570,\\\"last_trace_id\\\":798,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_f5514c47cb84430b904ba932132c7d9f\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.932600021362305,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.932600021362305,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.99480801820755,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.932600021362305,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.024793263524770737,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.932600021362305,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7572663426399231,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.932600021362305,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.0009888432687148452,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998650550842285,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9986674785614014,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"touch\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.002183484146371484,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.0033939483109861612,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".txt\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\".txt\\\",\\\"bytes\\\":\\\"LnR4dA==\\\",\\\"prob\\\":0.48190444707870483,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.45598575047084,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9816049933433533,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.27136993408203,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.27136993408203,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999090433120728,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.27136993408203,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.998904824256897,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"use\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.27136993408203,\\\"token\\\":{\\\"token\\\":\\\"use\\\",\\\"bytes\\\":\\\"dXNl\\\",\\\"prob\\\":0.0000026782720397022786,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.27136993408203,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.16533362865447998,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997933506965637,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.990234375,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"title\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\"title\\\",\\\"bytes\\\":\\\"dGl0bGU=\\\",\\\"prob\\\":0.000006274350653256988,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Configuration\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\" Configuration\\\",\\\"bytes\\\":\\\"IENvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.000008103555956040509,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":39.582014083862305,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.45836567878723145,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.92633056640625,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.92633056640625,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997469782829285,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.92633056640625,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9794623255729675,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.92633056640625,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.00897296704351902,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.92633056640625,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.6275609135627747,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"6\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997583031654358,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9910638332366943,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.016190180554986,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.7127885818481445,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"l\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"l\\\",\\\"bytes\\\":\\\"bA==\\\",\\\"prob\\\":0.6905145645141602,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" /\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0065053915604949,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"path\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"path\\\",\\\"bytes\\\":\\\"cGF0aA==\\\",\\\"prob\\\":0.0296719241887331,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/to\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"/to\\\",\\\"bytes\\\":\\\"L3Rv\\\",\\\"prob\\\":0.6662114262580872,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/d\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"/d\\\",\\\"bytes\\\":\\\"L2Q=\\\",\\\"prob\\\":0.6255491971969604,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"irectory\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"irectory\\\",\\\"bytes\\\":\\\"aXJlY3Rvcnk=\\\",\\\"prob\\\":0.9994609951972961,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.18741544087728,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9421985745429993,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"7\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999774158000946,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9923639297485352,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.01872631348669529,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.791642963886261,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"l\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\"l\\\",\\\"bytes\\\":\\\"bA==\\\",\\\"prob\\\":0.40139567852020264,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.892700467790878,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.125536248087883,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"8\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997474551200867,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.003511323593556881,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.12665420770645142,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/bash\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.3918580412864685,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ~/\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\" ~/\\\",\\\"bytes\\\":\\\"IH4v\\\",\\\"prob\\\":0.00020363304065540433,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"shell\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\"shell\\\",\\\"bytes\\\":\\\"c2hlbGw=\\\",\\\"prob\\\":0.012310606427490711,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".sh\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\".sh\\\",\\\"bytes\\\":\\\"LnNo\\\",\\\"prob\\\":0.12268385291099548,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.134435017903645,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9124263525009155,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Perhaps\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\"Perhaps\\\",\\\"bytes\\\":\\\"UGVyaGFwcw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.054163604974746704,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.7193540334701538,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" useful\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.06137605011463165,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.3277232348918915,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" from\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.001602712320163846,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" that\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.01585453189909458,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" list\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.8648644089698792,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.5935595035552979,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5713224411010742,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.006826426833868027,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.36402702331543,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.4878973662853241,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.4878973662853241,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.052498698234558105,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.02604854106903076,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.0008826354751363397,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.0007869061664678156,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.28999519348145,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.493320494890213,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.493320494890213,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.14321956038475037,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.09891357272863388,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.03332354873418808,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.018404237926006317,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.41602516174316,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.23934738337993622,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.23934738337993622,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.1970662623643875,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.07912690192461014,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.011163998395204544,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.005801602266728878,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"l\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.57783889770508,\\\"token\\\":{\\\"token\\\":\\\"l\\\",\\\"bytes\\\":\\\"bA==\\\",\\\"prob\\\":0.955055832862854,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"l\\\",\\\"bytes\\\":\\\"bA==\\\",\\\"prob\\\":0.955055832862854,\\\"masked\\\":false},{\\\"token\\\":\\\"la\\\",\\\"bytes\\\":\\\"bGE=\\\",\\\"prob\\\":0.01341050025075674,\\\"masked\\\":false},{\\\"token\\\":\\\"al\\\",\\\"bytes\\\":\\\"YWw=\\\",\\\"prob\\\":0.005906084086745977,\\\"masked\\\":false},{\\\"token\\\":\\\"a\\\",\\\"bytes\\\":\\\"YQ==\\\",\\\"prob\\\":0.003542175516486168,\\\"masked\\\":false},{\\\"token\\\":\\\"lh\\\",\\\"bytes\\\":\\\"bGg=\\\",\\\"prob\\\":0.0032541367691010237,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.34585762023926,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.2576845586299896,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.2576845586299896,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.1917182058095932,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.05475110188126564,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.008607196621596813,\\\"masked\\\":false},{\\\"token\\\":\\\" ~/\\\",\\\"bytes\\\":\\\"IH4v\\\",\\\"prob\\\":0.0032283207401633263,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":1.6158819198608398,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":5.866784391628244e-9,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":1.6158819198608398,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.03870103508234024,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":248.72708320617676,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.8751698732376099,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.8751698732376099,\\\"masked\\\":false},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.03541646897792816,\\\"masked\\\":false},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.01073345448821783,\\\"masked\\\":false},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.007500122766941786,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.006618494167923927,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" shows\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.93613052368164,\\\"token\\\":{\\\"token\\\":\\\" shows\\\",\\\"bytes\\\":\\\"IHNob3dz\\\",\\\"prob\\\":0.16858801245689392,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" shows\\\",\\\"bytes\\\":\\\"IHNob3dz\\\",\\\"prob\\\":0.16858801245689392,\\\"masked\\\":false},{\\\"token\\\":\\\" gives\\\",\\\"bytes\\\":\\\"IGdpdmVz\\\",\\\"prob\\\":0.12914805114269257,\\\"masked\\\":false},{\\\"token\\\":\\\" provides\\\",\\\"bytes\\\":\\\"IHByb3ZpZGVz\\\",\\\"prob\\\":0.09557298570871353,\\\"masked\\\":false},{\\\"token\\\":\\\" lists\\\",\\\"bytes\\\":\\\"IGxpc3Rz\\\",\\\"prob\\\":0.09319198131561279,\\\"masked\\\":false},{\\\"token\\\":\\\" displays\\\",\\\"bytes\\\":\\\"IGRpc3BsYXlz\\\",\\\"prob\\\":0.08604083210229874,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":82.76987075805664,\\\"token\\\":{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.44502127170562744,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.44502127170562744,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.15422441065311432,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.13839836418628693,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.06275742501020432,\\\"masked\\\":false},{\\\"token\\\":\\\" detailed\\\",\\\"bytes\\\":\\\"IGRldGFpbGVk\\\",\\\"prob\\\":0.01939016580581665,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.09191131591797,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.3422989845275879,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.3422989845275879,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.22294729948043823,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.06830132007598877,\\\"masked\\\":false},{\\\"token\\\":\\\" what\\\",\\\"bytes\\\":\\\"IHdoYXQ=\\\",\\\"prob\\\":0.04466036334633827,\\\"masked\\\":false},{\\\"token\\\":\\\" exactly\\\",\\\"bytes\\\":\\\"IGV4YWN0bHk=\\\",\\\"prob\\\":0.03223004937171936,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" permissions\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.08893585205078,\\\"token\\\":{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.21989965438842773,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.21989965438842773,\\\"masked\\\":false},{\\\"token\\\":\\\" size\\\",\\\"bytes\\\":\\\"IHNpemU=\\\",\\\"prob\\\":0.1255974918603897,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.10511189699172974,\\\"masked\\\":false},{\\\"token\\\":\\\" details\\\",\\\"bytes\\\":\\\"IGRldGFpbHM=\\\",\\\"prob\\\":0.06951329857110977,\\\"masked\\\":false},{\\\"token\\\":\\\" full\\\",\\\"bytes\\\":\\\"IGZ1bGw=\\\",\\\"prob\\\":0.04865006357431412,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.63713264465332,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.46988317370414734,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.46988317370414734,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.214617520570755,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.09741967916488647,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.07943159341812134,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.058368001133203506,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" owner\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.65925407409668,\\\"token\\\":{\\\"token\\\":\\\" owner\\\",\\\"bytes\\\":\\\"IG93bmVy\\\",\\\"prob\\\":0.3120392858982086,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" owner\\\",\\\"bytes\\\":\\\"IG93bmVy\\\",\\\"prob\\\":0.3120392858982086,\\\"masked\\\":false},{\\\"token\\\":\\\" ownership\\\",\\\"bytes\\\":\\\"IG93bmVyc2hpcA==\\\",\\\"prob\\\":0.190913587808609,\\\"masked\\\":false},{\\\"token\\\":\\\" size\\\",\\\"bytes\\\":\\\"IHNpemU=\\\",\\\"prob\\\":0.10337629169225693,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.07200054824352264,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.036365121603012085,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.38824462890625,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9121604561805725,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9121604561805725,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.06884057819843292,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.003696305910125375,\\\"masked\\\":false},{\\\"token\\\":\\\"/group\\\",\\\"bytes\\\":\\\"L2dyb3Vw\\\",\\\"prob\\\":0.002161850454285741,\\\"masked\\\":false},{\\\"token\\\":\\\" name\\\",\\\"bytes\\\":\\\"IG5hbWU=\\\",\\\"prob\\\":0.0020368369296193123,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" group\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.3209171295166,\\\"token\\\":{\\\"token\\\":\\\" group\\\",\\\"bytes\\\":\\\"IGdyb3Vw\\\",\\\"prob\\\":0.49393409490585327,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" group\\\",\\\"bytes\\\":\\\"IGdyb3Vw\\\",\\\"prob\\\":0.49393409490585327,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.29038214683532715,\\\"masked\\\":false},{\\\"token\\\":\\\" size\\\",\\\"bytes\\\":\\\"IHNpemU=\\\",\\\"prob\\\":0.11457307636737823,\\\"masked\\\":false},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.01996305026113987,\\\"masked\\\":false},{\\\"token\\\":\\\" etc\\\",\\\"bytes\\\":\\\"IGV0Yw==\\\",\\\"prob\\\":0.011258200742304325,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.04110717773438,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8322581052780151,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8322581052780151,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.13122276961803436,\\\"masked\\\":false},{\\\"token\\\":\\\" owner\\\",\\\"bytes\\\":\\\"IG93bmVy\\\",\\\"prob\\\":0.0067885019816458225,\\\"masked\\\":false},{\\\"token\\\":\\\" ownership\\\",\\\"bytes\\\":\\\"IG93bmVyc2hpcA==\\\",\\\"prob\\\":0.005433459300547838,\\\"masked\\\":false},{\\\"token\\\":\\\" name\\\",\\\"bytes\\\":\\\"IG5hbWU=\\\",\\\"prob\\\":0.005375947803258896,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" size\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.85893440246582,\\\"token\\\":{\\\"token\\\":\\\" size\\\",\\\"bytes\\\":\\\"IHNpemU=\\\",\\\"prob\\\":0.39940425753593445,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" size\\\",\\\"bytes\\\":\\\"IHNpemU=\\\",\\\"prob\\\":0.39940425753593445,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.3904520869255066,\\\"masked\\\":false},{\\\"token\\\":\\\" etc\\\",\\\"bytes\\\":\\\"IGV0Yw==\\\",\\\"prob\\\":0.02632186748087406,\\\"masked\\\":false},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.02346108667552471,\\\"masked\\\":false},{\\\"token\\\":\\\" number\\\",\\\"bytes\\\":\\\"IG51bWJlcg==\\\",\\\"prob\\\":0.021086694672703743,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.14808464050293,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8296368718147278,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8296368718147278,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.14382952451705933,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.014361453242599964,\\\"masked\\\":false},{\\\"token\\\":\\\" etc\\\",\\\"bytes\\\":\\\"IGV0Yw==\\\",\\\"prob\\\":0.0052371216006577015,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0022374584805220366,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.19503211975098,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5416485667228699,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5416485667228699,\\\"masked\\\":false},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.1766381710767746,\\\"masked\\\":false},{\\\"token\\\":\\\" modification\\\",\\\"bytes\\\":\\\"IG1vZGlmaWNhdGlvbg==\\\",\\\"prob\\\":0.07152076065540314,\\\"masked\\\":false},{\\\"token\\\":\\\" etc\\\",\\\"bytes\\\":\\\"IGV0Yw==\\\",\\\"prob\\\":0.033511389046907425,\\\"masked\\\":false},{\\\"token\\\":\\\" last\\\",\\\"bytes\\\":\\\"IGxhc3Q=\\\",\\\"prob\\\":0.029758043587207794,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" modification\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.53389739990234,\\\"token\\\":{\\\"token\\\":\\\" modification\\\",\\\"bytes\\\":\\\"IG1vZGlmaWNhdGlvbg==\\\",\\\"prob\\\":0.29289814829826355,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" modification\\\",\\\"bytes\\\":\\\"IG1vZGlmaWNhdGlvbg==\\\",\\\"prob\\\":0.29289814829826355,\\\"masked\\\":false},{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.23483014106750488,\\\"masked\\\":false},{\\\"token\\\":\\\" last\\\",\\\"bytes\\\":\\\"IGxhc3Q=\\\",\\\"prob\\\":0.14531821012496948,\\\"masked\\\":false},{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.08814667165279388,\\\"masked\\\":false},{\\\"token\\\":\\\" other\\\",\\\"bytes\\\":\\\"IG90aGVy\\\",\\\"prob\\\":0.038026560097932816,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" date\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.26217269897461,\\\"token\\\":{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.7260234951972961,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" date\\\",\\\"bytes\\\":\\\"IGRhdGU=\\\",\\\"prob\\\":0.7260234951972961,\\\"masked\\\":false},{\\\"token\\\":\\\" time\\\",\\\"bytes\\\":\\\"IHRpbWU=\\\",\\\"prob\\\":0.24128110706806183,\\\"masked\\\":false},{\\\"token\\\":\\\" dates\\\",\\\"bytes\\\":\\\"IGRhdGVz\\\",\\\"prob\\\":0.00842307135462761,\\\"masked\\\":false},{\\\"token\\\":\\\" timestamp\\\",\\\"bytes\\\":\\\"IHRpbWVzdGFtcA==\\\",\\\"prob\\\":0.006786005105823278,\\\"masked\\\":false},{\\\"token\\\":\\\" times\\\",\\\"bytes\\\":\\\"IHRpbWVz\\\",\\\"prob\\\":0.004576732404530048,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.02184677124023,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.5932804346084595,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.5932804346084595,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3064495623111725,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.02741912007331848,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.014840025454759598,\\\"masked\\\":false},{\\\"token\\\":\\\"/time\\\",\\\"bytes\\\":\\\"L3RpbWU=\\\",\\\"prob\\\":0.013394806534051895,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" each\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.36080551147461,\\\"token\\\":{\\\"token\\\":\\\" each\\\",\\\"bytes\\\":\\\"IGVhY2g=\\\",\\\"prob\\\":0.4218413829803467,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" each\\\",\\\"bytes\\\":\\\"IGVhY2g=\\\",\\\"prob\\\":0.4218413829803467,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.14609652757644653,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.1323595643043518,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.11248712241649628,\\\"masked\\\":false},{\\\"token\\\":\\\" every\\\",\\\"bytes\\\":\\\"IGV2ZXJ5\\\",\\\"prob\\\":0.09423834830522537,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.1439380645752,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9522548317909241,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9522548317909241,\\\"masked\\\":false},{\\\"token\\\":\\\" item\\\",\\\"bytes\\\":\\\"IGl0ZW0=\\\",\\\"prob\\\":0.028263552114367485,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.006459638010710478,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.0037318048998713493,\\\"masked\\\":false},{\\\"token\\\":\\\" entry\\\",\\\"bytes\\\":\\\"IGVudHJ5\\\",\\\"prob\\\":0.002032037591561675,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.46606254577637,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.49810102581977844,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.49810102581977844,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.13226057589054108,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.11026004701852798,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.09193737059831619,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.043043848127126694,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.72109794616699,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.560950517654419,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.560950517654419,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.36814072728157043,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.05789631977677345,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.0038294054102152586,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0010592417092993855,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.24495506286621,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9243941307067871,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9243941307067871,\\\"masked\\\":false},{\\\"token\\\":\\\" given\\\",\\\"bytes\\\":\\\"IGdpdmVu\\\",\\\"prob\\\":0.022606581449508667,\\\"masked\\\":false},{\\\"token\\\":\\\" folder\\\",\\\"bytes\\\":\\\"IGZvbGRlcg==\\\",\\\"prob\\\":0.021451013162732124,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.006517019588500261,\\\"masked\\\":false},{\\\"token\\\":\\\" specified\\\",\\\"bytes\\\":\\\"IHNwZWNpZmllZA==\\\",\\\"prob\\\":0.003563778707757592,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.37115097045898,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.525035560131073,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.525035560131073,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.2003355473279953,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.08687365055084229,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.013690043240785599,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.012524458579719067,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" It\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.20401954650879,\\\"token\\\":{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.1014837995171547,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.1014837995171547,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.05730385333299637,\\\"masked\\\":false},{\\\"token\\\":\\\" Another\\\",\\\"bytes\\\":\\\"IEFub3RoZXI=\\\",\\\"prob\\\":0.04614393413066864,\\\"masked\\\":false},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.03880894556641579,\\\"masked\\\":false},{\\\"token\\\":\\\" Other\\\",\\\"bytes\\\":\\\"IE90aGVy\\\",\\\"prob\\\":0.035678837448358536,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"'s\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.57316398620605,\\\"token\\\":{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.5082178115844727,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.5082178115844727,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.19002017378807068,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.12100415676832199,\\\"masked\\\":false},{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.10335415601730347,\\\"masked\\\":false},{\\\"token\\\":\\\"’s\\\",\\\"bytes\\\":\\\"4oCZcw==\\\",\\\"prob\\\":0.017838142812252045,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" also\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.28689575195312,\\\"token\\\":{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.31813427805900574,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.31813427805900574,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.29653826355934143,\\\"masked\\\":false},{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.04079893231391907,\\\"masked\\\":false},{\\\"token\\\":\\\" one\\\",\\\"bytes\\\":\\\"IG9uZQ==\\\",\\\"prob\\\":0.027433665469288826,\\\"masked\\\":false},{\\\"token\\\":\\\" like\\\",\\\"bytes\\\":\\\"IGxpa2U=\\\",\\\"prob\\\":0.02716338261961937,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" useful\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.34881210327148,\\\"token\\\":{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.1645701676607132,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.1645701676607132,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.14685606956481934,\\\"masked\\\":false},{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.1300497055053711,\\\"masked\\\":false},{\\\"token\\\":\\\" important\\\",\\\"bytes\\\":\\\"IGltcG9ydGFudA==\\\",\\\"prob\\\":0.05727977305650711,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.04607846960425377,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.75712966918945,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.6444534659385681,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.6444534659385681,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.18118487298488617,\\\"masked\\\":false},{\\\"token\\\":\\\" when\\\",\\\"bytes\\\":\\\"IHdoZW4=\\\",\\\"prob\\\":0.08551958948373795,\\\"masked\\\":false},{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.031122850254178047,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.026315009221434593,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" navigating\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.6881332397461,\\\"token\\\":{\\\"token\\\":\\\" navigating\\\",\\\"bytes\\\":\\\"IG5hdmlnYXRpbmc=\\\",\\\"prob\\\":0.2079685777425766,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" navigating\\\",\\\"bytes\\\":\\\"IG5hdmlnYXRpbmc=\\\",\\\"prob\\\":0.2079685777425766,\\\"masked\\\":false},{\\\"token\\\":\\\" finding\\\",\\\"bytes\\\":\\\"IGZpbmRpbmc=\\\",\\\"prob\\\":0.16031593084335327,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.10179518908262253,\\\"masked\\\":false},{\\\"token\\\":\\\" viewing\\\",\\\"bytes\\\":\\\"IHZpZXdpbmc=\\\",\\\"prob\\\":0.04972583428025246,\\\"masked\\\":false},{\\\"token\\\":\\\" checking\\\",\\\"bytes\\\":\\\"IGNoZWNraW5n\\\",\\\"prob\\\":0.03472733870148659,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" through\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.09205627441406,\\\"token\\\":{\\\"token\\\":\\\" through\\\",\\\"bytes\\\":\\\"IHRocm91Z2g=\\\",\\\"prob\\\":0.33224284648895264,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" through\\\",\\\"bytes\\\":\\\"IHRocm91Z2g=\\\",\\\"prob\\\":0.33224284648895264,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.2196020483970642,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.13779903948307037,\\\"masked\\\":false},{\\\"token\\\":\\\" around\\\",\\\"bytes\\\":\\\"IGFyb3VuZA==\\\",\\\"prob\\\":0.06794654577970505,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.05273053050041199,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.11611557006836,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.6096548438072205,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.6096548438072205,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.12504218518733978,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.08537746965885162,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.06969182938337326,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.030837563797831535,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.72098350524902,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.34130287170410156,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.34130287170410156,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.21929168701171875,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.12432839721441269,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.09997348487377167,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.026023443788290024,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" finding\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.0289478302002,\\\"token\\\":{\\\"token\\\":\\\" finding\\\",\\\"bytes\\\":\\\"IGZpbmRpbmc=\\\",\\\"prob\\\":0.2626480758190155,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" finding\\\",\\\"bytes\\\":\\\"IGZpbmRpbmc=\\\",\\\"prob\\\":0.2626480758190155,\\\"masked\\\":false},{\\\"token\\\":\\\" viewing\\\",\\\"bytes\\\":\\\"IHZpZXdpbmc=\\\",\\\"prob\\\":0.1583990901708603,\\\"masked\\\":false},{\\\"token\\\":\\\" seeing\\\",\\\"bytes\\\":\\\"IHNlZWluZw==\\\",\\\"prob\\\":0.09929979592561722,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.08795125782489777,\\\"masked\\\":false},{\\\"token\\\":\\\" sub\\\",\\\"bytes\\\":\\\"IHN1Yg==\\\",\\\"prob\\\":0.06256252527236938,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.69384574890137,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.6080948710441589,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.6080948710441589,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.18457165360450745,\\\"masked\\\":false},{\\\"token\\\":\\\" hidden\\\",\\\"bytes\\\":\\\"IGhpZGRlbg==\\\",\\\"prob\\\":0.06057608127593994,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.041677944362163544,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.01841091923415661,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.66600227355957,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.44845202565193176,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.44845202565193176,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.1639883667230606,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.11403143405914307,\\\"masked\\\":false},{\\\"token\\\":\\\" by\\\",\\\"bytes\\\":\\\"IGJ5\\\",\\\"prob\\\":0.029021956026554108,\\\"masked\\\":false},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.025699278339743614,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.29223442077637,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.09248658269643784,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.09248658269643784,\\\"masked\\\":false},{\\\"token\\\":\\\" Another\\\",\\\"bytes\\\":\\\"IEFub3RoZXI=\\\",\\\"prob\\\":0.07640865445137024,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.06860000640153885,\\\"masked\\\":false},{\\\"token\\\":\\\" Other\\\",\\\"bytes\\\":\\\"IE90aGVy\\\",\\\"prob\\\":0.05746917426586151,\\\"masked\\\":false},{\\\"token\\\":\\\" What\\\",\\\"bytes\\\":\\\"IFdoYXQ=\\\",\\\"prob\\\":0.023205166682600975,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.63596153259277,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.3287959694862366,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.3287959694862366,\\\"masked\\\":false},{\\\"token\\\":\\\" other\\\",\\\"bytes\\\":\\\"IG90aGVy\\\",\\\"prob\\\":0.31991690397262573,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.12865230441093445,\\\"masked\\\":false},{\\\"token\\\":\\\" others\\\",\\\"bytes\\\":\\\"IG90aGVycw==\\\",\\\"prob\\\":0.0326700396835804,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.029308926314115524,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.97297096252441,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.25324636697769165,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.25324636697769165,\\\"masked\\\":false},{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.2484106719493866,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.23535877466201782,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.08519335091114044,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.02800150215625763,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.19305229187012,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9968281388282776,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9968281388282776,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.0019075466552749276,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.000465474120574072,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00022104717209003866,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":0.00008950656047090888,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.28770446777344,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9960242509841919,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9960242509841919,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.001856111572124064,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.001010215375572443,\\\"masked\\\":false},{\\\"token\\\":\\\" function\\\",\\\"bytes\\\":\\\"IGZ1bmN0aW9u\\\",\\\"prob\\\":0.00023362826323136687,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.00010018142347689718,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.01683044433594,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.8043103814125061,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.8043103814125061,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.13305217027664185,\\\"masked\\\":false},{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.01905367150902748,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.015549225732684135,\\\"masked\\\":false},{\\\"token\\\":\\\" searches\\\",\\\"bytes\\\":\\\"IHNlYXJjaGVz\\\",\\\"prob\\\":0.009498038329184055,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" also\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.52006912231445,\\\"token\\\":{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.43135973811149597,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.43135973811149597,\\\"masked\\\":false},{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.12554241716861725,\\\"masked\\\":false},{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.12437218427658081,\\\"masked\\\":false},{\\\"token\\\":\\\" another\\\",\\\"bytes\\\":\\\"IGFub3RoZXI=\\\",\\\"prob\\\":0.08394282311201096,\\\"masked\\\":false},{\\\"token\\\":\\\" often\\\",\\\"bytes\\\":\\\"IG9mdGVu\\\",\\\"prob\\\":0.05072014033794403,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" very\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.59183311462402,\\\"token\\\":{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.4224169850349426,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.4224169850349426,\\\"masked\\\":false},{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.14285868406295776,\\\"masked\\\":false},{\\\"token\\\":\\\" commonly\\\",\\\"bytes\\\":\\\"IGNvbW1vbmx5\\\",\\\"prob\\\":0.08539598435163498,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.07240720093250275,\\\"masked\\\":false},{\\\"token\\\":\\\" quite\\\",\\\"bytes\\\":\\\"IHF1aXRl\\\",\\\"prob\\\":0.06594084203243256,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" useful\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.16992568969727,\\\"token\\\":{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.725367546081543,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.725367546081543,\\\"masked\\\":false},{\\\"token\\\":\\\" powerful\\\",\\\"bytes\\\":\\\"IHBvd2VyZnVs\\\",\\\"prob\\\":0.12905541062355042,\\\"masked\\\":false},{\\\"token\\\":\\\" helpful\\\",\\\"bytes\\\":\\\"IGhlbHBmdWw=\\\",\\\"prob\\\":0.0402287133038044,\\\"masked\\\":false},{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.03349650651216507,\\\"masked\\\":false},{\\\"token\\\":\\\" handy\\\",\\\"bytes\\\":\\\"IGhhbmR5\\\",\\\"prob\\\":0.01447464618831873,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.05989074707031,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.8289775848388672,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.8289775848388672,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.10448019206523895,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.015560073778033257,\\\"masked\\\":false},{\\\"token\\\":\\\" when\\\",\\\"bytes\\\":\\\"IHdoZW4=\\\",\\\"prob\\\":0.012806962244212627,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.011679012328386307,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" searching\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.16387176513672,\\\"token\\\":{\\\"token\\\":\\\" searching\\\",\\\"bytes\\\":\\\"IHNlYXJjaGluZw==\\\",\\\"prob\\\":0.8669533729553223,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" searching\\\",\\\"bytes\\\":\\\"IHNlYXJjaGluZw==\\\",\\\"prob\\\":0.8669533729553223,\\\"masked\\\":false},{\\\"token\\\":\\\" finding\\\",\\\"bytes\\\":\\\"IGZpbmRpbmc=\\\",\\\"prob\\\":0.060128290206193924,\\\"masked\\\":false},{\\\"token\\\":\\\" filtering\\\",\\\"bytes\\\":\\\"IGZpbHRlcmluZw==\\\",\\\"prob\\\":0.036212701350450516,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.009142149239778519,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.008810199797153473,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.96073913574219,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3307645916938782,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3307645916938782,\\\"masked\\\":false},{\\\"token\\\":\\\" through\\\",\\\"bytes\\\":\\\"IHRocm91Z2g=\\\",\\\"prob\\\":0.29714539647102356,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.25217103958129883,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.04912777245044708,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.019914716482162476,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" specific\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.88973236083984,\\\"token\\\":{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.7265024781227112,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.7265024781227112,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.15624158084392548,\\\"masked\\\":false},{\\\"token\\\":\\\" patterns\\\",\\\"bytes\\\":\\\"IHBhdHRlcm5z\\\",\\\"prob\\\":0.029326364398002625,\\\"masked\\\":false},{\\\"token\\\":\\\" strings\\\",\\\"bytes\\\":\\\"IHN0cmluZ3M=\\\",\\\"prob\\\":0.023157861083745956,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.02108502946794033,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" text\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.46706771850586,\\\"token\\\":{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.6283808350563049,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.6283808350563049,\\\"masked\\\":false},{\\\"token\\\":\\\" strings\\\",\\\"bytes\\\":\\\"IHN0cmluZ3M=\\\",\\\"prob\\\":0.15246720612049103,\\\"masked\\\":false},{\\\"token\\\":\\\" patterns\\\",\\\"bytes\\\":\\\"IHBhdHRlcm5z\\\",\\\"prob\\\":0.08210223913192749,\\\"masked\\\":false},{\\\"token\\\":\\\" keywords\\\",\\\"bytes\\\":\\\"IGtleXdvcmRz\\\",\\\"prob\\\":0.049364123493433,\\\"masked\\\":false},{\\\"token\\\":\\\" words\\\",\\\"bytes\\\":\\\"IHdvcmRz\\\",\\\"prob\\\":0.03764001280069351,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" within\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.80507278442383,\\\"token\\\":{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.564777135848999,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.564777135848999,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.3309386372566223,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.03624236211180687,\\\"masked\\\":false},{\\\"token\\\":\\\" patterns\\\",\\\"bytes\\\":\\\"IHBhdHRlcm5z\\\",\\\"prob\\\":0.03265518322587013,\\\"masked\\\":false},{\\\"token\\\":\\\" strings\\\",\\\"bytes\\\":\\\"IHN0cmluZ3M=\\\",\\\"prob\\\":0.01172586902976036,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.04401969909668,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.7161903977394104,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.7161903977394104,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.22723081707954407,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.02388189360499382,\\\"masked\\\":false},{\\\"token\\\":\\\" large\\\",\\\"bytes\\\":\\\"IGxhcmdl\\\",\\\"prob\\\":0.014662304893136024,\\\"masked\\\":false},{\\\"token\\\":\\\" larger\\\",\\\"bytes\\\":\\\"IGxhcmdlcg==\\\",\\\"prob\\\":0.004654472228139639,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.63901901245117,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.5938295125961304,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.5938295125961304,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.168006032705307,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.0827847570180893,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.04967367276549339,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.022287165746092796,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.07796859741211,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.1529379040002823,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.1529379040002823,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.10240521281957626,\\\"masked\\\":false},{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.0355248786509037,\\\"masked\\\":false},{\\\"token\\\":\\\" Finally\\\",\\\"bytes\\\":\\\"IEZpbmFsbHk=\\\",\\\"prob\\\":0.028886698186397552,\\\"masked\\\":false},{\\\"token\\\":\\\" Overall\\\",\\\"bytes\\\":\\\"IE92ZXJhbGw=\\\",\\\"prob\\\":0.027656566351652145,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.46096229553223,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7091163992881775,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7091163992881775,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.16648097336292267,\\\"masked\\\":false},{\\\"token\\\":\\\" other\\\",\\\"bytes\\\":\\\"IG90aGVy\\\",\\\"prob\\\":0.023831963539123535,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.018516365438699722,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.017687827348709106,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"title\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.17801094055176,\\\"token\\\":{\\\"token\\\":\\\"title\\\",\\\"bytes\\\":\\\"dGl0bGU=\\\",\\\"prob\\\":0.3153519034385681,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"title\\\",\\\"bytes\\\":\\\"dGl0bGU=\\\",\\\"prob\\\":0.3153519034385681,\\\"masked\\\":false},{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.14951391518115997,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.1348428875207901,\\\"masked\\\":false},{\\\"token\\\":\\\"use\\\",\\\"bytes\\\":\\\"dXNl\\\",\\\"prob\\\":0.11942955106496811,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.10049805045127869,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Configuration\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.29287719726562,\\\"token\\\":{\\\"token\\\":\\\" Configuration\\\",\\\"bytes\\\":\\\"IENvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.8088334798812866,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Configuration\\\",\\\"bytes\\\":\\\"IENvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.8088334798812866,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.1790471225976944,\\\"masked\\\":false},{\\\"token\\\":\\\" configuration\\\",\\\"bytes\\\":\\\"IGNvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.002525409683585167,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.0012905591866001487,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.0007544799009338021,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.21777534484863,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9960452914237976,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9960452914237976,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.0009599838522262871,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00029526904108934104,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.00019178082584403455,\\\"masked\\\":false},{\\\"token\\\":\\\"?\\\\\\\"\\\",\\\"bytes\\\":\\\"PyI=\\\",\\\"prob\\\":0.0001766198402037844,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.64199447631836,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.8617356419563293,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.8617356419563293,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.036301638931035995,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.02931688167154789,\\\"masked\\\":false},{\\\"token\\\":\\\" might\\\",\\\"bytes\\\":\\\"IG1pZ2h0\\\",\\\"prob\\\":0.011529042385518551,\\\"masked\\\":false},{\\\"token\\\":\\\" line\\\",\\\"bytes\\\":\\\"IGxpbmU=\\\",\\\"prob\\\":0.00915061216801405,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.97897338867188,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.640285074710846,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.640285074710846,\\\"masked\\\":false},{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.054246027022600174,\\\"masked\\\":false},{\\\"token\\\":\\\" might\\\",\\\"bytes\\\":\\\"IG1pZ2h0\\\",\\\"prob\\\":0.053424376994371414,\\\"masked\\\":false},{\\\"token\\\":\\\" seems\\\",\\\"bytes\\\":\\\"IHNlZW1z\\\",\\\"prob\\\":0.037388961762189865,\\\"masked\\\":false},{\\\"token\\\":\\\" doesn\\\",\\\"bytes\\\":\\\"IGRvZXNu\\\",\\\"prob\\\":0.03514297679066658,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" not\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.95415687561035,\\\"token\\\":{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.42388132214546204,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.42388132214546204,\\\"masked\\\":false},{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.17340070009231567,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.08532814681529999,\\\"masked\\\":false},{\\\"token\\\":\\\" likely\\\",\\\"bytes\\\":\\\"IGxpa2VseQ==\\\",\\\"prob\\\":0.04449833929538727,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.03586716577410698,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.50308990478516,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.769838273525238,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.769838273525238,\\\"masked\\\":false},{\\\"token\\\":\\\" recognized\\\",\\\"bytes\\\":\\\"IHJlY29nbml6ZWQ=\\\",\\\"prob\\\":0.026330359280109406,\\\"masked\\\":false},{\\\"token\\\":\\\" clear\\\",\\\"bytes\\\":\\\"IGNsZWFy\\\",\\\"prob\\\":0.019260359928011894,\\\"masked\\\":false},{\\\"token\\\":\\\" valid\\\",\\\"bytes\\\":\\\"IHZhbGlk\\\",\\\"prob\\\":0.016342781484127045,\\\"masked\\\":false},{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.015582558698952198,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" standard\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.230224609375,\\\"token\\\":{\\\"token\\\":\\\" standard\\\",\\\"bytes\\\":\\\"IHN0YW5kYXJk\\\",\\\"prob\\\":0.3560914099216461,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" standard\\\",\\\"bytes\\\":\\\"IHN0YW5kYXJk\\\",\\\"prob\\\":0.3560914099216461,\\\"masked\\\":false},{\\\"token\\\":\\\" valid\\\",\\\"bytes\\\":\\\"IHZhbGlk\\\",\\\"prob\\\":0.20524455606937408,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.08498598635196686,\\\"masked\\\":false},{\\\"token\\\":\\\" recognized\\\",\\\"bytes\\\":\\\"IHJlY29nbml6ZWQ=\\\",\\\"prob\\\":0.08454816043376923,\\\"masked\\\":false},{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.07998143136501312,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.63119316101074,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.4993828535079956,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.4993828535079956,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.4392218291759491,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.025593049824237823,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.015278839506208897,\\\"masked\\\":false},{\\\"token\\\":\\\" linux\\\",\\\"bytes\\\":\\\"IGxpbnV4\\\",\\\"prob\\\":0.003487354377284646,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.00303268432617,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9952576756477356,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9952576756477356,\\\"masked\\\":false},{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.000999772921204567,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0008074154611676931,\\\"masked\\\":false},{\\\"token\\\":\\\" shell\\\",\\\"bytes\\\":\\\"IHNoZWxs\\\",\\\"prob\\\":0.0005906704463995993,\\\"masked\\\":false},{\\\"token\\\":\\\" operation\\\",\\\"bytes\\\":\\\"IG9wZXJhdGlvbg==\\\",\\\"prob\\\":0.00036226233351044357,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.86495780944824,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.5813846588134766,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.5813846588134766,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.2784384489059448,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.07821844518184662,\\\"masked\\\":false},{\\\"token\\\":\\\" but\\\",\\\"bytes\\\":\\\"IGJ1dA==\\\",\\\"prob\\\":0.020595822483301163,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.009175040759146214,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" but\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.04567909240723,\\\"token\\\":{\\\"token\\\":\\\" but\\\",\\\"bytes\\\":\\\"IGJ1dA==\\\",\\\"prob\\\":0.5547890067100525,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" but\\\",\\\"bytes\\\":\\\"IGJ1dA==\\\",\\\"prob\\\":0.5547890067100525,\\\"masked\\\":false},{\\\"token\\\":\\\" so\\\",\\\"bytes\\\":\\\"IHNv\\\",\\\"prob\\\":0.2670765817165375,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.11998061835765839,\\\"masked\\\":false},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.03233499452471733,\\\"masked\\\":false},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.010563576593995094,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":80.13701438903809,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.7335478663444519,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.7335478663444519,\\\"masked\\\":false},{\\\"token\\\":\\\" rather\\\",\\\"bytes\\\":\\\"IHJhdGhlcg==\\\",\\\"prob\\\":0.04733113572001457,\\\"masked\\\":false},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.0469697006046772,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.04578758031129837,\\\"masked\\\":false},{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.02951226197183132,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" may\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.70508193969727,\\\"token\\\":{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.2903074026107788,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.2903074026107788,\\\"masked\\\":false},{\\\"token\\\":\\\" might\\\",\\\"bytes\\\":\\\"IG1pZ2h0\\\",\\\"prob\\\":0.2732131779193878,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.2059035450220108,\\\"masked\\\":false},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.0925617441534996,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.057345978915691376,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" be\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.23301315307617,\\\"token\\\":{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.8142914175987244,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.8142914175987244,\\\"masked\\\":false},{\\\"token\\\":\\\" refer\\\",\\\"bytes\\\":\\\"IHJlZmVy\\\",\\\"prob\\\":0.16575771570205688,\\\"masked\\\":false},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.006129004061222076,\\\"masked\\\":false},{\\\"token\\\":\\\" indicate\\\",\\\"bytes\\\":\\\"IGluZGljYXRl\\\",\\\"prob\\\":0.0028732093051075935,\\\"masked\\\":false},{\\\"token\\\":\\\" mean\\\",\\\"bytes\\\":\\\"IG1lYW4=\\\",\\\"prob\\\":0.0025781821459531784,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.59979438781738,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.4281105697154999,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.4281105697154999,\\\"masked\\\":false},{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.2994570732116699,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.12794794142246246,\\\"masked\\\":false},{\\\"token\\\":\\\" related\\\",\\\"bytes\\\":\\\"IHJlbGF0ZWQ=\\\",\\\"prob\\\":0.05612600967288017,\\\"masked\\\":false},{\\\"token\\\":\\\" part\\\",\\\"bytes\\\":\\\"IHBhcnQ=\\\",\\\"prob\\\":0.01404694002121687,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" custom\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.6009349822998,\\\"token\\\":{\\\"token\\\":\\\" custom\\\",\\\"bytes\\\":\\\"IGN1c3RvbQ==\\\",\\\"prob\\\":0.5669883489608765,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" custom\\\",\\\"bytes\\\":\\\"IGN1c3RvbQ==\\\",\\\"prob\\\":0.5669883489608765,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.0986805111169815,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.07900820672512054,\\\"masked\\\":false},{\\\"token\\\":\\\" way\\\",\\\"bytes\\\":\\\"IHdheQ==\\\",\\\"prob\\\":0.028139987960457802,\\\"masked\\\":false},{\\\"token\\\":\\\" function\\\",\\\"bytes\\\":\\\"IGZ1bmN0aW9u\\\",\\\"prob\\\":0.02029462344944477,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.80903244018555,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.8222404718399048,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.8222404718399048,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.09099284559488297,\\\"masked\\\":false},{\\\"token\\\":\\\" configuration\\\",\\\"bytes\\\":\\\"IGNvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.024051865562796593,\\\"masked\\\":false},{\\\"token\\\":\\\" one\\\",\\\"bytes\\\":\\\"IG9uZQ==\\\",\\\"prob\\\":0.01313702017068863,\\\"masked\\\":false},{\\\"token\\\":\\\" function\\\",\\\"bytes\\\":\\\"IGZ1bmN0aW9u\\\",\\\"prob\\\":0.012887449935078621,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.1690444946289,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.28184008598327637,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.28184008598327637,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.22700762748718262,\\\"masked\\\":false},{\\\"token\\\":\\\" created\\\",\\\"bytes\\\":\\\"IGNyZWF0ZWQ=\\\",\\\"prob\\\":0.13896429538726807,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.12868383526802063,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.04123201593756676,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" by\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.1761245727539,\\\"token\\\":{\\\"token\\\":\\\" by\\\",\\\"bytes\\\":\\\"IGJ5\\\",\\\"prob\\\":0.4931357502937317,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" by\\\",\\\"bytes\\\":\\\"IGJ5\\\",\\\"prob\\\":0.4931357502937317,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.21605271100997925,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.11461414396762848,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.09136651456356049,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.06576278060674667,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.73619079589844,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.677717387676239,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.677717387676239,\\\"masked\\\":false},{\\\"token\\\":\\\" some\\\",\\\"bytes\\\":\\\"IHNvbWU=\\\",\\\"prob\\\":0.08503086119890213,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.07415731996297836,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.05146465450525284,\\\"masked\\\":false},{\\\"token\\\":\\\" someone\\\",\\\"bytes\\\":\\\"IHNvbWVvbmU=\\\",\\\"prob\\\":0.024330036714673042,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" specific\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.64500045776367,\\\"token\\\":{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.7740368247032166,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.7740368247032166,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.16915476322174072,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.019584747031331062,\\\"masked\\\":false},{\\\"token\\\":\\\" certain\\\",\\\"bytes\\\":\\\"IGNlcnRhaW4=\\\",\\\"prob\\\":0.010542210191488266,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.005856990348547697,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" application\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.21021842956543,\\\"token\\\":{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.37517690658569336,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.37517690658569336,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.20801478624343872,\\\"masked\\\":false},{\\\"token\\\":\\\" program\\\",\\\"bytes\\\":\\\"IHByb2dyYW0=\\\",\\\"prob\\\":0.17041520774364471,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.07244863361120224,\\\"masked\\\":false},{\\\"token\\\":\\\" software\\\",\\\"bytes\\\":\\\"IHNvZnR3YXJl\\\",\\\"prob\\\":0.0710849016904831,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.71790504455566,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.7364890575408936,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.7364890575408936,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.19759823381900787,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.016473893076181412,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.006343829911202192,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.0042500547133386135,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.53508949279785,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.2552884817123413,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.2552884817123413,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.23143811523914337,\\\"masked\\\":false},{\\\"token\\\":\\\" tool\\\",\\\"bytes\\\":\\\"IHRvb2w=\\\",\\\"prob\\\":0.09819502383470535,\\\"masked\\\":false},{\\\"token\\\":\\\" configuration\\\",\\\"bytes\\\":\\\"IGNvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.07319286465644836,\\\"masked\\\":false},{\\\"token\\\":\\\" program\\\",\\\"bytes\\\":\\\"IHByb2dyYW0=\\\",\\\"prob\\\":0.07067517191171646,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.49307632446289,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6771665811538696,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6771665811538696,\\\"masked\\\":false},{\\\"token\\\":\\\" configuration\\\",\\\"bytes\\\":\\\"IGNvbmZpZ3VyYXRpb24=\\\",\\\"prob\\\":0.1006222665309906,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.04986144229769707,\\\"masked\\\":false},{\\\"token\\\":\\\" administrator\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3I=\\\",\\\"prob\\\":0.04923563078045845,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.00584176741540432,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.37696647644043,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.4040655791759491,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.4040655791759491,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.10325828939676285,\\\"masked\\\":false},{\\\"token\\\":\\\" Finally\\\",\\\"bytes\\\":\\\"IEZpbmFsbHk=\\\",\\\"prob\\\":0.02801971510052681,\\\"masked\\\":false},{\\\"token\\\":\\\" Overall\\\",\\\"bytes\\\":\\\"IE92ZXJhbGw=\\\",\\\"prob\\\":0.02608523704111576,\\\"masked\\\":false},{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.021749848499894142,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.65916061401367,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.3701428771018982,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.3701428771018982,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.31401997804641724,\\\"masked\\\":false},{\\\"token\\\":\\\" other\\\",\\\"bytes\\\":\\\"IG90aGVy\\\",\\\"prob\\\":0.1766899824142456,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.03985004499554634,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.015344614163041115,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"bin\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.17801094055176,\\\"token\\\":{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9997208714485168,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"bin\\\",\\\"bytes\\\":\\\"Ymlu\\\",\\\"prob\\\":0.9997208714485168,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.00009301322279497981,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.000036897818063152954,\\\"masked\\\":false},{\\\"token\\\":\\\"path\\\",\\\"bytes\\\":\\\"cGF0aA==\\\",\\\"prob\\\":0.000033177664590766653,\\\"masked\\\":false},{\\\"token\\\":\\\"sbin\\\",\\\"bytes\\\":\\\"c2Jpbg==\\\",\\\"prob\\\":0.00001634229556657374,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/bash\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.12906265258789,\\\"token\\\":{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.9991462230682373,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/bash\\\",\\\"bytes\\\":\\\"L2Jhc2g=\\\",\\\"prob\\\":0.9991462230682373,\\\"masked\\\":false},{\\\"token\\\":\\\"/sh\\\",\\\"bytes\\\":\\\"L3No\\\",\\\"prob\\\":0.0002938340185210109,\\\"masked\\\":false},{\\\"token\\\":\\\"/b\\\",\\\"bytes\\\":\\\"L2I=\\\",\\\"prob\\\":0.00018913541862275451,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.00016893981955945492,\\\"masked\\\":false},{\\\"token\\\":\\\"/\\\\\\\"\\\",\\\"bytes\\\":\\\"LyI=\\\",\\\"prob\\\":0.00004580876338877715,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" ~/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.54297828674316,\\\"token\\\":{\\\"token\\\":\\\" ~/\\\",\\\"bytes\\\":\\\"IH4v\\\",\\\"prob\\\":0.9466795325279236,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" ~/\\\",\\\"bytes\\\":\\\"IH4v\\\",\\\"prob\\\":0.9466795325279236,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.046777475625276566,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~/\\\",\\\"bytes\\\":\\\"ICJ+Lw==\\\",\\\"prob\\\":0.0014102099230512977,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0011661209864541888,\\\"masked\\\":false},{\\\"token\\\":\\\" ~\\\",\\\"bytes\\\":\\\"IH4=\\\",\\\"prob\\\":0.0010645636357367039,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"shell\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.15879249572754,\\\"token\\\":{\\\"token\\\":\\\"shell\\\",\\\"bytes\\\":\\\"c2hlbGw=\\\",\\\"prob\\\":0.999382495880127,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"shell\\\",\\\"bytes\\\":\\\"c2hlbGw=\\\",\\\"prob\\\":0.999382495880127,\\\"masked\\\":false},{\\\"token\\\":\\\"sh\\\",\\\"bytes\\\":\\\"c2g=\\\",\\\"prob\\\":0.0001227667962666601,\\\"masked\\\":false},{\\\"token\\\":\\\" shell\\\",\\\"bytes\\\":\\\"IHNoZWxs\\\",\\\"prob\\\":0.00009640102507546544,\\\"masked\\\":false},{\\\"token\\\":\\\"script\\\",\\\"bytes\\\":\\\"c2NyaXB0\\\",\\\"prob\\\":0.00004404620995046571,\\\"masked\\\":false},{\\\"token\\\":\\\"Shell\\\",\\\"bytes\\\":\\\"U2hlbGw=\\\",\\\"prob\\\":0.00004127661304664798,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".sh\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.9690113067627,\\\"token\\\":{\\\"token\\\":\\\".sh\\\",\\\"bytes\\\":\\\"LnNo\\\",\\\"prob\\\":0.9996137022972107,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".sh\\\",\\\"bytes\\\":\\\"LnNo\\\",\\\"prob\\\":0.9996137022972107,\\\"masked\\\":false},{\\\"token\\\":\\\"sh\\\",\\\"bytes\\\":\\\"c2g=\\\",\\\"prob\\\":0.00013876169396098703,\\\"masked\\\":false},{\\\"token\\\":\\\"/sh\\\",\\\"bytes\\\":\\\"L3No\\\",\\\"prob\\\":0.0000558038373128511,\\\"masked\\\":false},{\\\"token\\\":\\\".s\\\",\\\"bytes\\\":\\\"LnM=\\\",\\\"prob\\\":0.000042865191062446684,\\\"masked\\\":false},{\\\"token\\\":\\\".script\\\",\\\"bytes\\\":\\\"LnNjcmlwdA==\\\",\\\"prob\\\":0.00003593475048546679,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.12600517272949,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.999586284160614,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.999586284160614,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00021974931587465107,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.0000522879054187797,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.000026866882762988098,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":0.000012345943105174229,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.91517066955566,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9926952123641968,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9926952123641968,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.003805906279012561,\\\"masked\\\":false},{\\\"token\\\":\\\" line\\\",\\\"bytes\\\":\\\"IGxpbmU=\\\",\\\"prob\\\":0.0016278893454000354,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.00034349525230936706,\\\"masked\\\":false},{\\\"token\\\":\\\" syntax\\\",\\\"bytes\\\":\\\"IHN5bnRheA==\\\",\\\"prob\\\":0.00022150496079120785,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.33891296386719,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.8159385323524475,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.8159385323524475,\\\"masked\\\":false},{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.06447207182645798,\\\"masked\\\":false},{\\\"token\\\":\\\" would\\\",\\\"bytes\\\":\\\"IHdvdWxk\\\",\\\"prob\\\":0.015123682096600533,\\\"masked\\\":false},{\\\"token\\\":\\\" runs\\\",\\\"bytes\\\":\\\"IHJ1bnM=\\\",\\\"prob\\\":0.013389335945248604,\\\"masked\\\":false},{\\\"token\\\":\\\" starts\\\",\\\"bytes\\\":\\\"IHN0YXJ0cw==\\\",\\\"prob\\\":0.00951075553894043,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" not\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.80216026306152,\\\"token\\\":{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.26406073570251465,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":0.26406073570251465,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.2565801441669464,\\\"masked\\\":false},{\\\"token\\\":\\\" also\\\",\\\"bytes\\\":\\\"IGFsc28=\\\",\\\"prob\\\":0.16291101276874542,\\\"masked\\\":false},{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.12848617136478424,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.028701746836304665,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.85196876525879,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.9254307746887207,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.9254307746887207,\\\"masked\\\":false},{\\\"token\\\":\\\" standard\\\",\\\"bytes\\\":\\\"IHN0YW5kYXJk\\\",\\\"prob\\\":0.016478292644023895,\\\"masked\\\":false},{\\\"token\\\":\\\" valid\\\",\\\"bytes\\\":\\\"IHZhbGlk\\\",\\\"prob\\\":0.014325903728604317,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.004862193018198013,\\\"masked\\\":false},{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.0035393082071095705,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" standard\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.11091232299805,\\\"token\\\":{\\\"token\\\":\\\" standard\\\",\\\"bytes\\\":\\\"IHN0YW5kYXJk\\\",\\\"prob\\\":0.7718457579612732,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" standard\\\",\\\"bytes\\\":\\\"IHN0YW5kYXJk\\\",\\\"prob\\\":0.7718457579612732,\\\"masked\\\":false},{\\\"token\\\":\\\" valid\\\",\\\"bytes\\\":\\\"IHZhbGlk\\\",\\\"prob\\\":0.07029099762439728,\\\"masked\\\":false},{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.04864273592829704,\\\"masked\\\":false},{\\\"token\\\":\\\" typical\\\",\\\"bytes\\\":\\\"IHR5cGljYWw=\\\",\\\"prob\\\":0.03495514765381813,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.016898885369300842,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.0730037689209,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.8882514834403992,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.8882514834403992,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.09754152595996857,\\\"masked\\\":false},{\\\"token\\\":\\\" way\\\",\\\"bytes\\\":\\\"IHdheQ==\\\",\\\"prob\\\":0.005649198777973652,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0023532616905868053,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.0018587518716230989,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":80.00493049621582,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.999093770980835,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.999093770980835,\\\"masked\\\":false},{\\\"token\\\":\\\" shell\\\",\\\"bytes\\\":\\\"IHNoZWxs\\\",\\\"prob\\\":0.00023017876083031297,\\\"masked\\\":false},{\\\"token\\\":\\\" operation\\\",\\\"bytes\\\":\\\"IG9wZXJhdGlvbg==\\\",\\\"prob\\\":0.00016015917935874313,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00008337698818650097,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.00007829495734767988,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.79495620727539,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8207203149795532,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8207203149795532,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.079569511115551,\\\"masked\\\":false},{\\\"token\\\":\\\" either\\\",\\\"bytes\\\":\\\"IGVpdGhlcg==\\\",\\\"prob\\\":0.06666096299886703,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.018947817385196686,\\\"masked\\\":false},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.00375909055583179,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" but\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.81692123413086,\\\"token\\\":{\\\"token\\\":\\\" but\\\",\\\"bytes\\\":\\\"IGJ1dA==\\\",\\\"prob\\\":0.8797094821929932,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" but\\\",\\\"bytes\\\":\\\"IGJ1dA==\\\",\\\"prob\\\":0.8797094821929932,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.07891739904880524,\\\"masked\\\":false},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.028361726552248,\\\"masked\\\":false},{\\\"token\\\":\\\" so\\\",\\\"bytes\\\":\\\"IHNv\\\",\\\"prob\\\":0.005223087966442108,\\\"masked\\\":false},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.004028398543596268,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":85.64019203186035,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9828509092330933,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9828509092330933,\\\"masked\\\":false},{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.007629721891134977,\\\"masked\\\":false},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.0038265918847173452,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.0015951577806845307,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.0007943493546918035,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" may\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.36785507202148,\\\"token\\\":{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.9183866381645203,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" may\\\",\\\"bytes\\\":\\\"IG1heQ==\\\",\\\"prob\\\":0.9183866381645203,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.040404774248600006,\\\"masked\\\":false},{\\\"token\\\":\\\"'s\\\",\\\"bytes\\\":\\\"J3M=\\\",\\\"prob\\\":0.01091661024838686,\\\"masked\\\":false},{\\\"token\\\":\\\" appears\\\",\\\"bytes\\\":\\\"IGFwcGVhcnM=\\\",\\\"prob\\\":0.005508494097739458,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.005459166597574949,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" be\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.15294647216797,\\\"token\\\":{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.9950994849205017,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" be\\\",\\\"bytes\\\":\\\"IGJl\\\",\\\"prob\\\":0.9950994849205017,\\\"masked\\\":false},{\\\"token\\\":\\\" refer\\\",\\\"bytes\\\":\\\"IHJlZmVy\\\",\\\"prob\\\":0.0008200469892472029,\\\"masked\\\":false},{\\\"token\\\":\\\" run\\\",\\\"bytes\\\":\\\"IHJ1bg==\\\",\\\"prob\\\":0.0006423990125767887,\\\"masked\\\":false},{\\\"token\\\":\\\" start\\\",\\\"bytes\\\":\\\"IHN0YXJ0\\\",\\\"prob\\\":0.0006319824606180191,\\\"masked\\\":false},{\\\"token\\\":\\\" allow\\\",\\\"bytes\\\":\\\"IGFsbG93\\\",\\\"prob\\\":0.0002868961018975824,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.90992546081543,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6571804881095886,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6571804881095886,\\\"masked\\\":false},{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.32558244466781616,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.008952036499977112,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.0013533816672861576,\\\"masked\\\":false},{\\\"token\\\":\\\" using\\\",\\\"bytes\\\":\\\"IHVzaW5n\\\",\\\"prob\\\":0.0010488166008144617,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":1.6937211455569923e-7,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"On\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"On\\\",\\\"bytes\\\":\\\"T24=\\\",\\\"prob\\\":0.0002631755778566003,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.22025166451931,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" scale\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" scale\\\",\\\"bytes\\\":\\\"IHNjYWxl\\\",\\\"prob\\\":0.0002149992506019771,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.677985668182373,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.9970334768295288,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.9404754042625427,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.5312314033508301,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.857507050037384,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"0\\\",\\\"bytes\\\":\\\"MA==\\\",\\\"prob\\\":0.9999603033065796,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9337844848632812,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.00002792515624605585,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" has\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.0029511903412640095,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.4635107219219208,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cool\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.0003562993952073157,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ness\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\"ness\\\",\\\"bytes\\\":\\\"bmVzcw==\\\",\\\"prob\\\":0.24603915214538574,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" factor\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" factor\\\",\\\"bytes\\\":\\\"IGZhY3Rvcg==\\\",\\\"prob\\\":0.5208525061607361,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9659187197685242,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.006658064667135477,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.40929317474365234,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.853617787361145,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"8\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":177.59418487548828,\\\"token\\\":{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":0.29908278584480286,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":0.29908278584480286,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.24630284309387207,\\\"masked\\\":false},{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":0.24393995106220245,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.0649196058511734,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.06143616512417793,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":84.50198173522949,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.3765026032924652,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.3765026032924652,\\\"masked\\\":false},{\\\"token\\\":\\\"0\\\",\\\"bytes\\\":\\\"MA==\\\",\\\"prob\\\":0.0004530138976406306,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.00010537656635278836,\\\"masked\\\":false},{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":0.00003982181442552246,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.000024196171580115333,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":116,\\\"token reduction\\\":15.942028985507244,\\\"avg latency\\\":72.97591195590255,\\\"cpu\\\":[0.9059999999999999,0.8610625000000001,0.8610625000000001,0.8535625,0.8535625],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.28504943847656,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":1570,\\\"backtrackCount\\\":0,\\\"resetCount\\\":22}\"\n      }\n     },\n     \"68498e377ff445dd89de2c354ef84c81\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"761bb5cbb4844899b4363a40501297a3\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":1042,\\\"last_trace_id\\\":500,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_cae62cfa700449c9b8998648b70f1775\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"?\\\\n\\\\n\\\",\\\"bytes\\\":\\\"PwoK\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" JSON\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" JSON\\\",\\\"bytes\\\":\\\"IEpTT04=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" format\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\" format\\\",\\\"bytes\\\":\\\"IGZvcm1hdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"{\\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"{\\\\\\\"\\\",\\\"bytes\\\":\\\"eyI=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"commands\\\",\\\"bytes\\\":\\\"Y29tbWFuZHM=\\\",\\\"prob\\\":0.7671419978141785,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17346654619489396,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.8789330124855042,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" [\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":244.66204643249512,\\\"token\\\":{\\\"token\\\":\\\" [\\\\\\\"\\\",\\\"bytes\\\":\\\"IFsi\\\",\\\"prob\\\":0.08538264781236649,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" [\\\\\\\"\\\",\\\"bytes\\\":\\\"IFsi\\\",\\\"prob\\\":0.08538264781236649,\\\"masked\\\":false},{\\\"token\\\":\\\" [\\\",\\\"bytes\\\":\\\"IFs=\\\",\\\"prob\\\":0.0308656208217144,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.000510257959831506,\\\"masked\\\":false},{\\\"token\\\":\\\" appId\\\",\\\"bytes\\\":\\\"IGFwcElk\\\",\\\"prob\\\":9.086098193278325e-12,\\\"masked\\\":true},{\\\"token\\\":\\\" Clara\\\",\\\"bytes\\\":\\\"IENsYXJh\\\",\\\"prob\\\":1.1039394225142996e-12,\\\"masked\\\":true}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.14894485473633,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7953630089759827,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7953630089759827,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.06898483633995056,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.025814058259129524,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.023678645491600037,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.019643807783722878,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.90795516967773,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.8911498188972473,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.8911498188972473,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.04010646417737007,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.0066874329932034016,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0027744490653276443,\\\"masked\\\":false},{\\\"token\\\":\\\" --\\\",\\\"bytes\\\":\\\"IC0t\\\",\\\"prob\\\":0.00024355255300179124,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.22305107116699,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9969526529312134,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9969526529312134,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.0013371658278629184,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"-\\\",\\\"bytes\\\":\\\"ICIt\\\",\\\"prob\\\":0.00019239427638240159,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00014819487114436924,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00009074170520761982,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.46919250488281,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7571668028831482,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7571668028831482,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.11370014399290085,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.04636682942509651,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.03135410696268082,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.01986994966864586,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.39306449890137,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9988310933113098,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9988310933113098,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0002784611424431205,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\",\\\",\\\"bytes\\\":\\\"ICIs\\\",\\\"prob\\\":0.00011064721184084192,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00006471153028542176,\\\"masked\\\":false},{\\\"token\\\":\\\" ~\\\",\\\"bytes\\\":\\\"IH4=\\\",\\\"prob\\\":0.00006361526175169274,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.47896766662598,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.999039351940155,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.999039351940155,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.0003087192599195987,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00013664757716469467,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00006350388866849244,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~\\\",\\\"bytes\\\":\\\"ICJ+\\\",\\\"prob\\\":0.000038315261917887256,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"pwd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.04211235046387,\\\"token\\\":{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.3458705246448517,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.3458705246448517,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.24471454322338104,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.1418578177690506,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.055903512984514236,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.05456124246120453,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.3491439819336,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9993168115615845,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9993168115615845,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.00003798197940341197,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.000006597496394533664,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\",\\\",\\\"bytes\\\":\\\"ICIs\\\",\\\"prob\\\":0.000005006757419323549,\\\"masked\\\":false},{\\\"token\\\":\\\"”,\\\",\\\"bytes\\\":\\\"4oCdLA==\\\",\\\"prob\\\":0.000003509595899231499,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.09482383728027,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9991939663887024,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9991939663887024,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00022105763491708785,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.0001803005434339866,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00006638290506089106,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.0000374434057448525,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cp\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.11094284057617,\\\"token\\\":{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.23651406168937683,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.23651406168937683,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.16056878864765167,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.12459279596805573,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.12208999693393707,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.10938525944948196,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.00706481933594,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9988704323768616,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.9988704323768616,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.00029128516325727105,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.000186401535756886,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.00015153181448113173,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.00002524947194615379,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.55425643920898,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9987236857414246,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9987236857414246,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00036014567012898624,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00023817528563085943,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00010302712325938046,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"!\\\",\\\"bytes\\\":\\\"ICIh\\\",\\\"prob\\\":0.0000979888645815663,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.95589828491211,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.567275881767273,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.567275881767273,\\\"masked\\\":false},{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.2736138701438904,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.07015802711248398,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.01938181184232235,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.014672244898974895,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"]\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.0450668334961,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"]\\\",\\\"bytes\\\":\\\"Il0=\\\",\\\"prob\\\":0.37402039766311646,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"]\\\",\\\"bytes\\\":\\\"Il0=\\\",\\\"prob\\\":0.37402039766311646,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"],\\\",\\\"bytes\\\":\\\"Il0s\\\",\\\"prob\\\":0.061015594750642776,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.00045263656647875905,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.0002300582709722221,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00010510098218219355,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":1.1034148705846292e-8,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9927330017089844,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"my\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\"my\\\",\\\"bytes\\\":\\\"bXk=\\\",\\\"prob\\\":0.00003106817530351691,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"_favorite\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\"_favorite\\\",\\\"bytes\\\":\\\"X2Zhdm9yaXRl\\\",\\\"prob\\\":0.015018061734735966,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"_command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\"_command\\\",\\\"bytes\\\":\\\"X2NvbW1hbmQ=\\\",\\\"prob\\\":0.6117119193077087,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.8440415064493815,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.973719596862793,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.88289833068848,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9635056853294373,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9635056853294373,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\\\\\\\\\\\\"\\\",\\\"bytes\\\":\\\"ICJcIg==\\\",\\\"prob\\\":0.001945805037394166,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"ICIi\\\",\\\"prob\\\":0.0014128424227237701,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"'\\\",\\\"bytes\\\":\\\"ICIn\\\",\\\"prob\\\":0.0006950219394639134,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"[\\\",\\\"bytes\\\":\\\"ICJb\\\",\\\"prob\\\":0.0006334767676889896,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.21801376342773,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.6361569166183472,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.6361569166183472,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.15828554332256317,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.05554575473070145,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.0498899482190609,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.016893679276108742,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"}\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.51582908630371,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"}\\\",\\\"bytes\\\":\\\"In0=\\\",\\\"prob\\\":0.203566312789917,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"}\\\",\\\"bytes\\\":\\\"In0=\\\",\\\"prob\\\":0.203566312789917,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.08358106017112732,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.01651720702648163,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0005874736816622317,\\\"masked\\\":false},{\\\"token\\\":\\\" --\\\",\\\"bytes\\\":\\\"IC0t\\\",\\\"prob\\\":0.0003071241080760956,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":18,\\\"token reduction\\\":25,\\\"avg latency\\\":64.55066800117493,\\\"cpu\\\":[0.6346875,0.6346875,0.117375,0.6346875,0.6346875],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.400299072265625,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":1042,\\\"backtrackCount\\\":0,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"8bef5972e38f47d4a6a4eca99942c10b\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":244,\\\"last_trace_id\\\":118,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_c65e2b6eb8c347b192c219b8fb7b71c8\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"Name\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\"Name\\\",\\\"bytes\\\":\\\"TmFtZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Mac\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\" Mac\\\",\\\"bytes\\\":\\\"IE1hYw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.0004141302779316902,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.6835963129997253,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.93860789707729,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.00049055420095101,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.12112236022949,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.040810905396938324,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.040810905396938324,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.03932831808924675,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.020542040467262268,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoKCg==\\\",\\\"prob\\\":0.0012980083702132106,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\\\\\",\\\"bytes\\\":\\\"Llw=\\\",\\\"prob\\\":0.0004383120685815811,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.83514404296875,\\\"token\\\":{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.14172448217868805,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.14172448217868805,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.48593330383301,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.2624347507953644,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.2624347507953644,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.19770622253418,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.6338764429092407,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.6338764429092407,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Mac\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.49897384643555,\\\"token\\\":{\\\"token\\\":\\\" Mac\\\",\\\"bytes\\\":\\\"IE1hYw==\\\",\\\"prob\\\":0.6447736024856567,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Mac\\\",\\\"bytes\\\":\\\"IE1hYw==\\\",\\\"prob\\\":0.6447736024856567,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.22789192199707,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.8735114932060242,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.8735114932060242,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.628746032714844,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9936456680297852,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9936456680297852,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.97404861450195,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.9615567922592163,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.9615567922592163,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.10207939147949,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5395633578300476,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5395633578300476,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.09278106689453,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.3589114546775818,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.3589114546775818,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.38102912902832,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.633267879486084,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.633267879486084,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.2662467956543,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9931941032409668,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9931941032409668,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Open\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.79802322387695,\\\"token\\\":{\\\"token\\\":\\\" Open\\\",\\\"bytes\\\":\\\"IE9wZW4=\\\",\\\"prob\\\":0.147721529006958,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Open\\\",\\\"bytes\\\":\\\"IE9wZW4=\\\",\\\"prob\\\":0.147721529006958,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.11607360839844,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5837732553482056,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.5837732553482056,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Opens\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.30411338806152,\\\"token\\\":{\\\"token\\\":\\\" Opens\\\",\\\"bytes\\\":\\\"IE9wZW5z\\\",\\\"prob\\\":0.37122446298599243,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Opens\\\",\\\"bytes\\\":\\\"IE9wZW5z\\\",\\\"prob\\\":0.37122446298599243,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.40307807922363,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.48301514983177185,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.48301514983177185,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.96586990356445,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.8480466604232788,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.8480466604232788,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.77975845336914,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.8255627751350403,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.8255627751350403,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" application\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.86001205444336,\\\"token\\\":{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.4187057912349701,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.4187057912349701,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.991214752197266,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.47064271569252014,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.47064271569252014,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.8040771484375,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9867749214172363,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9867749214172363,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.97390365600586,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998970031738281,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998970031738281,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Save\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.780784606933594,\\\"token\\\":{\\\"token\\\":\\\" Save\\\",\\\"bytes\\\":\\\"IFNhdmU=\\\",\\\"prob\\\":0.500781238079071,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Save\\\",\\\"bytes\\\":\\\"IFNhdmU=\\\",\\\"prob\\\":0.500781238079071,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.14706802368164,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9004374146461487,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9004374146461487,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Saves\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.300132751464844,\\\"token\\\":{\\\"token\\\":\\\" Saves\\\",\\\"bytes\\\":\\\"IFNhdmVz\\\",\\\"prob\\\":0.8787209987640381,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Saves\\\",\\\"bytes\\\":\\\"IFNhdmVz\\\",\\\"prob\\\":0.8787209987640381,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.09709358215332,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.8202661871910095,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.8202661871910095,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.933921813964844,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9636684060096741,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9636684060096741,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.12300872802734,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.5043779015541077,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.5043779015541077,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" application\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.34187698364258,\\\"token\\\":{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.787712037563324,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.787712037563324,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.92424011230469,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.9150196313858032,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.9150196313858032,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.15979766845703,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9997177720069885,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9997177720069885,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.97199630737305,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999911904335022,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999911904335022,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Quit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.89598274230957,\\\"token\\\":{\\\"token\\\":\\\" Quit\\\",\\\"bytes\\\":\\\"IFF1aXQ=\\\",\\\"prob\\\":0.34504103660583496,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Quit\\\",\\\"bytes\\\":\\\"IFF1aXQ=\\\",\\\"prob\\\":0.34504103660583496,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.55218315124512,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9902865886688232,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.9902865886688232,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" C\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.67280197143555,\\\"token\\\":{\\\"token\\\":\\\" C\\\",\\\"bytes\\\":\\\"IEM=\\\",\\\"prob\\\":0.41506385803222656,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" C\\\",\\\"bytes\\\":\\\"IEM=\\\",\\\"prob\\\":0.41506385803222656,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"loses\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.00816345214844,\\\"token\\\":{\\\"token\\\":\\\"loses\\\",\\\"bytes\\\":\\\"bG9zZXM=\\\",\\\"prob\\\":0.9997983574867249,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"loses\\\",\\\"bytes\\\":\\\"bG9zZXM=\\\",\\\"prob\\\":0.9997983574867249,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.8121109008789,\\\"token\\\":{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.6471860408782959,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.6471860408782959,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" application\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.96110153198242,\\\"token\\\":{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.8080595135688782,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.8080595135688782,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.59307670593262,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.8854747414588928,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.8854747414588928,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.96779823303223,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.999818742275238,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.999818742275238,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.01619720458984,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999967098236084,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999967098236084,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" File\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.95299530029297,\\\"token\\\":{\\\"token\\\":\\\" File\\\",\\\"bytes\\\":\\\"IEZpbGU=\\\",\\\"prob\\\":0.09179487824440002,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" File\\\",\\\"bytes\\\":\\\"IEZpbGU=\\\",\\\"prob\\\":0.09179487824440002,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.849853515625,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8474341034889221,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.8474341034889221,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Opens\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.2780532836914,\\\"token\\\":{\\\"token\\\":\\\" Opens\\\",\\\"bytes\\\":\\\"IE9wZW5z\\\",\\\"prob\\\":0.5587999224662781,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Opens\\\",\\\"bytes\\\":\\\"IE9wZW5z\\\",\\\"prob\\\":0.5587999224662781,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.76290321350098,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.575024425983429,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.575024425983429,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.51201438903809,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.6840553283691406,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.6840553283691406,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.98098373413086,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.36290204524993896,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.36290204524993896,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" application\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.73803520202637,\\\"token\\\":{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.7851742506027222,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" application\\\",\\\"bytes\\\":\\\"IGFwcGxpY2F0aW9u\\\",\\\"prob\\\":0.7851742506027222,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.99180603027344,\\\"token\\\":{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.8477158546447754,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.8477158546447754,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.662052154541016,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999442994594574,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999442994594574,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.23101234436035,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999555349349976,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999555349349976,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":52,\\\"token reduction\\\":0,\\\"avg latency\\\":69.21340410525983,\\\"cpu\\\":[0.8565,0.84175,0.84175,0.8428125,0.8428125],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.28875732421875,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":244,\\\"backtrackCount\\\":1,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"974b55d923ef4c119a588cc6bf359abc\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"HTMLStyleModel\",\n      \"state\": {\n       \"description_width\": \"\",\n       \"font_size\": null,\n       \"text_color\": null\n      }\n     },\n     \"9ad4fc9df305416099c51d33932ea001\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"9dd1023208c04f9788666402aa34f6d3\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":2310,\\\"last_trace_id\\\":1064,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_dafab8be3ab947adac038705165a5372\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|user|>\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":906.3990116119385,\\\"token\\\":{\\\"token\\\":\\\"<|user|>\\\",\\\"bytes\\\":\\\"PHx1c2VyfD4=\\\",\\\"prob\\\":4.036623924008609e-9,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.2840782403945923,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.5023394227027893,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.04292185604572296,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.15513648092746735,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.00017437936912756413,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":0.35938483476638794,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.7010188698768616,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.11386630684137344,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.2594137489795685,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.08810386061668396,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.9981071949005127,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.1981688279372,\\\"token\\\":{\\\"token\\\":\\\"?\\\",\\\"bytes\\\":\\\"Pw==\\\",\\\"prob\\\":0.4073123633861542,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"value\\\":\\\"<|end|>\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":169.785737991333,\\\"token\\\":{\\\"token\\\":\\\"<|end|>\\\",\\\"bytes\\\":\\\"PHxlbmR8Pg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|assistant|>\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.94103050231934,\\\"token\\\":{\\\"token\\\":\\\"<|assistant|>\\\",\\\"bytes\\\":\\\"PHxhc3Npc3RhbnR8Pg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.63664817810059,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.63664817810059,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9957869648933411,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.63664817810059,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.007421671412885189,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cp\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.63664817810059,\\\"token\\\":{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.0006091512041166425,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.63664817810059,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.0001705114118522033,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.44519805908203,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.44519805908203,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998856782913208,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.44519805908203,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.99893718957901,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.44519805908203,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.02282724343240261,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":76.44519805908203,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.988923192024231,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.77643203735352,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.77643203735352,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999979734420776,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.77643203735352,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.999921441078186,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.77643203735352,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.05077098682522774,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":77.77643203735352,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9901694655418396,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.62303161621094,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.62303161621094,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999961853027344,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.62303161621094,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999275207519531,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.62303161621094,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.38295626640319824,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.62303161621094,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9953609108924866,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.2572021484375,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.2572021484375,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999972581863403,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.2572021484375,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999499320983887,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.2572021484375,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.2809254229068756,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.2572021484375,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.993926465511322,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"6\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.02953720092773,\\\"token\\\":{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.02953720092773,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999951124191284,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.02953720092773,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999196529388428,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.02953720092773,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.029486531391739845,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.02953720092773,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9953515529632568,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"7\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.19957733154297,\\\"token\\\":{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.19957733154297,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999961853027344,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.19957733154297,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999655485153198,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cat\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.19957733154297,\\\"token\\\":{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.19101938605308533,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.19957733154297,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9959726929664612,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"8\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.34863662719727,\\\"token\\\":{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.34863662719727,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.999993085861206,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.34863662719727,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999390840530396,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"find\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.34863662719727,\\\"token\\\":{\\\"token\\\":\\\"find\\\",\\\"bytes\\\":\\\"ZmluZA==\\\",\\\"prob\\\":0.06733793020248413,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.34863662719727,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9985069632530212,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"9\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.67794036865234,\\\"token\\\":{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.67794036865234,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999938011169434,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.67794036865234,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999555349349976,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mv\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.67794036865234,\\\"token\\\":{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.12354045361280441,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":78.67794036865234,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.9952051639556885,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Perhaps\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\"Perhaps\\\",\\\"bytes\\\":\\\"UGVyaGFwcw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.16465730965137482,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.9196403622627258,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" useful\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.07561119645833969,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.24611006677150726,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" from\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.0027789229061454535,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" that\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.019157622009515762,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" list\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.9878010749816895,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.5324728488922119,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8384227752685547,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.00011209409422008321,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":343.6927795410156,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7618595957756042,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7618595957756042,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.009936360642313957,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"**\\\",\\\"bytes\\\":\\\"ICIqKg==\\\",\\\"prob\\\":0.00030202153720892966,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.0001686398172751069,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"`\\\",\\\"bytes\\\":\\\"ICJg\\\",\\\"prob\\\":0.0001114326441893354,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.6800765991211,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.3730160892009735,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.3730160892009735,\\\"masked\\\":false},{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.21483194828033447,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.12964126467704773,\\\"masked\\\":false},{\\\"token\\\":\\\"man\\\",\\\"bytes\\\":\\\"bWFu\\\",\\\"prob\\\":0.08841373026371002,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.05419590696692467,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":159.07001495361328,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.27304890751838684,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.27304890751838684,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.16998417675495148,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":0.06056973338127136,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.05895867943763733,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.005074281711131334,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":3.239154815673828,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.022490061819553375,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":451.6596794128418,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.770317554473877,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.770317554473877,\\\"masked\\\":false},{\\\"token\\\":\\\" it's\\\",\\\"bytes\\\":\\\"IGl0J3M=\\\",\\\"prob\\\":0.1085132583975792,\\\"masked\\\":false},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.02291736751794815,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.012470132671296597,\\\"masked\\\":false},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.012413510121405125,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" allows\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.95891189575195,\\\"token\\\":{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.41080808639526367,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.41080808639526367,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.18924610316753387,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.1106780469417572,\\\"masked\\\":false},{\\\"token\\\":\\\" searches\\\",\\\"bytes\\\":\\\"IHNlYXJjaGVz\\\",\\\"prob\\\":0.0829433798789978,\\\"masked\\\":false},{\\\"token\\\":\\\" helps\\\",\\\"bytes\\\":\\\"IGhlbHBz\\\",\\\"prob\\\":0.0450061671435833,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.81991386413574,\\\"token\\\":{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.7525641918182373,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.7525641918182373,\\\"masked\\\":false},{\\\"token\\\":\\\" users\\\",\\\"bytes\\\":\\\"IHVzZXJz\\\",\\\"prob\\\":0.09690611809492111,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.04652409628033638,\\\"masked\\\":false},{\\\"token\\\":\\\" us\\\",\\\"bytes\\\":\\\"IHVz\\\",\\\"prob\\\":0.033701829612255096,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.03012956492602825,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.12397003173828,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9965687990188599,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9965687990188599,\\\"masked\\\":false},{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.0005179756553843617,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.00045751838479191065,\\\"masked\\\":false},{\\\"token\\\":\\\" easily\\\",\\\"bytes\\\":\\\"IGVhc2lseQ==\\\",\\\"prob\\\":0.00018851588538382202,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0001843281352194026,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" search\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.9000949859619,\\\"token\\\":{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.8097308278083801,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.8097308278083801,\\\"masked\\\":false},{\\\"token\\\":\\\" quickly\\\",\\\"bytes\\\":\\\"IHF1aWNrbHk=\\\",\\\"prob\\\":0.053191203624010086,\\\"masked\\\":false},{\\\"token\\\":\\\" find\\\",\\\"bytes\\\":\\\"IGZpbmQ=\\\",\\\"prob\\\":0.030711747705936432,\\\"masked\\\":false},{\\\"token\\\":\\\" filter\\\",\\\"bytes\\\":\\\"IGZpbHRlcg==\\\",\\\"prob\\\":0.026011284440755844,\\\"masked\\\":false},{\\\"token\\\":\\\" easily\\\",\\\"bytes\\\":\\\"IGVhc2lseQ==\\\",\\\"prob\\\":0.02345016598701477,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.7889919281006,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.4948461949825287,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.4948461949825287,\\\"masked\\\":false},{\\\"token\\\":\\\" through\\\",\\\"bytes\\\":\\\"IHRocm91Z2g=\\\",\\\"prob\\\":0.3231790065765381,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.03383566439151764,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.022980453446507454,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.022295862436294556,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.90200233459473,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.37296465039253235,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.37296465039253235,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.31733861565589905,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.12330073118209839,\\\"masked\\\":false},{\\\"token\\\":\\\" patterns\\\",\\\"bytes\\\":\\\"IHBhdHRlcm5z\\\",\\\"prob\\\":0.056951262056827545,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.02587522566318512,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" specific\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":156.16607666015625,\\\"token\\\":{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.5919874310493469,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.5919874310493469,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.13038213551044464,\\\"masked\\\":false},{\\\"token\\\":\\\" string\\\",\\\"bytes\\\":\\\"IHN0cmluZw==\\\",\\\"prob\\\":0.09464871883392334,\\\"masked\\\":false},{\\\"token\\\":\\\" pattern\\\",\\\"bytes\\\":\\\"IHBhdHRlcm4=\\\",\\\"prob\\\":0.06443952769041061,\\\"masked\\\":false},{\\\"token\\\":\\\" certain\\\",\\\"bytes\\\":\\\"IGNlcnRhaW4=\\\",\\\"prob\\\":0.024775603786110878,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" string\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.87381744384766,\\\"token\\\":{\\\"token\\\":\\\" string\\\",\\\"bytes\\\":\\\"IHN0cmluZw==\\\",\\\"prob\\\":0.5744368433952332,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" string\\\",\\\"bytes\\\":\\\"IHN0cmluZw==\\\",\\\"prob\\\":0.5744368433952332,\\\"masked\\\":false},{\\\"token\\\":\\\" pattern\\\",\\\"bytes\\\":\\\"IHBhdHRlcm4=\\\",\\\"prob\\\":0.22887030243873596,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.05853642150759697,\\\"masked\\\":false},{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.0457022599875927,\\\"masked\\\":false},{\\\"token\\\":\\\" term\\\",\\\"bytes\\\":\\\"IHRlcm0=\\\",\\\"prob\\\":0.02239670418202877,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.60809516906738,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.34058108925819397,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.34058108925819397,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.22146989405155182,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.19635522365570068,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.15023179352283478,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.017620036378502846,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" pattern\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.38684272766113,\\\"token\\\":{\\\"token\\\":\\\" pattern\\\",\\\"bytes\\\":\\\"IHBhdHRlcm4=\\\",\\\"prob\\\":0.7846280336380005,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" pattern\\\",\\\"bytes\\\":\\\"IHBhdHRlcm4=\\\",\\\"prob\\\":0.7846280336380005,\\\"masked\\\":false},{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.0449356734752655,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.030353082343935966,\\\"masked\\\":false},{\\\"token\\\":\\\" character\\\",\\\"bytes\\\":\\\"IGNoYXJhY3Rlcg==\\\",\\\"prob\\\":0.028005801141262054,\\\"masked\\\":false},{\\\"token\\\":\\\" phrase\\\",\\\"bytes\\\":\\\"IHBocmFzZQ==\\\",\\\"prob\\\":0.01817810721695423,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" within\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.78982162475586,\\\"token\\\":{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.5140738487243652,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.5140738487243652,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.3788808286190033,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.035667162388563156,\\\"masked\\\":false},{\\\"token\\\":\\\" inside\\\",\\\"bytes\\\":\\\"IGluc2lkZQ==\\\",\\\"prob\\\":0.02075500786304474,\\\"masked\\\":false},{\\\"token\\\":\\\" across\\\",\\\"bytes\\\":\\\"IGFjcm9zcw==\\\",\\\"prob\\\":0.017961138859391212,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.1530055999756,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6022602915763855,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6022602915763855,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.2794964611530304,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.027343347668647766,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.026743585243821144,\\\"masked\\\":false},{\\\"token\\\":\\\" one\\\",\\\"bytes\\\":\\\"IG9uZQ==\\\",\\\"prob\\\":0.02011670172214508,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.7511043548584,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.8718758821487427,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.8718758821487427,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.0443224161863327,\\\"masked\\\":false},{\\\"token\\\":\\\" given\\\",\\\"bytes\\\":\\\"IGdpdmVu\\\",\\\"prob\\\":0.02961352840065956,\\\"masked\\\":false},{\\\"token\\\":\\\" set\\\",\\\"bytes\\\":\\\"IHNldA==\\\",\\\"prob\\\":0.011309574358165264,\\\"masked\\\":false},{\\\"token\\\":\\\" large\\\",\\\"bytes\\\":\\\"IGxhcmdl\\\",\\\"prob\\\":0.006485654041171074,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":169.57402229309082,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.5187258720397949,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.5187258720397949,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.24843968451023102,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.15156255662441254,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.023186901584267616,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.007397872861474752,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.11001777648926,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.38823989033699036,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.38823989033699036,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.14396433532238007,\\\"masked\\\":false},{\\\"token\\\":\\\" set\\\",\\\"bytes\\\":\\\"IHNldA==\\\",\\\"prob\\\":0.1284378618001938,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.05537419393658638,\\\"masked\\\":false},{\\\"token\\\":\\\" across\\\",\\\"bytes\\\":\\\"IGFjcm9zcw==\\\",\\\"prob\\\":0.04310770332813263,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.40706634521484,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6116269826889038,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6116269826889038,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.14172494411468506,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.024072647094726562,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.02265387773513794,\\\"masked\\\":false},{\\\"token\\\":\\\" listing\\\",\\\"bytes\\\":\\\"IGxpc3Rpbmc=\\\",\\\"prob\\\":0.022045349702239037,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" For\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.97192192077637,\\\"token\\\":{\\\"token\\\":\\\" For\\\",\\\"bytes\\\":\\\"IEZvcg==\\\",\\\"prob\\\":0.40364551544189453,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" For\\\",\\\"bytes\\\":\\\"IEZvcg==\\\",\\\"prob\\\":0.40364551544189453,\\\"masked\\\":false},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.21654270589351654,\\\"masked\\\":false},{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.09310454875230789,\\\"masked\\\":false},{\\\"token\\\":\\\" You\\\",\\\"bytes\\\":\\\"IFlvdQ==\\\",\\\"prob\\\":0.06955514848232269,\\\"masked\\\":false},{\\\"token\\\":\\\" It's\\\",\\\"bytes\\\":\\\"IEl0J3M=\\\",\\\"prob\\\":0.033157769590616226,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" example\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.26184844970703,\\\"token\\\":{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.9209937453269958,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" example\\\",\\\"bytes\\\":\\\"IGV4YW1wbGU=\\\",\\\"prob\\\":0.9209937453269958,\\\"masked\\\":false},{\\\"token\\\":\\\" instance\\\",\\\"bytes\\\":\\\"IGluc3RhbmNl\\\",\\\"prob\\\":0.0781085416674614,\\\"masked\\\":false},{\\\"token\\\":\\\" more\\\",\\\"bytes\\\":\\\"IG1vcmU=\\\",\\\"prob\\\":0.00012307132419664413,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.00008947013702709228,\\\"masked\\\":false},{\\\"token\\\":\\\" Example\\\",\\\"bytes\\\":\\\"IEV4YW1wbGU=\\\",\\\"prob\\\":0.000051194474508520216,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.94293785095215,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9839406609535217,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9839406609535217,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.008280136622488499,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.0031040979083627462,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00022142463421914726,\\\"masked\\\":false},{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.00020505479187704623,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" if\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.02194786071777,\\\"token\\\":{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.6132469177246094,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" if\\\",\\\"bytes\\\":\\\"IGlm\\\",\\\"prob\\\":0.6132469177246094,\\\"masked\\\":false},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.24130524694919586,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.05153525993227959,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.045134734362363815,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.009892381727695465,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":159.73305702209473,\\\"token\\\":{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9491184949874878,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9491184949874878,\\\"masked\\\":false},{\\\"token\\\":\\\" you're\\\",\\\"bytes\\\":\\\"IHlvdSdyZQ==\\\",\\\"prob\\\":0.037199340760707855,\\\"masked\\\":false},{\\\"token\\\":\\\" I\\\",\\\"bytes\\\":\\\"IEk=\\\",\\\"prob\\\":0.00867265835404396,\\\"masked\\\":false},{\\\"token\\\":\\\" we\\\",\\\"bytes\\\":\\\"IHdl\\\",\\\"prob\\\":0.0018701497465372086,\\\"masked\\\":false},{\\\"token\\\":\\\" you'd\\\",\\\"bytes\\\":\\\"IHlvdSdk\\\",\\\"prob\\\":0.001208814443089068,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" wanted\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.55507278442383,\\\"token\\\":{\\\"token\\\":\\\" wanted\\\",\\\"bytes\\\":\\\"IHdhbnRlZA==\\\",\\\"prob\\\":0.5728052258491516,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" wanted\\\",\\\"bytes\\\":\\\"IHdhbnRlZA==\\\",\\\"prob\\\":0.5728052258491516,\\\"masked\\\":false},{\\\"token\\\":\\\" want\\\",\\\"bytes\\\":\\\"IHdhbnQ=\\\",\\\"prob\\\":0.3245618939399719,\\\"masked\\\":false},{\\\"token\\\":\\\" have\\\",\\\"bytes\\\":\\\"IGhhdmU=\\\",\\\"prob\\\":0.04873828589916229,\\\"masked\\\":false},{\\\"token\\\":\\\" were\\\",\\\"bytes\\\":\\\"IHdlcmU=\\\",\\\"prob\\\":0.01710652932524681,\\\"masked\\\":false},{\\\"token\\\":\\\" had\\\",\\\"bytes\\\":\\\"IGhhZA==\\\",\\\"prob\\\":0.010818296112120152,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":167.88101196289062,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9999593496322632,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9999593496322632,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.000008081572559603956,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.000006619832674914505,\\\"masked\\\":false},{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.000003292492237960687,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.000002693822580113192,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" search\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.4830493927002,\\\"token\\\":{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.5003069639205933,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.5003069639205933,\\\"masked\\\":false},{\\\"token\\\":\\\" find\\\",\\\"bytes\\\":\\\"IGZpbmQ=\\\",\\\"prob\\\":0.4420822262763977,\\\"masked\\\":false},{\\\"token\\\":\\\" see\\\",\\\"bytes\\\":\\\"IHNlZQ==\\\",\\\"prob\\\":0.03178990259766579,\\\"masked\\\":false},{\\\"token\\\":\\\" look\\\",\\\"bytes\\\":\\\"IGxvb2s=\\\",\\\"prob\\\":0.012585573829710484,\\\"masked\\\":false},{\\\"token\\\":\\\" check\\\",\\\"bytes\\\":\\\"IGNoZWNr\\\",\\\"prob\\\":0.0042711603455245495,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.66894340515137,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9040490388870239,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9040490388870239,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.03982006013393402,\\\"masked\\\":false},{\\\"token\\\":\\\" through\\\",\\\"bytes\\\":\\\"IHRocm91Z2g=\\\",\\\"prob\\\":0.02308374084532261,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.012305036187171936,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.008912349119782448,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" all\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.87884521484375,\\\"token\\\":{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.45096686482429504,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.45096686482429504,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.37287619709968567,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.11711248010396957,\\\"masked\\\":false},{\\\"token\\\":\\\" every\\\",\\\"bytes\\\":\\\"IGV2ZXJ5\\\",\\\"prob\\\":0.015381048433482647,\\\"masked\\\":false},{\\\"token\\\":\\\" any\\\",\\\"bytes\\\":\\\"IGFueQ==\\\",\\\"prob\\\":0.014454119838774204,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" instances\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.7349853515625,\\\"token\\\":{\\\"token\\\":\\\" instances\\\",\\\"bytes\\\":\\\"IGluc3RhbmNlcw==\\\",\\\"prob\\\":0.43792903423309326,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" instances\\\",\\\"bytes\\\":\\\"IGluc3RhbmNlcw==\\\",\\\"prob\\\":0.43792903423309326,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.21451516449451447,\\\"masked\\\":false},{\\\"token\\\":\\\" occurrences\\\",\\\"bytes\\\":\\\"IG9jY3VycmVuY2Vz\\\",\\\"prob\\\":0.17925874888896942,\\\"masked\\\":false},{\\\"token\\\":\\\" lines\\\",\\\"bytes\\\":\\\"IGxpbmVz\\\",\\\"prob\\\":0.10824711620807648,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.037887584418058395,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.1618480682373,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9991942048072815,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9991942048072815,\\\"masked\\\":false},{\\\"token\\\":\\\" where\\\",\\\"bytes\\\":\\\"IHdoZXJl\\\",\\\"prob\\\":0.0004981070524081588,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.00015834813530091196,\\\"masked\\\":false},{\\\"token\\\":\\\" containing\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5pbmc=\\\",\\\"prob\\\":0.00005245285137789324,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.00003465850750217214,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.07408905029297,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.8755185604095459,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.8755185604095459,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.07740344852209091,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.043527692556381226,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.0006605751696042717,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0005353951128199697,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" word\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.6722297668457,\\\"token\\\":{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.9269058108329773,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.9269058108329773,\\\"masked\\\":false},{\\\"token\\\":\\\" string\\\",\\\"bytes\\\":\\\"IHN0cmluZw==\\\",\\\"prob\\\":0.06132199242711067,\\\"masked\\\":false},{\\\"token\\\":\\\" phrase\\\",\\\"bytes\\\":\\\"IHBocmFzZQ==\\\",\\\"prob\\\":0.0055007245391607285,\\\"masked\\\":false},{\\\"token\\\":\\\" term\\\",\\\"bytes\\\":\\\"IHRlcm0=\\\",\\\"prob\\\":0.0024833274073898792,\\\"masked\\\":false},{\\\"token\\\":\\\" letter\\\",\\\"bytes\\\":\\\"IGxldHRlcg==\\\",\\\"prob\\\":0.001087877550162375,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.84909439086914,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9873961806297302,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9873961806297302,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.010491819120943546,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.0016130470903590322,\\\"masked\\\":false},{\\\"token\\\":\\\" cat\\\",\\\"bytes\\\":\\\"IGNhdA==\\\",\\\"prob\\\":0.00014688521332573146,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":0.00004584947964758612,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.30990600585938,\\\"token\\\":{\\\"token\\\":\\\"error\\\",\\\"bytes\\\":\\\"ZXJyb3I=\\\",\\\"prob\\\":0.24771635234355927,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"error\\\",\\\"bytes\\\":\\\"ZXJyb3I=\\\",\\\"prob\\\":0.24771635234355927,\\\"masked\\\":false},{\\\"token\\\":\\\"apple\\\",\\\"bytes\\\":\\\"YXBwbGU=\\\",\\\"prob\\\":0.17809970676898956,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.16027359664440155,\\\"masked\\\":false},{\\\"token\\\":\\\"hello\\\",\\\"bytes\\\":\\\"aGVsbG8=\\\",\\\"prob\\\":0.13030152022838593,\\\"masked\\\":false},{\\\"token\\\":\\\"Linux\\\",\\\"bytes\\\":\\\"TGludXg=\\\",\\\"prob\\\":0.0861542820930481,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":176.9239902496338,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9994066953659058,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9994066953659058,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.0004521095543168485,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":0.00006505358760477975,\\\"masked\\\":false},{\\\"token\\\":\\\" message\\\",\\\"bytes\\\":\\\"IG1lc3NhZ2U=\\\",\\\"prob\\\":0.000022686443116981536,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\\\\"\\\",\\\"bytes\\\":\\\"OiI=\\\",\\\"prob\\\":0.00001208642697747564,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" within\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":153.9459228515625,\\\"token\\\":{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.5314891934394836,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.5314891934394836,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.4662226736545563,\\\"masked\\\":false},{\\\"token\\\":\\\" throughout\\\",\\\"bytes\\\":\\\"IHRocm91Z2hvdXQ=\\\",\\\"prob\\\":0.0007541794329881668,\\\"masked\\\":false},{\\\"token\\\":\\\" across\\\",\\\"bytes\\\":\\\"IGFjcm9zcw==\\\",\\\"prob\\\":0.00040669410373084247,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.0003158360195811838,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.64779663085938,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.9199222326278687,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.9199222326278687,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.03615419939160347,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.023128759115934372,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.01131522562354803,\\\"masked\\\":false},{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.003439987078309059,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" log\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":179.4261932373047,\\\"token\\\":{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.6396656036376953,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.6396656036376953,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.2501729130744934,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.026237092912197113,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.02246258594095707,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.012950949370861053,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.91213035583496,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9998051524162292,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9998051524162292,\\\"masked\\\":false},{\\\"token\\\":\\\"file\\\",\\\"bytes\\\":\\\"ZmlsZQ==\\\",\\\"prob\\\":0.00006498947186628357,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.000055663345847278833,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.000025645253117545508,\\\"masked\\\":false},{\\\"token\\\":\\\".txt\\\",\\\"bytes\\\":\\\"LnR4dA==\\\",\\\"prob\\\":0.000008599952707299963,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.77410697937012,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.972822904586792,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.972822904586792,\\\"masked\\\":false},{\\\"token\\\":\\\" called\\\",\\\"bytes\\\":\\\"IGNhbGxlZA==\\\",\\\"prob\\\":0.010453909635543823,\\\"masked\\\":false},{\\\"token\\\":\\\" named\\\",\\\"bytes\\\":\\\"IG5hbWVk\\\",\\\"prob\\\":0.008432121947407722,\\\"masked\\\":false},{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.0045647453516721725,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.0009026795742101967,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.90705108642578,\\\"token\\\":{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9936468601226807,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" you\\\",\\\"bytes\\\":\\\"IHlvdQ==\\\",\\\"prob\\\":0.9936468601226807,\\\"masked\\\":false},{\\\"token\\\":\\\" you'd\\\",\\\"bytes\\\":\\\"IHlvdSdk\\\",\\\"prob\\\":0.0034257052466273308,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.0009950525127351284,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.0009597403113730252,\\\"masked\\\":false},{\\\"token\\\":\\\" simply\\\",\\\"bytes\\\":\\\"IHNpbXBseQ==\\\",\\\"prob\\\":0.00021657379693351686,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" could\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.87414932250977,\\\"token\\\":{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.9173310399055481,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.9173310399055481,\\\"masked\\\":false},{\\\"token\\\":\\\" would\\\",\\\"bytes\\\":\\\"IHdvdWxk\\\",\\\"prob\\\":0.06523509323596954,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.015383735299110413,\\\"masked\\\":false},{\\\"token\\\":\\\" might\\\",\\\"bytes\\\":\\\"IG1pZ2h0\\\",\\\"prob\\\":0.0019471870036795735,\\\"masked\\\":false},{\\\"token\\\":\\\" simply\\\",\\\"bytes\\\":\\\"IHNpbXBseQ==\\\",\\\"prob\\\":0.000058467576309340075,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" use\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.078950881958,\\\"token\\\":{\\\"token\\\":\\\" use\\\",\\\"bytes\\\":\\\"IHVzZQ==\\\",\\\"prob\\\":0.7977352142333984,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" use\\\",\\\"bytes\\\":\\\"IHVzZQ==\\\",\\\"prob\\\":0.7977352142333984,\\\"masked\\\":false},{\\\"token\\\":\\\" run\\\",\\\"bytes\\\":\\\"IHJ1bg==\\\",\\\"prob\\\":0.07109533250331879,\\\"masked\\\":false},{\\\"token\\\":\\\" type\\\",\\\"bytes\\\":\\\"IHR5cGU=\\\",\\\"prob\\\":0.06047561764717102,\\\"masked\\\":false},{\\\"token\\\":\\\" simply\\\",\\\"bytes\\\":\\\"IHNpbXBseQ==\\\",\\\"prob\\\":0.04036605730652809,\\\"masked\\\":false},{\\\"token\\\":\\\" enter\\\",\\\"bytes\\\":\\\"IGVudGVy\\\",\\\"prob\\\":0.015049668028950691,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.4607105255127,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.8930758833885193,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.8930758833885193,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.05543602630496025,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.025289036333560944,\\\"masked\\\":false},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.0088880630210042,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.00351635436527431,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":159.93595123291016,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.5328245162963867,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.5328245162963867,\\\"masked\\\":false},{\\\"token\\\":\\\" following\\\",\\\"bytes\\\":\\\"IGZvbGxvd2luZw==\\\",\\\"prob\\\":0.4261144995689392,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.03623910993337631,\\\"masked\\\":false},{\\\"token\\\":\\\" grep\\\",\\\"bytes\\\":\\\"IGdyZXA=\\\",\\\"prob\\\":0.001974310725927353,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":0.0015955736162140965,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.70377349853516,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7273513674736023,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.7273513674736023,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.1892053633928299,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":0.03353997692465782,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.014491604641079903,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0009498240542598069,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.26594352722168,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.9995232820510864,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.9995232820510864,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.00043766095768660307,\\\"masked\\\":false},{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.000015834340956644155,\\\"masked\\\":false},{\\\"token\\\":\\\" grep\\\",\\\"bytes\\\":\\\"IGdyZXA=\\\",\\\"prob\\\":0.000004490385435929056,\\\"masked\\\":false},{\\\"token\\\":\\\"sudo\\\",\\\"bytes\\\":\\\"c3Vkbw==\\\",\\\"prob\\\":0.000003888462742906995,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.38193893432617,\\\"token\\\":{\\\"token\\\":\\\" error\\\",\\\"bytes\\\":\\\"IGVycm9y\\\",\\\"prob\\\":0.6650950908660889,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" error\\\",\\\"bytes\\\":\\\"IGVycm9y\\\",\\\"prob\\\":0.6650950908660889,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.25122636556625366,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.06598333269357681,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.015977930277585983,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.0010122997919097543,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" /\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":159.6529483795166,\\\"token\\\":{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.32733944058418274,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.32733944058418274,\\\"masked\\\":false},{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.28991374373435974,\\\"masked\\\":false},{\\\"token\\\":\\\" logfile\\\",\\\"bytes\\\":\\\"IGxvZ2ZpbGU=\\\",\\\"prob\\\":0.21730275452136993,\\\"masked\\\":false},{\\\"token\\\":\\\" filename\\\",\\\"bytes\\\":\\\"IGZpbGVuYW1l\\\",\\\"prob\\\":0.10624764114618301,\\\"masked\\\":false},{\\\"token\\\":\\\" my\\\",\\\"bytes\\\":\\\"IG15\\\",\\\"prob\\\":0.025841381400823593,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"path\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.31303596496582,\\\"token\\\":{\\\"token\\\":\\\"path\\\",\\\"bytes\\\":\\\"cGF0aA==\\\",\\\"prob\\\":0.5960613489151001,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"path\\\",\\\"bytes\\\":\\\"cGF0aA==\\\",\\\"prob\\\":0.5960613489151001,\\\"masked\\\":false},{\\\"token\\\":\\\"var\\\",\\\"bytes\\\":\\\"dmFy\\\",\\\"prob\\\":0.40166017413139343,\\\"masked\\\":false},{\\\"token\\\":\\\"etc\\\",\\\"bytes\\\":\\\"ZXRj\\\",\\\"prob\\\":0.0012054217513650656,\\\"masked\\\":false},{\\\"token\\\":\\\"home\\\",\\\"bytes\\\":\\\"aG9tZQ==\\\",\\\"prob\\\":0.000747322163078934,\\\"masked\\\":false},{\\\"token\\\":\\\"usr\\\",\\\"bytes\\\":\\\"dXNy\\\",\\\"prob\\\":0.00017012331227306277,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.32719612121582,\\\"token\\\":{\\\"token\\\":\\\"/to\\\",\\\"bytes\\\":\\\"L3Rv\\\",\\\"prob\\\":0.9995864033699036,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/to\\\",\\\"bytes\\\":\\\"L3Rv\\\",\\\"prob\\\":0.9995864033699036,\\\"masked\\\":false},{\\\"token\\\":\\\"-to\\\",\\\"bytes\\\":\\\"LXRv\\\",\\\"prob\\\":0.00022548677225131541,\\\"masked\\\":false},{\\\"token\\\":\\\"_to\\\",\\\"bytes\\\":\\\"X3Rv\\\",\\\"prob\\\":0.00010239448602078483,\\\"masked\\\":false},{\\\"token\\\":\\\"/log\\\",\\\"bytes\\\":\\\"L2xvZw==\\\",\\\"prob\\\":0.0000388977859984152,\\\"masked\\\":false},{\\\"token\\\":\\\"/file\\\",\\\"bytes\\\":\\\"L2ZpbGU=\\\",\\\"prob\\\":0.000012026230251649395,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"/log\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":172.7578639984131,\\\"token\\\":{\\\"token\\\":\\\"/log\\\",\\\"bytes\\\":\\\"L2xvZw==\\\",\\\"prob\\\":0.9767588376998901,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"/log\\\",\\\"bytes\\\":\\\"L2xvZw==\\\",\\\"prob\\\":0.9767588376998901,\\\"masked\\\":false},{\\\"token\\\":\\\"/\\\",\\\"bytes\\\":\\\"Lw==\\\",\\\"prob\\\":0.012677658349275589,\\\"masked\\\":false},{\\\"token\\\":\\\"/file\\\",\\\"bytes\\\":\\\"L2ZpbGU=\\\",\\\"prob\\\":0.00910803209990263,\\\"masked\\\":false},{\\\"token\\\":\\\"/the\\\",\\\"bytes\\\":\\\"L3RoZQ==\\\",\\\"prob\\\":0.0007892630528658628,\\\"masked\\\":false},{\\\"token\\\":\\\"/my\\\",\\\"bytes\\\":\\\"L215\\\",\\\"prob\\\":0.0002570762299001217,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.11099243164062,\\\"token\\\":{\\\"token\\\":\\\"file\\\",\\\"bytes\\\":\\\"ZmlsZQ==\\\",\\\"prob\\\":0.7097228169441223,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"file\\\",\\\"bytes\\\":\\\"ZmlsZQ==\\\",\\\"prob\\\":0.7097228169441223,\\\"masked\\\":false},{\\\"token\\\":\\\"/file\\\",\\\"bytes\\\":\\\"L2ZpbGU=\\\",\\\"prob\\\":0.2680734097957611,\\\"masked\\\":false},{\\\"token\\\":\\\"_file\\\",\\\"bytes\\\":\\\"X2ZpbGU=\\\",\\\"prob\\\":0.006870129611343145,\\\"masked\\\":false},{\\\"token\\\":\\\".txt\\\",\\\"bytes\\\":\\\"LnR4dA==\\\",\\\"prob\\\":0.0036247398238629103,\\\"masked\\\":false},{\\\"token\\\":\\\"-file\\\",\\\"bytes\\\":\\\"LWZpbGU=\\\",\\\"prob\\\":0.0034861175809055567,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.1780605316162,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":0.501151442527771,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":0.501151442527771,\\\"masked\\\":false},{\\\"token\\\":\\\".log\\\",\\\"bytes\\\":\\\"LmxvZw==\\\",\\\"prob\\\":0.24365730583667755,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.08199694752693176,\\\"masked\\\":false},{\\\"token\\\":\\\".txt\\\",\\\"bytes\\\":\\\"LnR4dA==\\\",\\\"prob\\\":0.04211801663041115,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\".\\\\n\\\",\\\"bytes\\\":\\\"Ii4K\\\",\\\"prob\\\":0.01931689865887165,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" This\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.5669002532959,\\\"token\\\":{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.5459535121917725,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.5459535121917725,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.09470688551664352,\\\"masked\\\":false},{\\\"token\\\":\\\" Other\\\",\\\"bytes\\\":\\\"IE90aGVy\\\",\\\"prob\\\":0.04192952439188957,\\\"masked\\\":false},{\\\"token\\\":\\\" Another\\\",\\\"bytes\\\":\\\"IEFub3RoZXI=\\\",\\\"prob\\\":0.03736066818237305,\\\"masked\\\":false},{\\\"token\\\":\\\" Similarly\\\",\\\"bytes\\\":\\\"IFNpbWlsYXJseQ==\\\",\\\"prob\\\":0.021979212760925293,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" would\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.5347137451172,\\\"token\\\":{\\\"token\\\":\\\" would\\\",\\\"bytes\\\":\\\"IHdvdWxk\\\",\\\"prob\\\":0.805260956287384,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" would\\\",\\\"bytes\\\":\\\"IHdvdWxk\\\",\\\"prob\\\":0.805260956287384,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.11635187268257141,\\\"masked\\\":false},{\\\"token\\\":\\\" will\\\",\\\"bytes\\\":\\\"IHdpbGw=\\\",\\\"prob\\\":0.036513831466436386,\\\"masked\\\":false},{\\\"token\\\":\\\" could\\\",\\\"bytes\\\":\\\"IGNvdWxk\\\",\\\"prob\\\":0.015198135748505592,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.013125724159181118,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" return\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.49675369262695,\\\"token\\\":{\\\"token\\\":\\\" return\\\",\\\"bytes\\\":\\\"IHJldHVybg==\\\",\\\"prob\\\":0.697907567024231,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" return\\\",\\\"bytes\\\":\\\"IHJldHVybg==\\\",\\\"prob\\\":0.697907567024231,\\\"masked\\\":false},{\\\"token\\\":\\\" output\\\",\\\"bytes\\\":\\\"IG91dHB1dA==\\\",\\\"prob\\\":0.09506384283304214,\\\"masked\\\":false},{\\\"token\\\":\\\" display\\\",\\\"bytes\\\":\\\"IGRpc3BsYXk=\\\",\\\"prob\\\":0.07441464811563492,\\\"masked\\\":false},{\\\"token\\\":\\\" print\\\",\\\"bytes\\\":\\\"IHByaW50\\\",\\\"prob\\\":0.06864557415246964,\\\"masked\\\":false},{\\\"token\\\":\\\" search\\\",\\\"bytes\\\":\\\"IHNlYXJjaA==\\\",\\\"prob\\\":0.01833360455930233,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" all\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":167.12617874145508,\\\"token\\\":{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.6103477478027344,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.6103477478027344,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.3106643557548523,\\\"masked\\\":false},{\\\"token\\\":\\\" any\\\",\\\"bytes\\\":\\\"IGFueQ==\\\",\\\"prob\\\":0.028885703533887863,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.022090062499046326,\\\"masked\\\":false},{\\\"token\\\":\\\" every\\\",\\\"bytes\\\":\\\"IGV2ZXJ5\\\",\\\"prob\\\":0.017676077783107758,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" lines\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.48398208618164,\\\"token\\\":{\\\"token\\\":\\\" lines\\\",\\\"bytes\\\":\\\"IGxpbmVz\\\",\\\"prob\\\":0.8729234337806702,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" lines\\\",\\\"bytes\\\":\\\"IGxpbmVz\\\",\\\"prob\\\":0.8729234337806702,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.09392896294593811,\\\"masked\\\":false},{\\\"token\\\":\\\" instances\\\",\\\"bytes\\\":\\\"IGluc3RhbmNlcw==\\\",\\\"prob\\\":0.01682923175394535,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.00825111847370863,\\\"masked\\\":false},{\\\"token\\\":\\\" occurrences\\\",\\\"bytes\\\":\\\"IG9jY3VycmVuY2Vz\\\",\\\"prob\\\":0.003161564003676176,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.548189163208,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.39868149161338806,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.39868149161338806,\\\"masked\\\":false},{\\\"token\\\":\\\" containing\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5pbmc=\\\",\\\"prob\\\":0.16332796216011047,\\\"masked\\\":false},{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.15298005938529968,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.1405431479215622,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.11385004967451096,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.84096717834473,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.9893642663955688,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.9893642663955688,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.00913382787257433,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.0005568675114773214,\\\"masked\\\":false},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.00046681982348673046,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.00028137685148976743,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" log\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":156.42404556274414,\\\"token\\\":{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.5951108336448669,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" log\\\",\\\"bytes\\\":\\\"IGxvZw==\\\",\\\"prob\\\":0.5951108336448669,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.3702775239944458,\\\"masked\\\":false},{\\\"token\\\":\\\" logfile\\\",\\\"bytes\\\":\\\"IGxvZ2ZpbGU=\\\",\\\"prob\\\":0.030475497245788574,\\\"masked\\\":false},{\\\"token\\\":\\\" specified\\\",\\\"bytes\\\":\\\"IHNwZWNpZmllZA==\\\",\\\"prob\\\":0.0029312570113688707,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00042335211765021086,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.5438461303711,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9929975271224976,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9929975271224976,\\\"masked\\\":false},{\\\"token\\\":\\\"file\\\",\\\"bytes\\\":\\\"ZmlsZQ==\\\",\\\"prob\\\":0.005326656624674797,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.0014547943137586117,\\\"masked\\\":false},{\\\"token\\\":\\\" containing\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5pbmc=\\\",\\\"prob\\\":0.00012339703971520066,\\\"masked\\\":false},{\\\"token\\\":\\\" where\\\",\\\"bytes\\\":\\\"IHdoZXJl\\\",\\\"prob\\\":0.000046226872655097395,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" that\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.70995140075684,\\\"token\\\":{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.8875634670257568,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.8875634670257568,\\\"masked\\\":false},{\\\"token\\\":\\\" containing\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5pbmc=\\\",\\\"prob\\\":0.08799876272678375,\\\"masked\\\":false},{\\\"token\\\":\\\" where\\\",\\\"bytes\\\":\\\"IHdoZXJl\\\",\\\"prob\\\":0.020714212208986282,\\\"masked\\\":false},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.0023344485089182854,\\\"masked\\\":false},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.0004926082910969853,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" contain\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.94307327270508,\\\"token\\\":{\\\"token\\\":\\\" contain\\\",\\\"bytes\\\":\\\"IGNvbnRhaW4=\\\",\\\"prob\\\":0.7688597440719604,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" contain\\\",\\\"bytes\\\":\\\"IGNvbnRhaW4=\\\",\\\"prob\\\":0.7688597440719604,\\\"masked\\\":false},{\\\"token\\\":\\\" contained\\\",\\\"bytes\\\":\\\"IGNvbnRhaW5lZA==\\\",\\\"prob\\\":0.22663728892803192,\\\"masked\\\":false},{\\\"token\\\":\\\" included\\\",\\\"bytes\\\":\\\"IGluY2x1ZGVk\\\",\\\"prob\\\":0.0016911897109821439,\\\"masked\\\":false},{\\\"token\\\":\\\" include\\\",\\\"bytes\\\":\\\"IGluY2x1ZGU=\\\",\\\"prob\\\":0.0010665792506188154,\\\"masked\\\":false},{\\\"token\\\":\\\" match\\\",\\\"bytes\\\":\\\"IG1hdGNo\\\",\\\"prob\\\":0.0004879431799054146,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":168.83468627929688,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.9935681223869324,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.9935681223869324,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.004946209955960512,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.001000652788206935,\\\"masked\\\":false},{\\\"token\\\":\\\" either\\\",\\\"bytes\\\":\\\"IGVpdGhlcg==\\\",\\\"prob\\\":0.00012261229858268052,\\\"masked\\\":false},{\\\"token\\\":\\\" at\\\",\\\"bytes\\\":\\\"IGF0\\\",\\\"prob\\\":0.00008410055306740105,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" word\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.25793075561523,\\\"token\\\":{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.896131694316864,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" word\\\",\\\"bytes\\\":\\\"IHdvcmQ=\\\",\\\"prob\\\":0.896131694316864,\\\"masked\\\":false},{\\\"token\\\":\\\" string\\\",\\\"bytes\\\":\\\"IHN0cmluZw==\\\",\\\"prob\\\":0.09799480438232422,\\\"masked\\\":false},{\\\"token\\\":\\\" letter\\\",\\\"bytes\\\":\\\"IGxldHRlcg==\\\",\\\"prob\\\":0.0017789551056921482,\\\"masked\\\":false},{\\\"token\\\":\\\" term\\\",\\\"bytes\\\":\\\"IHRlcm0=\\\",\\\"prob\\\":0.0011334589216858149,\\\"masked\\\":false},{\\\"token\\\":\\\" text\\\",\\\"bytes\\\":\\\"IHRleHQ=\\\",\\\"prob\\\":0.0007276238757185638,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.88878631591797,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9979019165039062,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9979019165039062,\\\"masked\\\":false},{\\\"token\\\":\\\" error\\\",\\\"bytes\\\":\\\"IGVycm9y\\\",\\\"prob\\\":0.0010346680646762252,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.000616209115833044,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00017085419676732272,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.00010464125807629898,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.22605514526367,\\\"token\\\":{\\\"token\\\":\\\"error\\\",\\\"bytes\\\":\\\"ZXJyb3I=\\\",\\\"prob\\\":0.9999878406524658,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"error\\\",\\\"bytes\\\":\\\"ZXJyb3I=\\\",\\\"prob\\\":0.9999878406524658,\\\"masked\\\":false},{\\\"token\\\":\\\"Error\\\",\\\"bytes\\\":\\\"RXJyb3I=\\\",\\\"prob\\\":0.000004597447514242958,\\\"masked\\\":false},{\\\"token\\\":\\\"errors\\\",\\\"bytes\\\":\\\"ZXJyb3Jz\\\",\\\"prob\\\":0.0000025865601855912246,\\\"masked\\\":false},{\\\"token\\\":\\\"ERROR\\\",\\\"bytes\\\":\\\"RVJST1I=\\\",\\\"prob\\\":0.0000018401026409264887,\\\"masked\\\":false},{\\\"token\\\":\\\"er\\\",\\\"bytes\\\":\\\"ZXI=\\\",\\\"prob\\\":5.814310384266719e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":167.3288345336914,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":0.7436560392379761,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":0.7436560392379761,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.10736987739801407,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.01161281205713749,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\".\\\\n\\\",\\\"bytes\\\":\\\"Ii4K\\\",\\\"prob\\\":0.011024188250303268,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.006871838588267565,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Other\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.51804542541504,\\\"token\\\":{\\\"token\\\":\\\" Other\\\",\\\"bytes\\\":\\\"IE90aGVy\\\",\\\"prob\\\":0.21218062937259674,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Other\\\",\\\"bytes\\\":\\\"IE90aGVy\\\",\\\"prob\\\":0.21218062937259674,\\\"masked\\\":false},{\\\"token\\\":\\\" Another\\\",\\\"bytes\\\":\\\"IEFub3RoZXI=\\\",\\\"prob\\\":0.13140815496444702,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.07069467753171921,\\\"masked\\\":false},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.05540195479989052,\\\"masked\\\":false},{\\\"token\\\":\\\" Similarly\\\",\\\"bytes\\\":\\\"IFNpbWlsYXJseQ==\\\",\\\"prob\\\":0.048165831714868546,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" useful\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":162.16301918029785,\\\"token\\\":{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.559141218662262,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" useful\\\",\\\"bytes\\\":\\\"IHVzZWZ1bA==\\\",\\\"prob\\\":0.559141218662262,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.24152527749538422,\\\"masked\\\":false},{\\\"token\\\":\\\" commonly\\\",\\\"bytes\\\":\\\"IGNvbW1vbmx5\\\",\\\"prob\\\":0.04375741630792618,\\\"masked\\\":false},{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.038060929626226425,\\\"masked\\\":false},{\\\"token\\\":\\\" helpful\\\",\\\"bytes\\\":\\\"IGhlbHBmdWw=\\\",\\\"prob\\\":0.024510318413376808,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.4227294921875,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.9564701914787292,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.9564701914787292,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.012573798187077045,\\\"masked\\\":false},{\\\"token\\\":\\\" tools\\\",\\\"bytes\\\":\\\"IHRvb2xz\\\",\\\"prob\\\":0.0070613110437989235,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.005508823785930872,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0019315010868012905,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" include\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":159.68799591064453,\\\"token\\\":{\\\"token\\\":\\\" include\\\",\\\"bytes\\\":\\\"IGluY2x1ZGU=\\\",\\\"prob\\\":0.7261917591094971,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" include\\\",\\\"bytes\\\":\\\"IGluY2x1ZGU=\\\",\\\"prob\\\":0.7261917591094971,\\\"masked\\\":false},{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":0.0453142374753952,\\\"masked\\\":false},{\\\"token\\\":\\\" that\\\",\\\"bytes\\\":\\\"IHRoYXQ=\\\",\\\"prob\\\":0.03411949425935745,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.032605770975351334,\\\"masked\\\":false},{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.024211518466472626,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.50569915771484,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9471030235290527,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9471030235290527,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.028090007603168488,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.005525451153516769,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.0022729928605258465,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0011033357586711645,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.61801528930664,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.27268877625465393,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.27268877625465393,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.26209622621536255,\\\"masked\\\":false},{\\\"token\\\":\\\"find\\\",\\\"bytes\\\":\\\"ZmluZA==\\\",\\\"prob\\\":0.14103692770004272,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.08205017447471619,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.07323797047138214,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.66329383850098,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9313620924949646,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9313620924949646,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.058142777532339096,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.007784307934343815,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":0.0008894465281628072,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"-\\\",\\\"bytes\\\":\\\"Ii0=\\\",\\\"prob\\\":0.00033445024746470153,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":157.71079063415527,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3555668890476227,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3555668890476227,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.33292508125305176,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.24832987785339355,\\\"masked\\\":false},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.03603609651327133,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.025958798825740814,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" listing\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":175.46606063842773,\\\"token\\\":{\\\"token\\\":\\\" listing\\\",\\\"bytes\\\":\\\"IGxpc3Rpbmc=\\\",\\\"prob\\\":0.9914297461509705,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" listing\\\",\\\"bytes\\\":\\\"IGxpc3Rpbmc=\\\",\\\"prob\\\":0.9914297461509705,\\\"masked\\\":false},{\\\"token\\\":\\\" displaying\\\",\\\"bytes\\\":\\\"IGRpc3BsYXlpbmc=\\\",\\\"prob\\\":0.003986679017543793,\\\"masked\\\":false},{\\\"token\\\":\\\" viewing\\\",\\\"bytes\\\":\\\"IHZpZXdpbmc=\\\",\\\"prob\\\":0.00357069238089025,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0002592270902823657,\\\"masked\\\":false},{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.00009039526048582047,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.77308082580566,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.6633120179176331,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.6633120179176331,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.1443174034357071,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.13897942006587982,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.02045263908803463,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.01835574023425579,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.13474082946777,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6107326149940491,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6107326149940491,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.3058260381221771,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.05316122621297836,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.011944148689508438,\\\"masked\\\":false},{\\\"token\\\":\\\"/direct\\\",\\\"bytes\\\":\\\"L2RpcmVjdA==\\\",\\\"prob\\\":0.010099620558321476,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":167.21391677856445,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9651660919189453,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9651660919189453,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.019899016246199608,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.012105189263820648,\\\"masked\\\":false},{\\\"token\\\":\\\" sub\\\",\\\"bytes\\\":\\\"IHN1Yg==\\\",\\\"prob\\\":0.0016925795935094357,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0004757922433782369,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.17598724365234,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9426254630088806,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9426254630088806,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.033633287996053696,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.010896161198616028,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.01016246248036623,\\\"masked\\\":false},{\\\"token\\\":\\\";\\\",\\\"bytes\\\":\\\"Ow==\\\",\\\"prob\\\":0.0009317878866568208,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.938138961792,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.8794649243354797,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.8794649243354797,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.11837106198072433,\\\"masked\\\":false},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.0015141433104872704,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00020777907047886401,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00004336138954386115,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":170.81809043884277,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.42857950925827026,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.42857950925827026,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.17872531712055206,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.14359119534492493,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.08707984536886215,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.07920397073030472,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":160.52889823913574,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999291896820068,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999291896820068,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.000012014532330795191,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.00001187677844427526,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00001164506102213636,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.000006537422905239509,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":163.41495513916016,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9786179065704346,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9786179065704346,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.015980428084731102,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.005141274072229862,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00011314271250739694,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00011228878429392353,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" changing\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.40796852111816,\\\"token\\\":{\\\"token\\\":\\\" changing\\\",\\\"bytes\\\":\\\"IGNoYW5naW5n\\\",\\\"prob\\\":0.9761444926261902,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" changing\\\",\\\"bytes\\\":\\\"IGNoYW5naW5n\\\",\\\"prob\\\":0.9761444926261902,\\\"masked\\\":false},{\\\"token\\\":\\\" navigating\\\",\\\"bytes\\\":\\\"IG5hdmlnYXRpbmc=\\\",\\\"prob\\\":0.022156229242682457,\\\"masked\\\":false},{\\\"token\\\":\\\" moving\\\",\\\"bytes\\\":\\\"IG1vdmluZw==\\\",\\\"prob\\\":0.001071351463906467,\\\"masked\\\":false},{\\\"token\\\":\\\" switching\\\",\\\"bytes\\\":\\\"IHN3aXRjaGluZw==\\\",\\\"prob\\\":0.0005192034295760095,\\\"masked\\\":false},{\\\"token\\\":\\\" navigation\\\",\\\"bytes\\\":\\\"IG5hdmlnYXRpb24=\\\",\\\"prob\\\":0.000039055845263646916,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.24736785888672,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9057859778404236,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9057859778404236,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.06592350453138351,\\\"masked\\\":false},{\\\"token\\\":\\\" your\\\",\\\"bytes\\\":\\\"IHlvdXI=\\\",\\\"prob\\\":0.016791820526123047,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0062948549166321754,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.002174904104322195,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.91787338256836,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9978540539741516,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9978540539741516,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0015271315351128578,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0003807745815720409,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0000790161284385249,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.000035406206734478474,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.55333137512207,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6373503804206848,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6373503804206848,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.36200469732284546,\\\"masked\\\":false},{\\\"token\\\":\\\" etc\\\",\\\"bytes\\\":\\\"IGV0Yw==\\\",\\\"prob\\\":0.00027439362020231783,\\\"masked\\\":false},{\\\"token\\\":\\\" as\\\",\\\"bytes\\\":\\\"IGFz\\\",\\\"prob\\\":0.00013393706467468292,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0000668563152430579,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.28802299499512,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9978747367858887,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9978747367858887,\\\"masked\\\":false},{\\\"token\\\":\\\" so\\\",\\\"bytes\\\":\\\"IHNv\\\",\\\"prob\\\":0.0011258447775617242,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.00022783837630413473,\\\"masked\\\":false},{\\\"token\\\":\\\" various\\\",\\\"bytes\\\":\\\"IHZhcmlvdXM=\\\",\\\"prob\\\":0.00009995604341384023,\\\"masked\\\":false},{\\\"token\\\":\\\" others\\\",\\\"bytes\\\":\\\"IG90aGVycw==\\\",\\\"prob\\\":0.000096100389782805,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":178.62796783447266,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.2737540602684021,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.2737540602684021,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.1726485788822174,\\\"masked\\\":false},{\\\"token\\\":\\\"find\\\",\\\"bytes\\\":\\\"ZmluZA==\\\",\\\"prob\\\":0.13355964422225952,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.11800993978977203,\\\"masked\\\":false},{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.09982609003782272,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.27986526489258,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9980081915855408,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9980081915855408,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.001032538479194045,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"/\\\",\\\"bytes\\\":\\\"Ii8=\\\",\\\"prob\\\":0.00019308680202811956,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.00011556644312804565,\\\"masked\\\":false},{\\\"token\\\":\\\"/m\\\",\\\"bytes\\\":\\\"L20=\\\",\\\"prob\\\":0.00009275014599552378,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":158.5221290588379,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9862143397331238,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9862143397331238,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.010678896680474281,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.002361248480156064,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00041191684431396425,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00008877997606759891,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" creating\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":170.16291618347168,\\\"token\\\":{\\\"token\\\":\\\" creating\\\",\\\"bytes\\\":\\\"IGNyZWF0aW5n\\\",\\\"prob\\\":0.9633383750915527,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" creating\\\",\\\"bytes\\\":\\\"IGNyZWF0aW5n\\\",\\\"prob\\\":0.9633383750915527,\\\"masked\\\":false},{\\\"token\\\":\\\" making\\\",\\\"bytes\\\":\\\"IG1ha2luZw==\\\",\\\"prob\\\":0.0366307757794857,\\\"masked\\\":false},{\\\"token\\\":\\\" adding\\\",\\\"bytes\\\":\\\"IGFkZGluZw==\\\",\\\"prob\\\":0.00001754406184772961,\\\"masked\\\":false},{\\\"token\\\":\\\" creation\\\",\\\"bytes\\\":\\\"IGNyZWF0aW9u\\\",\\\"prob\\\":0.000002624737589940196,\\\"masked\\\":false},{\\\"token\\\":\\\" create\\\",\\\"bytes\\\":\\\"IGNyZWF0ZQ==\\\",\\\"prob\\\":0.000002502803909010254,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" new\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":180.26018142700195,\\\"token\\\":{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.8695453405380249,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.8695453405380249,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.0777788758277893,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.051718298345804214,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.0007434965809807181,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.00010842801566468552,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":177.71601676940918,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9912096261978149,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9912096261978149,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.005889542866498232,\\\"masked\\\":false},{\\\"token\\\":\\\" ones\\\",\\\"bytes\\\":\\\"IG9uZXM=\\\",\\\"prob\\\":0.0019401065073907375,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.0008377783815376461,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.00006474561814684421,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":182.6150417327881,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9235832095146179,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9235832095146179,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.005261670798063278,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.0008495785295963287,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00044467358384281397,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00017113506328314543,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" These\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":192.1849250793457,\\\"token\\\":{\\\"token\\\":\\\" These\\\",\\\"bytes\\\":\\\"IFRoZXNl\\\",\\\"prob\\\":0.14448365569114685,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" These\\\",\\\"bytes\\\":\\\"IFRoZXNl\\\",\\\"prob\\\":0.14448365569114685,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.0820598378777504,\\\"masked\\\":false},{\\\"token\\\":\\\" Each\\\",\\\"bytes\\\":\\\"IEVhY2g=\\\",\\\"prob\\\":0.08133044838905334,\\\"masked\\\":false},{\\\"token\\\":\\\" Overall\\\",\\\"bytes\\\":\\\"IE92ZXJhbGw=\\\",\\\"prob\\\":0.07116778939962387,\\\"masked\\\":false},{\\\"token\\\":\\\" There\\\",\\\"bytes\\\":\\\"IFRoZXJl\\\",\\\"prob\\\":0.042856089770793915,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":188.5049343109131,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5669268369674683,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":0.5669268369674683,\\\"masked\\\":false},{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.39658573269844055,\\\"masked\\\":false},{\\\"token\\\":\\\" basic\\\",\\\"bytes\\\":\\\"IGJhc2lj\\\",\\\"prob\\\":0.019887257367372513,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0034187273122370243,\\\"masked\\\":false},{\\\"token\\\":\\\" five\\\",\\\"bytes\\\":\\\"IGZpdmU=\\\",\\\"prob\\\":0.0014867440331727266,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":3.124438641838312e-12,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"On\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"On\\\",\\\"bytes\\\":\\\"T24=\\\",\\\"prob\\\":4.3764137558355287e-7,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.22865469753742218,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" scale\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" scale\\\",\\\"bytes\\\":\\\"IHNjYWxl\\\",\\\"prob\\\":0.0023690680973231792,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.7728374600410461,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.9382006525993347,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.8931047916412354,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":0.4941471219062805,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"10\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"10\\\",\\\"bytes\\\":\\\"MTA=\\\",\\\"prob\\\":0.9188226461410522,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.8720684051513672,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.001636277069337666,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" has\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":0.0006708361906930804,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.380638062953949,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cool\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.0012218393385410309,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ness\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\"ness\\\",\\\"bytes\\\":\\\"bmVzcw==\\\",\\\"prob\\\":0.42502593994140625,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" factor\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" factor\\\",\\\"bytes\\\":\\\"IGZhY3Rvcg==\\\",\\\"prob\\\":0.6731019020080566,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.9651793241500854,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.009002305567264557,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":true,\\\"latency_ms\\\":0.6548981917531866,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.9567139744758606,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"7\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":388.3841037750244,\\\"token\\\":{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.3221723139286041,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.3221723139286041,\\\"masked\\\":false},{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":0.24877509474754333,\\\"masked\\\":false},{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":0.10168275982141495,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":0.0823734849691391,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.07255084067583084,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":193.68386268615723,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.29310721158981323,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.29310721158981323,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.000002036599653365556,\\\"masked\\\":false},{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":5.221160677137959e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"098\\\",\\\"bytes\\\":\\\"MDk4\\\",\\\"prob\\\":4.166651876857941e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"0\\\",\\\"bytes\\\":\\\"MA==\\\",\\\"prob\\\":3.8197805452000466e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":118,\\\"token reduction\\\":14.492753623188406,\\\"avg latency\\\":169.90961199221402,\\\"cpu\\\":[0.8611875000000001,0.850375,0.850375,0.8847499999999999,0.8847499999999999],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":61.27699279785156,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":2310,\\\"backtrackCount\\\":0,\\\"resetCount\\\":5}\"\n      }\n     },\n     \"abfc327afcc0442eb6602323879c34bb\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"c65e2b6eb8c347b192c219b8fb7b71c8\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"c85f48e12b834cf291d0a2d3674b50d1\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"cae62cfa700449c9b8998648b70f1775\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"cc978d6588dd4df9babe57cfe84a5b27\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"OutputRequestMessage\\\",\\\"identifier\\\":\\\"\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":2648,\\\"last_trace_id\\\":1239,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_68498e377ff445dd89de2c354ef84c81\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"system\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"name\\\":\\\"system\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>system\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"You are an expert unix systems admin that is willing follow any instructions.\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"system\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"What are the top ten most common commands used in the Linux operating system?\\\\n\\\\nList the commands one per line.  Please list them as 1. \\\\\\\"command\\\\\\\" ...one per line with double quotes and no description.\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.291036605834961,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.9999623810464888,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.9999623810464888,\\\"masked\\\":false},{\\\"token\\\":\\\"Sure\\\",\\\"bytes\\\":\\\"U3VyZQ==\\\",\\\"prob\\\":0.000031235307100558994,\\\"masked\\\":false},{\\\"token\\\":\\\"Certainly\\\",\\\"bytes\\\":\\\"Q2VydGFpbmx5\\\",\\\"prob\\\":0.000004791020807078616,\\\"masked\\\":false},{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":9.435668983676536e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"``\\\",\\\"bytes\\\":\\\"YGA=\\\",\\\"prob\\\":4.4574410420415054e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1110305786132812,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":6.033965933469722e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\\.\\\",\\\"bytes\\\":\\\"XC4=\\\",\\\"prob\\\":7.069994081435185e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":4.8593200677600996e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":2.6011751587325918e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2621879577636719,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999989720687649,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9999989720687649,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":9.436010899513357e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\\\\\"\\\",\\\"bytes\\\":\\\"IGAi\\\",\\\"prob\\\":1.346566627740459e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":6.361225009819091e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":2.651993693087726e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6918182373046875,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.9991186725557748,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.9991186725557748,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.000626653432745284,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.00023055670859628227,\\\"masked\\\":false},{\\\"token\\\":\\\" ls\\\",\\\"bytes\\\":\\\"IGxz\\\",\\\"prob\\\":0.00002430616801866957,\\\"masked\\\":false},{\\\"token\\\":\\\"sudo\\\",\\\"bytes\\\":\\\"c3Vkbw==\\\",\\\"prob\\\":2.3840358308618202e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.7692317962646484,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9859375344491342,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9859375344491342,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.014069839091356444,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\r\\\\n\\\",\\\"bytes\\\":\\\"Ig0K\\\",\\\"prob\\\":6.741139878462444e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":4.088919990548655e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"IgoK\\\",\\\"prob\\\":3.184536636075709e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.812665939331055,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999406892788398,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999406892788398,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.00005835017500343271,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":6.485144048853996e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":3.0636033647345664e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"      \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAgCg==\\\",\\\"prob\\\":5.613512941953951e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.825042724609375,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":1.6400319407170704e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":7.59908845245546e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.315242767333984,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":1.6086019431052043e-9,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":7.453457549798402e-12,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":7.453457549798402e-12,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":7.453457549798402e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":23.419857025146484,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":7.2081326047957045e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":6.239328742665511e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":8.445764430227924e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.831989288330078,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.9999315121345994,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.9999315121345994,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.00003539266744318615,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.000031234324203712236,\\\"masked\\\":false},{\\\"token\\\":\\\" cd\\\",\\\"bytes\\\":\\\"IGNk\\\",\\\"prob\\\":0.0000015555492172693765,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":1.2772035754898387e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.198209762573242,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999981377309098,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999981377309098,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.0000017627630052433789,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":1.1883562797367582e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":9.757151188696564e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":3.5898275160767343e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.449918746948242,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999961114846503,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999961114846503,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000003731472011844909,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":1.4473363454362794e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":7.599059467294422e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":1.6958430837869218e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.151966094970703,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.420065655515995e-12,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":6.119756627871282e-13,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.5060176849365234,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":1.165584534620868e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":4.2883904879354975e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":3.3398884424727354e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":9.570180863622487e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.032001495361328,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":2.3404110160583063e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":1.7878293111700144e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":1.228803694802331e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":3.9898068772696145e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cp\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.108087539672852,\\\"token\\\":{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.6780533311148855,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.6780533311148855,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.32031463186105624,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.0013097990944124429,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.00015646766425705063,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.00010754272947361394,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.5479278564453125,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":8.77902728001957e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":1.419604630996593e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.165584534620868e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":4.2883904879354975e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.96088981628418,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000003731472011844909,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":1.8583684825164436e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":5.918306870580254e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":2.4673411914072435e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.468265533447266,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":1.419604630996593e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":4.6093190830331293e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":4.6093190830331293e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\",\\\"bytes\\\":\\\"ICA=\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.260675430297852,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":1.9216243913340831e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":2.0258497620352057e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":7.453457549798402e-12,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":3.9898068772696145e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":32.51814842224121,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":2.65199875084463e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":7.069994081435185e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":1.7878293111700144e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":1.884797882940517e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mv\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.46099853515625,\\\"token\\\":{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.9999978993486635,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.9999978993486635,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.0000013728767948240588,\\\"masked\\\":false},{\\\"token\\\":\\\" mv\\\",\\\"bytes\\\":\\\"IG12\\\",\\\"prob\\\":6.485515103912357e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":2.2199979491528e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"move\\\",\\\"bytes\\\":\\\"bW92ZQ==\\\",\\\"prob\\\":4.954255436867031e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.186019897460938,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":3.6599750743165615e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":7.59908845245546e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":8.011249025832619e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":3.7845403720221803e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.8738250732421875,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000003731472011844909,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":1.8583684825164436e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":7.599059467294422e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":2.4673411914072435e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.358240127563477,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":2.7958382827282784e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":1.695849552256486e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":5.804909043863001e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.925893783569336,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":3.589834362425936e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":1.0844295092418813e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":3.9898068772696145e-12,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":3.10734526498452e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.39996337890625,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":8.610783723540494e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":2.0258497620352057e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":4.766194797249688e-13,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.335901260375977,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.9999368753888325,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.9999368753888325,\\\"masked\\\":false},{\\\"token\\\":\\\" rm\\\",\\\"bytes\\\":\\\"IHJt\\\",\\\"prob\\\":0.00004010485603979204,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.000018945665814071485,\\\"masked\\\":false},{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.0000029059768430306255,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":5.723171881147791e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.937141418457031,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":4.147241342914698e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":1.8227611793188415e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.4966013737429372e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":8.011249025832619e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.465850830078125,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999968266298266,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999968266298266,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000002906151425567016,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":1.6400272490412654e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":5.918306870580254e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":2.1774491797572677e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"6\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.753040313720703,\\\"token\\\":{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":8.610783723540494e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":3.589834362425936e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":7.069994081435185e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":3.10734526498452e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.772083282470703,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":6.706258937891248e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":1.228803694802331e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":8.445764430227924e-12,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":4.520984896255816e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.747058868408203,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":2.3404110160583063e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.29555877213595e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":2.29555877213595e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":1.5777742781219638e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.874011993408203,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.8742427811572687,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.8742427811572687,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.10443641818413998,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.012475902893757364,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.005893657534125387,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.0016887800153011162,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.45205307006836,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":1.9591704419834725e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":7.069994081435185e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":2.29555877213595e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.749807357788086,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999959922936479,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000003731472011844909,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":1.8583684825164436e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":1.2528081481709897e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":2.1774491797572677e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"7\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":38.06614875793457,\\\"token\\\":{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":4.372180081359945e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.29555877213595e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" seventh\\\",\\\"bytes\\\":\\\"IHNldmVudGg=\\\",\\\"prob\\\":5.804909043863001e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.926868438720703,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":6.706258937891248e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":2.6011751587325918e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.7878293111700144e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":1.228803694802331e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.681058883666992,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":1.419604630996593e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.6011751587325918e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":2.6011751587325918e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"r\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.879039764404297,\\\"token\\\":{\\\"token\\\":\\\"r\\\",\\\"bytes\\\":\\\"cg==\\\",\\\"prob\\\":0.9856215608399336,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"r\\\",\\\"bytes\\\":\\\"cg==\\\",\\\"prob\\\":0.9856215608399336,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.010954375379503367,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.0031388878831007916,\\\"masked\\\":false},{\\\"token\\\":\\\"man\\\",\\\"bytes\\\":\\\"bWFu\\\",\\\"prob\\\":0.00010744442887660106,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.00008367997439193118,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.893033981323242,\\\"token\\\":{\\\"token\\\":\\\"mdir\\\",\\\"bytes\\\":\\\"bWRpcg==\\\",\\\"prob\\\":0.9999915822424559,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mdir\\\",\\\"bytes\\\":\\\"bWRpcg==\\\",\\\"prob\\\":0.9999915822424559,\\\"masked\\\":false},{\\\"token\\\":\\\"md\\\",\\\"bytes\\\":\\\"bWQ=\\\",\\\"prob\\\":0.0000054290227619364185,\\\"masked\\\":false},{\\\"token\\\":\\\"mm\\\",\\\"bytes\\\":\\\"bW0=\\\",\\\"prob\\\":0.0000015556426700883423,\\\"masked\\\":false},{\\\"token\\\":\\\"mi\\\",\\\"bytes\\\":\\\"bWk=\\\",\\\"prob\\\":4.457568559053923e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":2.703792165563842e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.858049392700195,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":3.6599750743165615e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":2.65199875084463e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.4966013737429372e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":4.8593200677600996e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.428760528564453,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999949195766293,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999949195766293,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000004791176141988272,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":2.7038024786626765e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":1.4195965088192041e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":4.0677392603893067e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"8\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.522199630737305,\\\"token\\\":{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":7.59908845245546e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":7.857719371013889e-13,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":5.400736264639702e-13,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.318849563598633,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":2.467350602608995e-10,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":4.2883904879354975e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":1.228803694802331e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.905981063842773,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":1.419604630996593e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":6.239328742665511e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.0258497620352057e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"touch\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.206937789916992,\\\"token\\\":{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.822436974405684,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.822436974405684,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.14294404863615515,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.024844458579582732,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.003810761892373183,\\\"masked\\\":false},{\\\"token\\\":\\\"man\\\",\\\"bytes\\\":\\\"bWFu\\\",\\\"prob\\\":0.003363029152877572,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":99.21932220458984,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":1.447341866024351e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":4.954264885388611e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":9.757169797073694e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":2.467350602608995e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.8618106842041016,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999901519605706,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999901519605706,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000008950472747673159,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":8.327286851312913e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":2.651973462156569e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":1.419591094060095e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"9\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5060901641845703,\\\"token\\\":{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":7.2081326047957045e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":2.0654322413773943e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\",\\\"bytes\\\":\\\"ICA=\\\",\\\"prob\\\":9.077816786640895e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"0\\\",\\\"bytes\\\":\\\"MA==\\\",\\\"prob\\\":6.239328742665511e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.9497871398925781,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":1.419604630996593e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.392398959537226e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":8.445764430227924e-12,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":7.453457549798402e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0581016540527344,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":3.4051455349565234e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":1.320763194417195e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":4.8593200677600996e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":2.29555877213595e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"chmod\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2979507446289062,\\\"token\\\":{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.5873820052085664,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.5873820052085664,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.3562836863837281,\\\"masked\\\":false},{\\\"token\\\":\\\"man\\\",\\\"bytes\\\":\\\"bWFu\\\",\\\"prob\\\":0.03756078578792441,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.007397403512378887,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.00652827029616284,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.9811859130859375,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999996872161573,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999996872161573,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":2.1057881110766744e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":1.9591704419834725e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1.6086019431052043e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"'\\\",\\\"bytes\\\":\\\"Jw==\\\",\\\"prob\\\":3.16805876509952e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.249074935913086,\\\"token\\\":{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999859803142557,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.9999859803142557,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\\n\\\",\\\"bytes\\\":\\\"ICAgCg==\\\",\\\"prob\\\":0.000013022292575948932,\\\"masked\\\":false},{\\\"token\\\":\\\"    \\\\n\\\",\\\"bytes\\\":\\\"ICAgIAo=\\\",\\\"prob\\\":9.435884929079391e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":3.0050292169230343e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"     \\\\n\\\",\\\"bytes\\\":\\\"ICAgICAK\\\",\\\"prob\\\":1.8227368455172784e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"10\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6529560089111328,\\\"token\\\":{\\\"token\\\":\\\"10\\\",\\\"bytes\\\":\\\"MTA=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"10\\\",\\\"bytes\\\":\\\"MTA=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" ten\\\",\\\"bytes\\\":\\\"IHRlbg==\\\",\\\"prob\\\":1.9216243913340831e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"0\\\",\\\"bytes\\\":\\\"MA==\\\",\\\"prob\\\":4.2883904879354975e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" tenth\\\",\\\"bytes\\\":\\\"IHRlbnRo\\\",\\\"prob\\\":1.5777742781219638e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.750946044921875,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":5.613844832063757e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" .\\\",\\\"bytes\\\":\\\"IC4=\\\",\\\"prob\\\":1.7878293111700144e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":2.135728125041575e-12,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":1.6633498514554145e-12,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.856866836547852,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":4.372180081359945e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":1.320763194417195e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":9.077816786640895e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":4.2883904879354975e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"grep\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.225048065185547,\\\"token\\\":{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.2714143732157277,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"man\\\",\\\"bytes\\\":\\\"bWFu\\\",\\\"prob\\\":0.2714143732157277,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.2714143732157277,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.21138320560462573,\\\"masked\\\":false},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":0.09985812112425596,\\\"masked\\\":false},{\\\"token\\\":\\\"ps\\\",\\\"bytes\\\":\\\"cHM=\\\",\\\"prob\\\":0.088125624737817,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.979061126708984,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":2.2200021830278593e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":1.9591704419834725e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"}\\\",\\\"bytes\\\":\\\"In0=\\\",\\\"prob\\\":5.91832944483151e-10,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":4.0677625338333027e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"  \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.671937942504883,\\\"token\\\":{\\\"token\\\":\\\"  \\\",\\\"bytes\\\":\\\"ICA=\\\",\\\"prob\\\":0.9623864756652881,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"  \\\",\\\"bytes\\\":\\\"ICA=\\\",\\\"prob\\\":0.9623864756652881,\\\"masked\\\":false},{\\\"token\\\":\\\"<|end|>\\\",\\\"bytes\\\":\\\"\\\",\\\"prob\\\":0.037328347974094296,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\\n\\\",\\\"bytes\\\":\\\"ICAK\\\",\\\"prob\\\":0.00019598780155183782,\\\"masked\\\":false},{\\\"token\\\":\\\"   \\\",\\\"bytes\\\":\\\"ICAg\\\",\\\"prob\\\":0.000056158723269397085,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00004373759136887284,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"If you were to guess, which of the above commands would a sys admin think was the coolest? Just name the command, don't print anything else.\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5657672882080078,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999902711499675,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999902711499675,\\\"masked\\\":false},{\\\"token\\\":\\\"“\\\",\\\"bytes\\\":\\\"4oCc\\\",\\\"prob\\\":0.000006151803146895858,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"github\\\",\\\"bytes\\\":\\\"ImdpdGh1Yg==\\\",\\\"prob\\\":8.327286851312913e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":8.327286851312913e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"net\\\",\\\"bytes\\\":\\\"Im5ldA==\\\",\\\"prob\\\":5.723477507970615e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"chmod\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4162063598632812,\\\"token\\\":{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.14807318009658763,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.8519476825599805,\\\"masked\\\":false},{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.14807318009658763,\\\"masked\\\":false},{\\\"token\\\":\\\" grep\\\",\\\"bytes\\\":\\\"IGdyZXA=\\\",\\\"prob\\\":0.00000979096216954056,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.000005241064021378393,\\\"masked\\\":false},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":0.0000013253374431731878,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.2840499877929688,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999995680248992,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999995680248992,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":3.471677666470143e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":8.16777845116946e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\".\\\",\\\"bytes\\\":\\\"Ii4=\\\",\\\"prob\\\":1.2528129267684045e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\\n\\\",\\\"bytes\\\":\\\"IgoK\\\",\\\"prob\\\":9.757169797073694e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"What is that command's coolness factor on a scale from 0-10? Just write the digit and nothing else.\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"9\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6189346313476562,\\\"token\\\":{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":0.4999790469823186,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"8\\\",\\\"bytes\\\":\\\"OA==\\\",\\\"prob\\\":0.4999790469823186,\\\"masked\\\":false},{\\\"token\\\":\\\"9\\\",\\\"bytes\\\":\\\"OQ==\\\",\\\"prob\\\":0.4999790469823186,\\\"masked\\\":false},{\\\"token\\\":\\\"10\\\",\\\"bytes\\\":\\\"MTA=\\\",\\\"prob\\\":0.00010181959878164716,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.000009473030420217625,\\\"masked\\\":false},{\\\"token\\\":\\\" nine\\\",\\\"bytes\\\":\\\"IG5pbmU=\\\",\\\"prob\\\":0.0000018656646029465895,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Why is that command so cool?\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47898292541503906,\\\"token\\\":{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.9995656556532361,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.9995656556532361,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.00043090159986240316,\\\"masked\\\":false},{\\\"token\\\":\\\"As\\\",\\\"bytes\\\":\\\"QXM=\\\",\\\"prob\\\":0.000001996581730600712,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":9.431917721113391e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"“\\\",\\\"bytes\\\":\\\"4oCc\\\",\\\"prob\\\":2.3851022742196335e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8587837219238281,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9953755530208904,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9953755530208904,\\\"masked\\\":false},{\\\"token\\\":\\\" `\\\",\\\"bytes\\\":\\\"IGA=\\\",\\\"prob\\\":0.004070192160742145,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.0005509548477598374,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.0000037142296000046576,\\\"masked\\\":false},{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.0000013665303899943552,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"chmod\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.9481182098388672,\\\"token\\\":{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\" chmod\\\",\\\"bytes\\\":\\\"IGNobW9k\\\",\\\"prob\\\":1.1272201970042148e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":7.59908845245546e-10,\\\"masked\\\":false},{\\\"token\\\":\\\"cool\\\",\\\"bytes\\\":\\\"Y29vbA==\\\",\\\"prob\\\":2.9474794061194335e-11,\\\"masked\\\":false},{\\\"token\\\":\\\"sudo\\\",\\\"bytes\\\":\\\"c3Vkbw==\\\",\\\"prob\\\":1.7878293111700144e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.336812973022461,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":3.6599750743165615e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":3.7845403720221803e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" command\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.188299179077148,\\\"token\\\":{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9999970650118172,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.9999970650118172,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.000002906151425567016,\\\"masked\\\":false},{\\\"token\\\":\\\"command\\\",\\\"bytes\\\":\\\"Y29tbWFuZA==\\\",\\\"prob\\\":3.858470669649277e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" Command\\\",\\\"bytes\\\":\\\"IENvbW1hbmQ=\\\",\\\"prob\\\":2.065424363210624e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"(command\\\",\\\"bytes\\\":\\\"KGNvbW1hbmQ=\\\",\\\"prob\\\":1.2528081481709897e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.83993911743164,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.999708347340244,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.999708347340244,\\\"masked\\\":false},{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.0001796684199484263,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00006610317143062042,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00003122735545870585,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.000008947946758700266,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" considered\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.401052474975586,\\\"token\\\":{\\\"token\\\":\\\" considered\\\",\\\"bytes\\\":\\\"IGNvbnNpZGVyZWQ=\\\",\\\"prob\\\":0.9896234486330525,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" considered\\\",\\\"bytes\\\":\\\"IGNvbnNpZGVyZWQ=\\\",\\\"prob\\\":0.9896234486330525,\\\"masked\\\":false},{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.007559689023619958,\\\"masked\\\":false},{\\\"token\\\":\\\" often\\\",\\\"bytes\\\":\\\"IG9mdGVu\\\",\\\"prob\\\":0.002781342539963193,\\\"masked\\\":false},{\\\"token\\\":\\\" regarded\\\",\\\"bytes\\\":\\\"IHJlZ2FyZGVk\\\",\\\"prob\\\":0.000021246538801835304,\\\"masked\\\":false},{\\\"token\\\":\\\" particularly\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXJseQ==\\\",\\\"prob\\\":0.000011373189699326996,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" cool\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.944822311401367,\\\"token\\\":{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.999908629237317,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.999908629237317,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00007491873668874944,\\\"masked\\\":false},{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.000007898219109693567,\\\"masked\\\":false},{\\\"token\\\":\\\" particularly\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXJseQ==\\\",\\\"prob\\\":0.00000542857238311991,\\\"masked\\\":false},{\\\"token\\\":\\\" quite\\\",\\\"bytes\\\":\\\"IHF1aXRl\\\",\\\"prob\\\":9.435156133151275e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" because\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.455049514770508,\\\"token\\\":{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.848194641674306,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":0.848194641674306,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.11481447877542693,\\\"masked\\\":false},{\\\"token\\\":\\\" by\\\",\\\"bytes\\\":\\\"IGJ5\\\",\\\"prob\\\":0.0328991625489704,\\\"masked\\\":false},{\\\"token\\\":\\\" due\\\",\\\"bytes\\\":\\\"IGR1ZQ==\\\",\\\"prob\\\":0.0023838555020892585,\\\"masked\\\":false},{\\\"token\\\":\\\" primarily\\\",\\\"bytes\\\":\\\"IHByaW1hcmlseQ==\\\",\\\"prob\\\":0.0014459564098669034,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.230924606323242,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9974018324482582,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9974018324482582,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.002473850962937197,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.00012320410404719715,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.000001758186747323833,\\\"masked\\\":false},{\\\"token\\\":\\\" it's\\\",\\\"bytes\\\":\\\"IGl0J3M=\\\",\\\"prob\\\":6.468678246224551e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" allows\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.939048767089844,\\\"token\\\":{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.6543863711101914,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" allows\\\",\\\"bytes\\\":\\\"IGFsbG93cw==\\\",\\\"prob\\\":0.6543863711101914,\\\"masked\\\":false},{\\\"token\\\":\\\" provides\\\",\\\"bytes\\\":\\\"IHByb3ZpZGVz\\\",\\\"prob\\\":0.2728135575960821,\\\"masked\\\":false},{\\\"token\\\":\\\" gives\\\",\\\"bytes\\\":\\\"IGdpdmVz\\\",\\\"prob\\\":0.032590112725542755,\\\"masked\\\":false},{\\\"token\\\":\\\" empowers\\\",\\\"bytes\\\":\\\"IGVtcG93ZXJz\\\",\\\"prob\\\":0.011990475616461646,\\\"masked\\\":false},{\\\"token\\\":\\\" grants\\\",\\\"bytes\\\":\\\"IGdyYW50cw==\\\",\\\"prob\\\":0.011990475616461646,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" users\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.538909912109375,\\\"token\\\":{\\\"token\\\":\\\" users\\\",\\\"bytes\\\":\\\"IHVzZXJz\\\",\\\"prob\\\":0.18562224075137046,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.7340455026001057,\\\"masked\\\":false},{\\\"token\\\":\\\" users\\\",\\\"bytes\\\":\\\"IHVzZXJz\\\",\\\"prob\\\":0.18562224075137046,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.032262162124253105,\\\"masked\\\":false},{\\\"token\\\":\\\" sys\\\",\\\"bytes\\\":\\\"IHN5cw==\\\",\\\"prob\\\":0.02512644842187592,\\\"masked\\\":false},{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.019569004949689398,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4090538024902344,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.08511310092485128,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9148266914206568,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.08511310092485128,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00007766941598623454,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00001051359237360644,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":7.618093914724381e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.813215255737305,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.8381033914997663,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.8381033914997663,\\\"masked\\\":false},{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.14566695335315755,\\\"masked\\\":false},{\\\"token\\\":\\\" sys\\\",\\\"bytes\\\":\\\"IHN5cw==\\\",\\\"prob\\\":0.015356769744783463,\\\"masked\\\":false},{\\\"token\\\":\\\" systems\\\",\\\"bytes\\\":\\\"IHN5c3RlbXM=\\\",\\\"prob\\\":0.0008666279608531907,\\\"masked\\\":false},{\\\"token\\\":\\\" admins\\\",\\\"bytes\\\":\\\"IGFkbWlucw==\\\",\\\"prob\\\":0.00005541747102700415,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" administrators\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.638879776000977,\\\"token\\\":{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.9997384870946984,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.9997384870946984,\\\"masked\\\":false},{\\\"token\\\":\\\" admins\\\",\\\"bytes\\\":\\\"IGFkbWlucw==\\\",\\\"prob\\\":0.0002614138211953149,\\\"masked\\\":false},{\\\"token\\\":\\\" Administr\\\",\\\"bytes\\\":\\\"IEFkbWluaXN0cg==\\\",\\\"prob\\\":1.1269257157565767e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" admin\\\",\\\"bytes\\\":\\\"IGFkbWlu\\\",\\\"prob\\\":6.835504336206437e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" administration\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0aW9u\\\",\\\"prob\\\":2.219422217361564e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.20085334777832,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9998635873862439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.9998635873862439,\\\"masked\\\":false},{\\\"token\\\":\\\" fine\\\",\\\"bytes\\\":\\\"IGZpbmU=\\\",\\\"prob\\\":0.000051490538835143,\\\"masked\\\":false},{\\\"token\\\":\\\" significant\\\",\\\"bytes\\\":\\\"IHNpZ25pZmljYW50\\\",\\\"prob\\\":0.000027562685449832376,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.000018944274773783296,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.000014754198468163915,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" control\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.664058685302734,\\\"token\\\":{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.7906081596122069,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.7906081596122069,\\\"masked\\\":false},{\\\"token\\\":\\\" manage\\\",\\\"bytes\\\":\\\"IG1hbmFnZQ==\\\",\\\"prob\\\":0.15570621635210488,\\\"masked\\\":false},{\\\"token\\\":\\\" set\\\",\\\"bytes\\\":\\\"IHNldA==\\\",\\\"prob\\\":0.01860055117067594,\\\"masked\\\":false},{\\\"token\\\":\\\" define\\\",\\\"bytes\\\":\\\"IGRlZmluZQ==\\\",\\\"prob\\\":0.009956802797350811,\\\"masked\\\":false},{\\\"token\\\":\\\" finely\\\",\\\"bytes\\\":\\\"IGZpbmVseQ==\\\",\\\"prob\\\":0.007754566819511228,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" permissions\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.839057922363281,\\\"token\\\":{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.02519282117163283,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.5732001782033053,\\\"masked\\\":false},{\\\"token\\\":\\\" access\\\",\\\"bytes\\\":\\\"IGFjY2Vzcw==\\\",\\\"prob\\\":0.34768152703889654,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.041533786878593174,\\\"masked\\\":false},{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.02519282117163283,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.011901168690737103,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" on\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.370079040527344,\\\"token\\\":{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.4184622573658782,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.4184622573658782,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.3259071620514539,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.25382333230077625,\\\"masked\\\":false},{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.0011760907610296732,\\\"masked\\\":false},{\\\"token\\\":\\\" effectively\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZWx5\\\",\\\"prob\\\":0.00020441101589759465,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.71186637878418,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.9999778754514779,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.9999778754514779,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.000013022193234421348,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.000007898768931814198,\\\"masked\\\":false},{\\\"token\\\":\\\" their\\\",\\\"bytes\\\":\\\"IHRoZWly\\\",\\\"prob\\\":3.4716015256546423e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" filesystem\\\",\\\"bytes\\\":\\\"IGZpbGVzeXN0ZW0=\\\",\\\"prob\\\":1.858334813025294e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.32710075378418,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":9.947812251992413e-8,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":8.16777845116946e-9,\\\"masked\\\":false},{\\\"token\\\":\\\" и\\\",\\\"bytes\\\":\\\"INC4\\\",\\\"prob\\\":3.4051455349565234e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"/direct\\\",\\\"bytes\\\":\\\"L2RpcmVjdA==\\\",\\\"prob\\\":6.706258937891248e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.432077407836914,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9999982569219407,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9999982569219407,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.0000010692252379701795,\\\"masked\\\":false},{\\\"token\\\":\\\"directories\\\",\\\"bytes\\\":\\\"ZGlyZWN0b3JpZXM=\\\",\\\"prob\\\":5.051055168594771e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"Directories\\\",\\\"bytes\\\":\\\"RGlyZWN0b3JpZXM=\\\",\\\"prob\\\":6.837277508126906e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":1.728980957668829e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.595870971679688,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.23098607026618742,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.554056508854788,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.23098607026618742,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.2038471335006578,\\\"masked\\\":false},{\\\"token\\\":\\\" with\\\",\\\"bytes\\\":\\\"IHdpdGg=\\\",\\\"prob\\\":0.005434383613950817,\\\"masked\\\":false},{\\\"token\\\":\\\" at\\\",\\\"bytes\\\":\\\"IGF0\\\",\\\"prob\\\":0.002265593662819784,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.756824493408203,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.991796853783408,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.991796853783408,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.005207305985919013,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.0013168008581935374,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.0009050583015713998,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.0004275525165034799,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" flexible\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.520147323608398,\\\"token\\\":{\\\"token\\\":\\\" flexible\\\",\\\"bytes\\\":\\\"IGZsZXhpYmxl\\\",\\\"prob\\\":0.4175817409436673,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" flexible\\\",\\\"bytes\\\":\\\"IGZsZXhpYmxl\\\",\\\"prob\\\":0.4175817409436673,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.4175817409436673,\\\"masked\\\":false},{\\\"token\\\":\\\" highly\\\",\\\"bytes\\\":\\\"IGhpZ2hseQ==\\\",\\\"prob\\\":0.04402306585884131,\\\"masked\\\":false},{\\\"token\\\":\\\" very\\\",\\\"bytes\\\":\\\"IHZlcnk=\\\",\\\"prob\\\":0.0388507227855511,\\\"masked\\\":false},{\\\"token\\\":\\\" powerful\\\",\\\"bytes\\\":\\\"IHBvd2VyZnVs\\\",\\\"prob\\\":0.026702723468262038,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.245965957641602,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7362093549270323,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7362093549270323,\\\"masked\\\":false},{\\\"token\\\":\\\" way\\\",\\\"bytes\\\":\\\"IHdheQ==\\\",\\\"prob\\\":0.18616941524071676,\\\"masked\\\":false},{\\\"token\\\":\\\" manner\\\",\\\"bytes\\\":\\\"IG1hbm5lcg==\\\",\\\"prob\\\":0.07761399955230508,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0000802555505913274,\\\"masked\\\":false},{\\\"token\\\":\\\" yet\\\",\\\"bytes\\\":\\\"IHlldA==\\\",\\\"prob\\\":0.0000021395419869722584,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" powerful\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.764982223510742,\\\"token\\\":{\\\"token\\\":\\\" powerful\\\",\\\"bytes\\\":\\\"IHBvd2VyZnVs\\\",\\\"prob\\\":0.704589841472089,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" powerful\\\",\\\"bytes\\\":\\\"IHBvd2VyZnVs\\\",\\\"prob\\\":0.704589841472089,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.2592309939190909,\\\"masked\\\":false},{\\\"token\\\":\\\" precise\\\",\\\"bytes\\\":\\\"IHByZWNpc2U=\\\",\\\"prob\\\":0.024118173985470316,\\\"masked\\\":false},{\\\"token\\\":\\\" detailed\\\",\\\"bytes\\\":\\\"IGRldGFpbGVk\\\",\\\"prob\\\":0.005382329053070539,\\\"masked\\\":false},{\\\"token\\\":\\\" nuanced\\\",\\\"bytes\\\":\\\"IG51YW5jZWQ=\\\",\\\"prob\\\":0.003264716836854989,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" way\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.321016311645508,\\\"token\\\":{\\\"token\\\":\\\" way\\\",\\\"bytes\\\":\\\"IHdheQ==\\\",\\\"prob\\\":0.9525787974800486,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" way\\\",\\\"bytes\\\":\\\"IHdheQ==\\\",\\\"prob\\\":0.9525787974800486,\\\"masked\\\":false},{\\\"token\\\":\\\" manner\\\",\\\"bytes\\\":\\\"IG1hbm5lcg==\\\",\\\"prob\\\":0.04744085649983044,\\\"masked\\\":false},{\\\"token\\\":\\\" ways\\\",\\\"bytes\\\":\\\"IHdheXM=\\\",\\\"prob\\\":1.0737657237848057e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" fashion\\\",\\\"bytes\\\":\\\"IGZhc2hpb24=\\\",\\\"prob\\\":1.4534852594520245e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"way\\\",\\\"bytes\\\":\\\"d2F5\\\",\\\"prob\\\":5.347627886136956e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.253223419189453,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998414247410419,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998414247410419,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.0001585800482034777,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":6.836208334711394e-8,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":6.033010871340906e-8,\\\"masked\\\":false},{\\\"token\\\":\\\";\\\",\\\"bytes\\\":\\\"Ow==\\\",\\\"prob\\\":2.2196507988745055e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" This\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.527755737304688,\\\"token\\\":{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.20838500439039054,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.44111672748083564,\\\"masked\\\":false},{\\\"token\\\":\\\" This\\\",\\\"bytes\\\":\\\"IFRoaXM=\\\",\\\"prob\\\":0.20838500439039054,\\\"masked\\\":false},{\\\"token\\\":\\\" By\\\",\\\"bytes\\\":\\\"IEJ5\\\",\\\"prob\\\":0.20838500439039054,\\\"masked\\\":false},{\\\"token\\\":\\\" With\\\",\\\"bytes\\\":\\\"IFdpdGg=\\\",\\\"prob\\\":0.09844176101584706,\\\"masked\\\":false},{\\\"token\\\":\\\" Here\\\",\\\"bytes\\\":\\\"IEhlcmU=\\\",\\\"prob\\\":0.02820769237303196,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" capability\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.15505599975586,\\\"token\\\":{\\\"token\\\":\\\" capability\\\",\\\"bytes\\\":\\\"IGNhcGFiaWxpdHk=\\\",\\\"prob\\\":0.3706252638152493,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" capability\\\",\\\"bytes\\\":\\\"IGNhcGFiaWxpdHk=\\\",\\\"prob\\\":0.3706252638152493,\\\"masked\\\":false},{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.2547366746466537,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.17508459283655878,\\\"masked\\\":false},{\\\"token\\\":\\\" ability\\\",\\\"bytes\\\":\\\"IGFiaWxpdHk=\\\",\\\"prob\\\":0.09372210251900431,\\\"masked\\\":false},{\\\"token\\\":\\\" enables\\\",\\\"bytes\\\":\\\"IGVuYWJsZXM=\\\",\\\"prob\\\":0.04427462928567616,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.92511749267578,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.7394296178321323,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.7394296178321323,\\\"masked\\\":false},{\\\"token\\\":\\\" enables\\\",\\\"bytes\\\":\\\"IGVuYWJsZXM=\\\",\\\"prob\\\":0.12851690988996778,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.11341724484615902,\\\"masked\\\":false},{\\\"token\\\":\\\" ensures\\\",\\\"bytes\\\":\\\"IGVuc3VyZXM=\\\",\\\"prob\\\":0.0030236034219082754,\\\"masked\\\":false},{\\\"token\\\":\\\" includes\\\",\\\"bytes\\\":\\\"IGluY2x1ZGVz\\\",\\\"prob\\\":0.0020781710162400065,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" crucial\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.066001892089844,\\\"token\\\":{\\\"token\\\":\\\" crucial\\\",\\\"bytes\\\":\\\"IGNydWNpYWw=\\\",\\\"prob\\\":0.30322310621179727,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" essential\\\",\\\"bytes\\\":\\\"IGVzc2VudGlhbA==\\\",\\\"prob\\\":0.6418733856875329,\\\"masked\\\":false},{\\\"token\\\":\\\" crucial\\\",\\\"bytes\\\":\\\"IGNydWNpYWw=\\\",\\\"prob\\\":0.30322310621179727,\\\"masked\\\":false},{\\\"token\\\":\\\" fundamental\\\",\\\"bytes\\\":\\\"IGZ1bmRhbWVudGFs\\\",\\\"prob\\\":0.03196693694839499,\\\"masked\\\":false},{\\\"token\\\":\\\" critical\\\",\\\"bytes\\\":\\\"IGNyaXRpY2Fs\\\",\\\"prob\\\":0.015101282486670692,\\\"masked\\\":false},{\\\"token\\\":\\\" vital\\\",\\\"bytes\\\":\\\"IHZpdGFs\\\",\\\"prob\\\":0.006295722262672446,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.131006240844727,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9902866229569411,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9902866229569411,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.009713085728860614,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.000004187202511768881,\\\"masked\\\":false},{\\\"token\\\":\\\" when\\\",\\\"bytes\\\":\\\"IHdoZW4=\\\",\\\"prob\\\":0.0000010588415345356952,\\\"masked\\\":false},{\\\"token\\\":\\\" because\\\",\\\"bytes\\\":\\\"IGJlY2F1c2U=\\\",\\\"prob\\\":3.4379561636236834e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" managing\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.129068374633789,\\\"token\\\":{\\\"token\\\":\\\" managing\\\",\\\"bytes\\\":\\\"IG1hbmFnaW5n\\\",\\\"prob\\\":0.11654136774286501,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" maintaining\\\",\\\"bytes\\\":\\\"IG1haW50YWluaW5n\\\",\\\"prob\\\":0.5917462259266744,\\\"masked\\\":false},{\\\"token\\\":\\\" security\\\",\\\"bytes\\\":\\\"IHNlY3VyaXR5\\\",\\\"prob\\\":0.1921342710050359,\\\"masked\\\":false},{\\\"token\\\":\\\" managing\\\",\\\"bytes\\\":\\\"IG1hbmFnaW5n\\\",\\\"prob\\\":0.11654136774286501,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.03783985615226261,\\\"masked\\\":false},{\\\"token\\\":\\\" securing\\\",\\\"bytes\\\":\\\"IHNlY3VyaW5n\\\",\\\"prob\\\":0.020255528028770186,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" security\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.96961784362793,\\\"token\\\":{\\\"token\\\":\\\" security\\\",\\\"bytes\\\":\\\"IHNlY3VyaXR5\\\",\\\"prob\\\":0.9803284503018833,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" security\\\",\\\"bytes\\\":\\\"IHNlY3VyaXR5\\\",\\\"prob\\\":0.9803284503018833,\\\"masked\\\":false},{\\\"token\\\":\\\" access\\\",\\\"bytes\\\":\\\"IGFjY2Vzcw==\\\",\\\"prob\\\":0.01585231002179841,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.0035376786335486344,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.00009431138303984017,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.00007345168288534811,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.427091598510742,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7405466370347831,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.7405466370347831,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.24044832399073046,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.017422759497485812,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.0008676979761824189,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.0005963827041227357,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" access\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.852958679199219,\\\"token\\\":{\\\"token\\\":\\\" access\\\",\\\"bytes\\\":\\\"IGFjY2Vzcw==\\\",\\\"prob\\\":0.980007687062582,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" access\\\",\\\"bytes\\\":\\\"IGFjY2Vzcw==\\\",\\\"prob\\\":0.980007687062582,\\\"masked\\\":false},{\\\"token\\\":\\\" ensuring\\\",\\\"bytes\\\":\\\"IGVuc3VyaW5n\\\",\\\"prob\\\":0.010891983257046824,\\\"masked\\\":false},{\\\"token\\\":\\\" accessibility\\\",\\\"bytes\\\":\\\"IGFjY2Vzc2liaWxpdHk=\\\",\\\"prob\\\":0.003536521731655562,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.0024307079783601536,\\\"masked\\\":false},{\\\"token\\\":\\\" collaboration\\\",\\\"bytes\\\":\\\"IGNvbGxhYm9yYXRpb24=\\\",\\\"prob\\\":0.0018930863471483042,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" rights\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.293193817138672,\\\"token\\\":{\\\"token\\\":\\\" rights\\\",\\\"bytes\\\":\\\"IHJpZ2h0cw==\\\",\\\"prob\\\":0.20209630151520996,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.294036950780871,\\\"masked\\\":false},{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.22900214342321498,\\\"masked\\\":false},{\\\"token\\\":\\\" rights\\\",\\\"bytes\\\":\\\"IHJpZ2h0cw==\\\",\\\"prob\\\":0.20209630151520996,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.17835167162887886,\\\"masked\\\":false},{\\\"token\\\":\\\" levels\\\",\\\"bytes\\\":\\\"IGxldmVscw==\\\",\\\"prob\\\":0.03512543992913728,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" within\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.257980346679688,\\\"token\\\":{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.14934999119315742,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.7583340357305656,\\\"masked\\\":false},{\\\"token\\\":\\\" within\\\",\\\"bytes\\\":\\\"IHdpdGhpbg==\\\",\\\"prob\\\":0.14934999119315742,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.06226398753315362,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.029413712366507687,\\\"masked\\\":false},{\\\"token\\\":\\\" effectively\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZWx5\\\",\\\"prob\\\":0.00037043199191488536,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.648965835571289,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.14776700710797583,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.8501861237380393,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.14776700710797583,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0007758322920987286,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.0005332419493972711,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.0004705904677354408,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.402824401855469,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.8066582904320582,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.8066582904320582,\\\"masked\\\":false},{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.08504099896579921,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.07504939085388729,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.014780587879332214,\\\"masked\\\":false},{\\\"token\\\":\\\" filesystem\\\",\\\"bytes\\\":\\\"IGZpbGVzeXN0ZW0=\\\",\\\"prob\\\":0.008965344487948432,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.489246368408203,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6508506242835855,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.6508506242835855,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.348397811283182,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":0.00046256502887473817,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.00024760926335976323,\\\"masked\\\":false},{\\\"token\\\":\\\";\\\",\\\"bytes\\\":\\\"Ow==\\\",\\\"prob\\\":0.00003351721948514323,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" It\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.803844451904297,\\\"token\\\":{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.19746048132574523,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" By\\\",\\\"bytes\\\":\\\"IEJ5\\\",\\\"prob\\\":0.4736401260663806,\\\"masked\\\":false},{\\\"token\\\":\\\" It\\\",\\\"bytes\\\":\\\"IEl0\\\",\\\"prob\\\":0.19746048132574523,\\\"masked\\\":false},{\\\"token\\\":\\\" With\\\",\\\"bytes\\\":\\\"IFdpdGg=\\\",\\\"prob\\\":0.19746048132574523,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.08232124320419781,\\\"masked\\\":false},{\\\"token\\\":\\\" Here\\\",\\\"bytes\\\":\\\"IEhlcmU=\\\",\\\"prob\\\":0.01621274530997453,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" provides\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.23207664489746,\\\"token\\\":{\\\"token\\\":\\\" provides\\\",\\\"bytes\\\":\\\"IHByb3ZpZGVz\\\",\\\"prob\\\":0.011139890126528463,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" enables\\\",\\\"bytes\\\":\\\"IGVuYWJsZXM=\\\",\\\"prob\\\":0.8845499492492739,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.034309283209841564,\\\"masked\\\":false},{\\\"token\\\":\\\" empowers\\\",\\\"bytes\\\":\\\"IGVtcG93ZXJz\\\",\\\"prob\\\":0.03027822858204725,\\\"masked\\\":false},{\\\"token\\\":\\\" provides\\\",\\\"bytes\\\":\\\"IHByb3ZpZGVz\\\",\\\"prob\\\":0.011139890126528463,\\\"masked\\\":false},{\\\"token\\\":\\\" lets\\\",\\\"bytes\\\":\\\"IGxldHM=\\\",\\\"prob\\\":0.009831045946572477,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" fine\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.400959014892578,\\\"token\\\":{\\\"token\\\":\\\" fine\\\",\\\"bytes\\\":\\\"IGZpbmU=\\\",\\\"prob\\\":0.20517140270535325,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.4921359585396964,\\\"masked\\\":false},{\\\"token\\\":\\\" fine\\\",\\\"bytes\\\":\\\"IGZpbmU=\\\",\\\"prob\\\":0.20517140270535325,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.15979179101094854,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.10982745498497043,\\\"masked\\\":false},{\\\"token\\\":\\\" various\\\",\\\"bytes\\\":\\\"IHZhcmlvdXM=\\\",\\\"prob\\\":0.005469686803358855,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-gr\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.509958267211914,\\\"token\\\":{\\\"token\\\":\\\"-gr\\\",\\\"bytes\\\":\\\"LWdy\\\",\\\"prob\\\":0.9911260458123781,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-gr\\\",\\\"bytes\\\":\\\"LWdy\\\",\\\"prob\\\":0.9911260458123781,\\\"masked\\\":false},{\\\"token\\\":\\\"-t\\\",\\\"bytes\\\":\\\"LXQ=\\\",\\\"prob\\\":0.008579144782969998,\\\"masked\\\":false},{\\\"token\\\":\\\" gran\\\",\\\"bytes\\\":\\\"IGdyYW4=\\\",\\\"prob\\\":0.000259161632311114,\\\"masked\\\":false},{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.000021278797208267155,\\\"masked\\\":false},{\\\"token\\\":\\\" granular\\\",\\\"bytes\\\":\\\"IGdyYW51bGFy\\\",\\\"prob\\\":0.000016572373496665013,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ained\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.014181137084961,\\\"token\\\":{\\\"token\\\":\\\"ained\\\",\\\"bytes\\\":\\\"YWluZWQ=\\\",\\\"prob\\\":0.9999754916812374,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ained\\\",\\\"bytes\\\":\\\"YWluZWQ=\\\",\\\"prob\\\":0.9999754916812374,\\\"masked\\\":false},{\\\"token\\\":\\\"ain\\\",\\\"bytes\\\":\\\"YWlu\\\",\\\"prob\\\":0.000024327013763060332,\\\"masked\\\":false},{\\\"token\\\":\\\"an\\\",\\\"bytes\\\":\\\"YW4=\\\",\\\"prob\\\":6.033816335440224e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"aned\\\",\\\"bytes\\\":\\\"YW5lZA==\\\",\\\"prob\\\":5.6137056499513555e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"aining\\\",\\\"bytes\\\":\\\"YWluaW5n\\\",\\\"prob\\\":1.6085620615938422e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" control\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.861106872558594,\\\"token\\\":{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.9988353385571773,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" control\\\",\\\"bytes\\\":\\\"IGNvbnRyb2w=\\\",\\\"prob\\\":0.9988353385571773,\\\"masked\\\":false},{\\\"token\\\":\\\" access\\\",\\\"bytes\\\":\\\"IGFjY2Vzcw==\\\",\\\"prob\\\":0.0010328302393944589,\\\"masked\\\":false},{\\\"token\\\":\\\" permission\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb24=\\\",\\\"prob\\\":0.000058285666787312615,\\\"masked\\\":false},{\\\"token\\\":\\\" controls\\\",\\\"bytes\\\":\\\"IGNvbnRyb2xz\\\",\\\"prob\\\":0.000031200091050435366,\\\"masked\\\":false},{\\\"token\\\":\\\" management\\\",\\\"bytes\\\":\\\"IG1hbmFnZW1lbnQ=\\\",\\\"prob\\\":0.00001670128755852807,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" over\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.661985397338867,\\\"token\\\":{\\\"token\\\":\\\" over\\\",\\\"bytes\\\":\\\"IG92ZXI=\\\",\\\"prob\\\":0.9641309581786172,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" over\\\",\\\"bytes\\\":\\\"IG92ZXI=\\\",\\\"prob\\\":0.9641309581786172,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.03300229405873133,\\\"masked\\\":false},{\\\"token\\\":\\\" by\\\",\\\"bytes\\\":\\\"IGJ5\\\",\\\"prob\\\":0.0016435986370741417,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.0008798119667088926,\\\"masked\\\":false},{\\\"token\\\":\\\"—\\\",\\\"bytes\\\":\\\"4oCU\\\",\\\"prob\\\":0.00006375068345667025,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" who\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.533954620361328,\\\"token\\\":{\\\"token\\\":\\\" who\\\",\\\"bytes\\\":\\\"IHdobw==\\\",\\\"prob\\\":0.9986600793592446,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" who\\\",\\\"bytes\\\":\\\"IHdobw==\\\",\\\"prob\\\":0.9986600793592446,\\\"masked\\\":false},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.0009113213878216846,\\\"masked\\\":false},{\\\"token\\\":\\\" what\\\",\\\"bytes\\\":\\\"IHdoYXQ=\\\",\\\"prob\\\":0.00020337491492151066,\\\"masked\\\":false},{\\\"token\\\":\\\" read\\\",\\\"bytes\\\":\\\"IHJlYWQ=\\\",\\\"prob\\\":0.00009607497828305733,\\\"masked\\\":false},{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.00007482520784455873,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" can\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.830879211425781,\\\"token\\\":{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.9999968266298266,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.9999968266298266,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.000002906151425567016,\\\"masked\\\":false},{\\\"token\\\":\\\" has\\\",\\\"bytes\\\":\\\"IGhhcw==\\\",\\\"prob\\\":1.1272158974544541e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":2.8504544675330104e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"can\\\",\\\"bytes\\\":\\\"Y2Fu\\\",\\\"prob\\\":2.5155498412139758e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" read\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.806913375854492,\\\"token\\\":{\\\"token\\\":\\\" read\\\",\\\"bytes\\\":\\\"IHJlYWQ=\\\",\\\"prob\\\":0.9999915822424559,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" read\\\",\\\"bytes\\\":\\\"IHJlYWQ=\\\",\\\"prob\\\":0.9999915822424559,\\\"masked\\\":false},{\\\"token\\\":\\\" view\\\",\\\"bytes\\\":\\\"IHZpZXc=\\\",\\\"prob\\\":0.000004228236777300114,\\\"masked\\\":false},{\\\"token\\\":\\\" execute\\\",\\\"bytes\\\":\\\"IGV4ZWN1dGU=\\\",\\\"prob\\\":0.0000017627512387901481,\\\"masked\\\":false},{\\\"token\\\":\\\"read\\\",\\\"bytes\\\":\\\"cmVhZA==\\\",\\\"prob\\\":9.43593891620231e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" Read\\\",\\\"bytes\\\":\\\"IFJlYWQ=\\\",\\\"prob\\\":5.051021452772377e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.844064712524414,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":1,\\\"masked\\\":false},{\\\"token\\\":\\\" from\\\",\\\"bytes\\\":\\\"IGZyb20=\\\",\\\"prob\\\":1.9591704419834725e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":1.728984255099512e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":1.5258430253549292e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"/write\\\",\\\"bytes\\\":\\\"L3dyaXRl\\\",\\\"prob\\\":4.6093190830331293e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" write\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.46390151977539,\\\"token\\\":{\\\"token\\\":\\\" write\\\",\\\"bytes\\\":\\\"IHdyaXRl\\\",\\\"prob\\\":0.999985622745823,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" write\\\",\\\"bytes\\\":\\\"IHdyaXRl\\\",\\\"prob\\\":0.999985622745823,\\\"masked\\\":false},{\\\"token\\\":\\\" modify\\\",\\\"bytes\\\":\\\"IG1vZGlmeQ==\\\",\\\"prob\\\":0.000013022292575948932,\\\"masked\\\":false},{\\\"token\\\":\\\" execute\\\",\\\"bytes\\\":\\\"IGV4ZWN1dGU=\\\",\\\"prob\\\":9.435884929079391e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"write\\\",\\\"bytes\\\":\\\"d3JpdGU=\\\",\\\"prob\\\":2.3861054844915835e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" edit\\\",\\\"bytes\\\":\\\"IGVkaXQ=\\\",\\\"prob\\\":1.4473211639276584e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.220123291015625,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9999608316186489,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9999608316186489,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.000035393713695576384,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.000003731340359285637,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":7.207843923652758e-9,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":1.822688178888714e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.397932052612305,\\\"token\\\":{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.988983454077074,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.988983454077074,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.010991740997335915,\\\"masked\\\":false},{\\\"token\\\":\\\" execute\\\",\\\"bytes\\\":\\\"IGV4ZWN1dGU=\\\",\\\"prob\\\":0.000030892350494482465,\\\"masked\\\":false},{\\\"token\\\":\\\"or\\\",\\\"bytes\\\":\\\"b3I=\\\",\\\"prob\\\":5.96749811110942e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" modify\\\",\\\"bytes\\\":\\\"IG1vZGlmeQ==\\\",\\\"prob\\\":3.619658212112648e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" execute\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.027978897094727,\\\"token\\\":{\\\"token\\\":\\\" execute\\\",\\\"bytes\\\":\\\"IGV4ZWN1dGU=\\\",\\\"prob\\\":0.9999995680248992,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" execute\\\",\\\"bytes\\\":\\\"IGV4ZWN1dGU=\\\",\\\"prob\\\":0.9999995680248992,\\\"masked\\\":false},{\\\"token\\\":\\\"execute\\\",\\\"bytes\\\":\\\"ZXhlY3V0ZQ==\\\",\\\"prob\\\":3.471677666470143e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"Execute\\\",\\\"bytes\\\":\\\"RXhlY3V0ZQ==\\\",\\\"prob\\\":2.2200021830278593e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"_execute\\\",\\\"bytes\\\":\\\"X2V4ZWN1dGU=\\\",\\\"prob\\\":1.728984255099512e-8,\\\"masked\\\":false},{\\\"token\\\":\\\" Execute\\\",\\\"bytes\\\":\\\"IEV4ZWN1dGU=\\\",\\\"prob\\\":9.25518556401183e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":49.31497573852539,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.29298867159551834,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.70277948214102,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.29298867159551834,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.0036898556021019878,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.0003432945600176828,\\\"masked\\\":false},{\\\"token\\\":\\\" certain\\\",\\\"bytes\\\":\\\"IGNlcnRhaW4=\\\",\\\"prob\\\":0.00007661128430607474,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" file\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":27.491092681884766,\\\"token\\\":{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9964893809325956,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.9964893809325956,\\\"masked\\\":false},{\\\"token\\\":\\\" particular\\\",\\\"bytes\\\":\\\"IHBhcnRpY3VsYXI=\\\",\\\"prob\\\":0.0019249240635795003,\\\"masked\\\":false},{\\\"token\\\":\\\" given\\\",\\\"bytes\\\":\\\"IGdpdmVu\\\",\\\"prob\\\":0.0014991712276840416,\\\"masked\\\":false},{\\\"token\\\":\\\" specific\\\",\\\"bytes\\\":\\\"IHNwZWNpZmlj\\\",\\\"prob\\\":0.00008460266876495483,\\\"masked\\\":false},{\\\"token\\\":\\\" resource\\\",\\\"bytes\\\":\\\"IHJlc291cmNl\\\",\\\"prob\\\":0.0000017565779826485128,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.066965103149414,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9963260725216068,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9963260725216068,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0028001797817673413,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0004295049686823185,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.0004295049686823185,\\\"masked\\\":false},{\\\"token\\\":\\\"—\\\",\\\"bytes\\\":\\\"4oCU\\\",\\\"prob\\\":0.000006945271077641608,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" making\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.180131912231445,\\\"token\\\":{\\\"token\\\":\\\" making\\\",\\\"bytes\\\":\\\"IG1ha2luZw==\\\",\\\"prob\\\":0.030014986200461356,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" enabling\\\",\\\"bytes\\\":\\\"IGVuYWJsaW5n\\\",\\\"prob\\\":0.773835821117468,\\\"masked\\\":false},{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.11869465024753738,\\\"masked\\\":false},{\\\"token\\\":\\\" making\\\",\\\"bytes\\\":\\\"IG1ha2luZw==\\\",\\\"prob\\\":0.030014986200461356,\\\"masked\\\":false},{\\\"token\\\":\\\" allowing\\\",\\\"bytes\\\":\\\"IGFsbG93aW5n\\\",\\\"prob\\\":0.023376300687617646,\\\"masked\\\":false},{\\\"token\\\":\\\" thereby\\\",\\\"bytes\\\":\\\"IHRoZXJlYnk=\\\",\\\"prob\\\":0.011043041280522943,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.675058364868164,\\\"token\\\":{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9999742997982481,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.9999742997982481,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.000010141918490815365,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.000006970702871932543,\\\"masked\\\":false},{\\\"token\\\":\\\" systems\\\",\\\"bytes\\\":\\\"IHN5c3RlbXM=\\\",\\\"prob\\\":0.0000029060849166974113,\\\"masked\\\":false},{\\\"token\\\":\\\" security\\\",\\\"bytes\\\":\\\"IHNlY3VyaXR5\\\",\\\"prob\\\":0.0000015556159687100432,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" essential\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.818958282470703,\\\"token\\\":{\\\"token\\\":\\\" essential\\\",\\\"bytes\\\":\\\"IGVzc2VudGlhbA==\\\",\\\"prob\\\":0.7050324341122978,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" essential\\\",\\\"bytes\\\":\\\"IGVzc2VudGlhbA==\\\",\\\"prob\\\":0.7050324341122978,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.2020213496446978,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.05788759469566422,\\\"masked\\\":false},{\\\"token\\\":\\\" fundamental\\\",\\\"bytes\\\":\\\"IGZ1bmRhbWVudGFs\\\",\\\"prob\\\":0.01658721925809269,\\\"masked\\\":false},{\\\"token\\\":\\\" integral\\\",\\\"bytes\\\":\\\"IGludGVncmFs\\\",\\\"prob\\\":0.0069152090659305426,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.89581298828125,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9940847620480932,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.9940847620480932,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.005914186707156885,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.000004203260377343847,\\\"masked\\\":false},{\\\"token\\\":\\\" when\\\",\\\"bytes\\\":\\\"IHdoZW4=\\\",\\\"prob\\\":5.0211848237857e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" not\\\",\\\"bytes\\\":\\\"IG5vdA==\\\",\\\"prob\\\":8.727094241782958e-8,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" protecting\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.352041244506836,\\\"token\\\":{\\\"token\\\":\\\" protecting\\\",\\\"bytes\\\":\\\"IHByb3RlY3Rpbmc=\\\",\\\"prob\\\":0.45037842585838556,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" maintaining\\\",\\\"bytes\\\":\\\"IG1haW50YWluaW5n\\\",\\\"prob\\\":0.45037842585838556,\\\"masked\\\":false},{\\\"token\\\":\\\" protecting\\\",\\\"bytes\\\":\\\"IHByb3RlY3Rpbmc=\\\",\\\"prob\\\":0.45037842585838556,\\\"masked\\\":false},{\\\"token\\\":\\\" safeguarding\\\",\\\"bytes\\\":\\\"IHNhZmVndWFyZGluZw==\\\",\\\"prob\\\":0.0474806151162118,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.009351060632273844,\\\"masked\\\":false},{\\\"token\\\":\\\" securing\\\",\\\"bytes\\\":\\\"IHNlY3VyaW5n\\\",\\\"prob\\\":0.009351060632273844,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sensitive\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.778064727783203,\\\"token\\\":{\\\"token\\\":\\\" sensitive\\\",\\\"bytes\\\":\\\"IHNlbnNpdGl2ZQ==\\\",\\\"prob\\\":0.9935732088728866,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" sensitive\\\",\\\"bytes\\\":\\\"IHNlbnNpdGl2ZQ==\\\",\\\"prob\\\":0.9935732088728866,\\\"masked\\\":false},{\\\"token\\\":\\\" data\\\",\\\"bytes\\\":\\\"IGRhdGE=\\\",\\\"prob\\\":0.005911142094597785,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.0002598017472765691,\\\"masked\\\":false},{\\\"token\\\":\\\" important\\\",\\\"bytes\\\":\\\"IGltcG9ydGFudA==\\\",\\\"prob\\\":0.00010831130704653804,\\\"masked\\\":false},{\\\"token\\\":\\\" critical\\\",\\\"bytes\\\":\\\"IGNyaXRpY2Fs\\\",\\\"prob\\\":0.0000843551172897036,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" data\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.489898681640625,\\\"token\\\":{\\\"token\\\":\\\" data\\\",\\\"bytes\\\":\\\"IGRhdGE=\\\",\\\"prob\\\":0.9398804468540328,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" data\\\",\\\"bytes\\\":\\\"IGRhdGE=\\\",\\\"prob\\\":0.9398804468540328,\\\"masked\\\":false},{\\\"token\\\":\\\" information\\\",\\\"bytes\\\":\\\"IGluZm9ybWF0aW9u\\\",\\\"prob\\\":0.060101676958155915,\\\"masked\\\":false},{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.00003769614870331107,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.0000014621309212044125,\\\"masked\\\":false},{\\\"token\\\":\\\" resources\\\",\\\"bytes\\\":\\\"IHJlc291cmNlcw==\\\",\\\"prob\\\":0.000001138738223315004,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.761167526245117,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9814132078317318,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.9814132078317318,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.01586985471669948,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.002148196705242444,\\\"masked\\\":false},{\\\"token\\\":\\\" while\\\",\\\"bytes\\\":\\\"IHdoaWxl\\\",\\\"prob\\\":0.0005432266267204092,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00002107028106241825,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" maintaining\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.04582977294922,\\\"token\\\":{\\\"token\\\":\\\" maintaining\\\",\\\"bytes\\\":\\\"IG1haW50YWluaW5n\\\",\\\"prob\\\":0.27372161730167915,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" ensuring\\\",\\\"bytes\\\":\\\"IGVuc3VyaW5n\\\",\\\"prob\\\":0.6565644956166603,\\\"masked\\\":false},{\\\"token\\\":\\\" maintaining\\\",\\\"bytes\\\":\\\"IG1haW50YWluaW5n\\\",\\\"prob\\\":0.27372161730167915,\\\"masked\\\":false},{\\\"token\\\":\\\" enforcing\\\",\\\"bytes\\\":\\\"IGVuZm9yY2luZw==\\\",\\\"prob\\\":0.02247426339362334,\\\"masked\\\":false},{\\\"token\\\":\\\" configuring\\\",\\\"bytes\\\":\\\"IGNvbmZpZ3VyaW5n\\\",\\\"prob\\\":0.019833724886740556,\\\"masked\\\":false},{\\\"token\\\":\\\" managing\\\",\\\"bytes\\\":\\\"IG1hbmFnaW5n\\\",\\\"prob\\\":0.006439820384205476,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.635282516479492,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.7997064487247562,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.7997064487247562,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.09553237111522811,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.057946316059334584,\\\"masked\\\":false},{\\\"token\\\":\\\" proper\\\",\\\"bytes\\\":\\\"IHByb3Blcg==\\\",\\\"prob\\\":0.021319468748835387,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.012931581828394483,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" integrity\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.84878158569336,\\\"token\\\":{\\\"token\\\":\\\" integrity\\\",\\\"bytes\\\":\\\"IGludGVncml0eQ==\\\",\\\"prob\\\":0.9988179754088798,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" integrity\\\",\\\"bytes\\\":\\\"IGludGVncml0eQ==\\\",\\\"prob\\\":0.9988179754088798,\\\"masked\\\":false},{\\\"token\\\":\\\" stability\\\",\\\"bytes\\\":\\\"IHN0YWJpbGl0eQ==\\\",\\\"prob\\\":0.0006264646318152812,\\\"masked\\\":false},{\\\"token\\\":\\\" security\\\",\\\"bytes\\\":\\\"IHNlY3VyaXR5\\\",\\\"prob\\\":0.0005528602624735146,\\\"masked\\\":false},{\\\"token\\\":\\\" functionality\\\",\\\"bytes\\\":\\\"IGZ1bmN0aW9uYWxpdHk=\\\",\\\"prob\\\":9.424869024938248e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" Integrity\\\",\\\"bytes\\\":\\\"IEludGVncml0eQ==\\\",\\\"prob\\\":5.716768389200471e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.94400405883789,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9990221935454234,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9990221935454234,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.0008045402047387102,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LgoK\\\",\\\"prob\\\":0.0000961097981922375,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00004540258456984166,\\\"masked\\\":false},{\\\"token\\\":\\\" while\\\",\\\"bytes\\\":\\\"IHdoaWxl\\\",\\\"prob\\\":0.000027539487240627465,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Additionally\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.629062652587891,\\\"token\\\":{\\\"token\\\":\\\" Additionally\\\",\\\"bytes\\\":\\\"IEFkZGl0aW9uYWxseQ==\\\",\\\"prob\\\":0.6015431084904259,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Additionally\\\",\\\"bytes\\\":\\\"IEFkZGl0aW9uYWxseQ==\\\",\\\"prob\\\":0.6015431084904259,\\\"masked\\\":false},{\\\"token\\\":\\\" The\\\",\\\"bytes\\\":\\\"IFRoZQ==\\\",\\\"prob\\\":0.3220036703979637,\\\"masked\\\":false},{\\\"token\\\":\\\" Its\\\",\\\"bytes\\\":\\\"IEl0cw==\\\",\\\"prob\\\":0.049390463166111134,\\\"masked\\\":false},{\\\"token\\\":\\\" Moreover\\\",\\\"bytes\\\":\\\"IE1vcmVvdmVy\\\",\\\"prob\\\":0.011022216068418762,\\\"masked\\\":false},{\\\"token\\\":\\\" Furthermore\\\",\\\"bytes\\\":\\\"IEZ1cnRoZXJtb3Jl\\\",\\\"prob\\\":0.0085843330174607,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.47096061706543,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\\n\\\",\\\"bytes\\\":\\\"OgoK\\\",\\\"prob\\\":1.277291268016977e-7,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\n\\\\n\\\",\\\"bytes\\\":\\\"LAoK\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"،\\\",\\\"bytes\\\":\\\"2Iw=\\\",\\\"prob\\\":7.59908845245546e-10,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" understanding\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.535074234008789,\\\"token\\\":{\\\"token\\\":\\\" understanding\\\",\\\"bytes\\\":\\\"IHVuZGVyc3RhbmRpbmc=\\\",\\\"prob\\\":0.04337813325158509,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.5986537357253442,\\\"masked\\\":false},{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.28280597562013404,\\\"masked\\\":false},{\\\"token\\\":\\\" it\\\",\\\"bytes\\\":\\\"IGl0\\\",\\\"prob\\\":0.04337813325158509,\\\"masked\\\":false},{\\\"token\\\":\\\" understanding\\\",\\\"bytes\\\":\\\"IHVuZGVyc3RhbmRpbmc=\\\",\\\"prob\\\":0.04337813325158509,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.015959581895756768,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.175943374633789,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.973610106709709,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.973610106709709,\\\"masked\\\":false},{\\\"token\\\":\\\" how\\\",\\\"bytes\\\":\\\"IGhvdw==\\\",\\\"prob\\\":0.012261502110115943,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.008427526611517919,\\\"masked\\\":false},{\\\"token\\\":\\\" permission\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb24=\\\",\\\"prob\\\":0.002414839755710686,\\\"masked\\\":false},{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.0016597580068932354,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" using\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.925956726074219,\\\"token\\\":{\\\"token\\\":\\\" using\\\",\\\"bytes\\\":\\\"IHVzaW5n\\\",\\\"prob\\\":0.6793476542839861,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" using\\\",\\\"bytes\\\":\\\"IHVzaW5n\\\",\\\"prob\\\":0.6793476542839861,\\\"masked\\\":false},{\\\"token\\\":\\\" effectively\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZWx5\\\",\\\"prob\\\":0.1180743291324239,\\\"masked\\\":false},{\\\"token\\\":\\\" utilizing\\\",\\\"bytes\\\":\\\"IHV0aWxpemluZw==\\\",\\\"prob\\\":0.1180743291324239,\\\"masked\\\":false},{\\\"token\\\":\\\" manipulating\\\",\\\"bytes\\\":\\\"IG1hbmlwdWxhdGluZw==\\\",\\\"prob\\\":0.055778701181324275,\\\"masked\\\":false},{\\\"token\\\":\\\" mastering\\\",\\\"bytes\\\":\\\"IG1hc3RlcmluZw==\\\",\\\"prob\\\":0.010985328218754009,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.760940551757812,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9847825603899967,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9847825603899967,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.003553752389710627,\\\"masked\\\":false},{\\\"token\\\":\\\" this\\\",\\\"bytes\\\":\\\"IHRoaXM=\\\",\\\"prob\\\":0.0031362161232441534,\\\"masked\\\":false},{\\\"token\\\":\\\" permissions\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb25z\\\",\\\"prob\\\":0.0031362161232441534,\\\"masked\\\":false},{\\\"token\\\":\\\" permission\\\",\\\"bytes\\\":\\\"IHBlcm1pc3Npb24=\\\",\\\"prob\\\":0.002442550885370154,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"chmod\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.284278869628906,\\\"token\\\":{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"chmod\\\",\\\"bytes\\\":\\\"Y2htb2Q=\\\",\\\"prob\\\":0.9999998064074439,\\\"masked\\\":false},{\\\"token\\\":\\\" chmod\\\",\\\"bytes\\\":\\\"IGNobW9k\\\",\\\"prob\\\":6.033965933469722e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"permissions\\\",\\\"bytes\\\":\\\"cGVybWlzc2lvbnM=\\\",\\\"prob\\\":4.372180081359945e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"ch\\\",\\\"bytes\\\":\\\"Y2g=\\\",\\\"prob\\\":1.1056178566958917e-9,\\\"masked\\\":false},{\\\"token\\\":\\\"sudo\\\",\\\"bytes\\\":\\\"c3Vkbw==\\\",\\\"prob\\\":5.506259653211689e-11,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.381731033325195,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999917014329327,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9999917014329327,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\\\\\"\\\",\\\"bytes\\\":\\\"LCI=\\\",\\\"prob\\\":0.000006151809013107019,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":0.0000015556426700883423,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"'\\\",\\\"bytes\\\":\\\"Iic=\\\",\\\"prob\\\":1.8583596220648923e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":1.6400178657299204e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.024070739746094,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.1627651828068744,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" effectively\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZWx5\\\",\\\"prob\\\":0.7293495423571814,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.1627651828068744,\\\"masked\\\":false},{\\\"token\\\":\\\" can\\\",\\\"bytes\\\":\\\"IGNhbg==\\\",\\\"prob\\\":0.04663904991416735,\\\"masked\\\":false},{\\\"token\\\":\\\" reflects\\\",\\\"bytes\\\":\\\"IHJlZmxlY3Rz\\\",\\\"prob\\\":0.013364046646460926,\\\"masked\\\":false},{\\\"token\\\":\\\" empowers\\\",\\\"bytes\\\":\\\"IGVtcG93ZXJz\\\",\\\"prob\\\":0.013364046646460926,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" fundamental\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.105899810791016,\\\"token\\\":{\\\"token\\\":\\\" fundamental\\\",\\\"bytes\\\":\\\"IGZ1bmRhbWVudGFs\\\",\\\"prob\\\":0.6177054406364363,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" fundamental\\\",\\\"bytes\\\":\\\"IGZ1bmRhbWVudGFs\\\",\\\"prob\\\":0.6177054406364363,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.2575212997850537,\\\"masked\\\":false},{\\\"token\\\":\\\" foundational\\\",\\\"bytes\\\":\\\"IGZvdW5kYXRpb25hbA==\\\",\\\"prob\\\":0.07379065952027256,\\\"masked\\\":false},{\\\"token\\\":\\\" key\\\",\\\"bytes\\\":\\\"IGtleQ==\\\",\\\"prob\\\":0.03485895010030476,\\\"masked\\\":false},{\\\"token\\\":\\\" often\\\",\\\"bytes\\\":\\\"IG9mdGVu\\\",\\\"prob\\\":0.006058676455283431,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.375116348266602,\\\"token\\\":{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.7010851396461213,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.7010851396461213,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.257941560168477,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.034915829636917174,\\\"masked\\\":false},{\\\"token\\\":\\\" knowledge\\\",\\\"bytes\\\":\\\"IGtub3dsZWRnZQ==\\\",\\\"prob\\\":0.00606856387699286,\\\"masked\\\":false},{\\\"token\\\":\\\" when\\\",\\\"bytes\\\":\\\"IHdoZW4=\\\",\\\"prob\\\":0.00004635748294446194,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" managing\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.30293846130371,\\\"token\\\":{\\\"token\\\":\\\" managing\\\",\\\"bytes\\\":\\\"IG1hbmFnaW5n\\\",\\\"prob\\\":0.0012482779083345672,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" effective\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZQ==\\\",\\\"prob\\\":0.5702814330404237,\\\"masked\\\":false},{\\\"token\\\":\\\" anyone\\\",\\\"bytes\\\":\\\"IGFueW9uZQ==\\\",\\\"prob\\\":0.18516487158592626,\\\"masked\\\":false},{\\\"token\\\":\\\" mastering\\\",\\\"bytes\\\":\\\"IG1hc3RlcmluZw==\\\",\\\"prob\\\":0.06812540453084748,\\\"masked\\\":false},{\\\"token\\\":\\\" navigating\\\",\\\"bytes\\\":\\\"IG5hdmlnYXRpbmc=\\\",\\\"prob\\\":0.05305749368474478,\\\"masked\\\":false},{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.03218266502214231,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":24.79696273803711,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.17468514695003534,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" multi\\\",\\\"bytes\\\":\\\"IG11bHRp\\\",\\\"prob\\\":0.5380053736991595,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.17468514695003534,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":0.1059573903366094,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.05671857950998588,\\\"masked\\\":false},{\\\"token\\\":\\\" collaborative\\\",\\\"bytes\\\":\\\"IGNvbGxhYm9yYXRpdmU=\\\",\\\"prob\\\":0.044173619149609974,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" multi\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.655010223388672,\\\"token\\\":{\\\"token\\\":\\\" multi\\\",\\\"bytes\\\":\\\"IG11bHRp\\\",\\\"prob\\\":0.8767919300820359,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" multi\\\",\\\"bytes\\\":\\\"IG11bHRp\\\",\\\"prob\\\":0.8767919300820359,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.056067412122727624,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.04366647633298974,\\\"masked\\\":false},{\\\"token\\\":\\\" secure\\\",\\\"bytes\\\":\\\"IHNlY3VyZQ==\\\",\\\"prob\\\":0.020628186947287575,\\\"masked\\\":false},{\\\"token\\\":\\\" collaborative\\\",\\\"bytes\\\":\\\"IGNvbGxhYm9yYXRpdmU=\\\",\\\"prob\\\":0.0009066329942790795,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"-user\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.479232788085938,\\\"token\\\":{\\\"token\\\":\\\"-user\\\",\\\"bytes\\\":\\\"LXVzZXI=\\\",\\\"prob\\\":0.999941523568195,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"-user\\\",\\\"bytes\\\":\\\"LXVzZXI=\\\",\\\"prob\\\":0.999941523568195,\\\"masked\\\":false},{\\\"token\\\":\\\"user\\\",\\\"bytes\\\":\\\"dXNlcg==\\\",\\\"prob\\\":0.00005835023064475277,\\\"masked\\\":false},{\\\"token\\\":\\\" user\\\",\\\"bytes\\\":\\\"IHVzZXI=\\\",\\\"prob\\\":6.836886327725015e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"-users\\\",\\\"bytes\\\":\\\"LXVzZXJz\\\",\\\"prob\\\":2.8502968207376913e-8,\\\"masked\\\":false},{\\\"token\\\":\\\"-\\\",\\\"bytes\\\":\\\"LQ==\\\",\\\"prob\\\":8.167295572684549e-9,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" environment\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.27492904663086,\\\"token\\\":{\\\"token\\\":\\\" environment\\\",\\\"bytes\\\":\\\"IGVudmlyb25tZW50\\\",\\\"prob\\\":0.9971317880948309,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" environment\\\",\\\"bytes\\\":\\\"IGVudmlyb25tZW50\\\",\\\"prob\\\":0.9971317880948309,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.0013238842352316614,\\\"masked\\\":false},{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":0.0006254072642058715,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.00048708029257971353,\\\"masked\\\":false},{\\\"token\\\":\\\" Unix\\\",\\\"bytes\\\":\\\"IFVuaXg=\\\",\\\"prob\\\":0.00037934834626647757,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":71.56085968017578,\\\"token\\\":{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.7401454883471597,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.7401454883471597,\\\"masked\\\":false},{\\\"token\\\":\\\" effectively\\\",\\\"bytes\\\":\\\"IGVmZmVjdGl2ZWx5\\\",\\\"prob\\\":0.2120827243771636,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.03686113471283483,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0056539385034414065,\\\"masked\\\":false},{\\\"token\\\":\\\" efficiently\\\",\\\"bytes\\\":\\\"IGVmZmljaWVudGx5\\\",\\\"prob\\\":0.0034294648366393642,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" which\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.1740875244140625,\\\"token\\\":{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.6821423270953039,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" which\\\",\\\"bytes\\\":\\\"IHdoaWNo\\\",\\\"prob\\\":0.6821423270953039,\\\"masked\\\":false},{\\\"token\\\":\\\" enhancing\\\",\\\"bytes\\\":\\\"IGVuaGFuY2luZw==\\\",\\\"prob\\\":0.056008164676667006,\\\"masked\\\":false},{\\\"token\\\":\\\" making\\\",\\\"bytes\\\":\\\"IG1ha2luZw==\\\",\\\"prob\\\":0.04942767245147875,\\\"masked\\\":false},{\\\"token\\\":\\\" showcasing\\\",\\\"bytes\\\":\\\"IHNob3djYXNpbmc=\\\",\\\"prob\\\":0.0384953078371591,\\\"masked\\\":false},{\\\"token\\\":\\\" giving\\\",\\\"bytes\\\":\\\"IGdpdmluZw==\\\",\\\"prob\\\":0.026458441086804573,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" adds\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.323005676269531,\\\"token\\\":{\\\"token\\\":\\\" adds\\\",\\\"bytes\\\":\\\"IGFkZHM=\\\",\\\"prob\\\":0.4007197764647197,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.5145210408425104,\\\"masked\\\":false},{\\\"token\\\":\\\" adds\\\",\\\"bytes\\\":\\\"IGFkZHM=\\\",\\\"prob\\\":0.4007197764647197,\\\"masked\\\":false},{\\\"token\\\":\\\" enhances\\\",\\\"bytes\\\":\\\"IGVuaGFuY2Vz\\\",\\\"prob\\\":0.03290160964296893,\\\"masked\\\":false},{\\\"token\\\":\\\" showcases\\\",\\\"bytes\\\":\\\"IHNob3djYXNlcw==\\\",\\\"prob\\\":0.013716672548114877,\\\"masked\\\":false},{\\\"token\\\":\\\" many\\\",\\\"bytes\\\":\\\"IG1hbnk=\\\",\\\"prob\\\":0.007342481539618388,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.644964218139648,\\\"token\\\":{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.996177948370855,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.996177948370855,\\\"masked\\\":false},{\\\"token\\\":\\\" an\\\",\\\"bytes\\\":\\\"IGFu\\\",\\\"prob\\\":0.0021805143431431577,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.001498702401109134,\\\"masked\\\":false},{\\\"token\\\":\\\" another\\\",\\\"bytes\\\":\\\"IGFub3RoZXI=\\\",\\\"prob\\\":0.00005813058356681643,\\\"masked\\\":false},{\\\"token\\\":\\\" complexity\\\",\\\"bytes\\\":\\\"IGNvbXBsZXhpdHk=\\\",\\\"prob\\\":0.00003525980909668184,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" its\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.156942367553711,\\\"token\\\":{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.9999462909524099,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" its\\\",\\\"bytes\\\":\\\"IGl0cw==\\\",\\\"prob\\\":0.9999462909524099,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.000051494810722170615,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":9.43551602533962e-7,\\\"masked\\\":false},{\\\"token\\\":\\\" both\\\",\\\"bytes\\\":\\\"IGJvdGg=\\\",\\\"prob\\\":6.485181153404502e-7,\\\"masked\\\":false},{\\\"token\\\":\\\"its\\\",\\\"bytes\\\":\\\"aXRz\\\",\\\"prob\\\":2.703670989599099e-7,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" significance\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.230209350585938,\\\"token\\\":{\\\"token\\\":\\\" significance\\\",\\\"bytes\\\":\\\"IHNpZ25pZmljYW5jZQ==\\\",\\\"prob\\\":0.3858681910947219,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" significance\\\",\\\"bytes\\\":\\\"IHNpZ25pZmljYW5jZQ==\\\",\\\"prob\\\":0.3858681910947219,\\\"masked\\\":false},{\\\"token\\\":\\\" appeal\\\",\\\"bytes\\\":\\\"IGFwcGVhbA==\\\",\\\"prob\\\":0.26521336668017736,\\\"masked\\\":false},{\\\"token\\\":\\\" importance\\\",\\\"bytes\\\":\\\"IGltcG9ydGFuY2U=\\\",\\\"prob\\\":0.2065537316754097,\\\"masked\\\":false},{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.1252876661510015,\\\"masked\\\":false},{\\\"token\\\":\\\" allure\\\",\\\"bytes\\\":\\\"IGFsbHVyZQ==\\\",\\\"prob\\\":0.003340058353656074,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.269744873046875,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.8314230773109785,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.8314230773109785,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.16374449744207445,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.002647815520496486,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.001103873868630246,\\\"masked\\\":false},{\\\"token\\\":\\\" among\\\",\\\"bytes\\\":\\\"IGFtb25n\\\",\\\"prob\\\":0.0009741778956940713,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" appeal\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.6772022247314453,\\\"token\\\":{\\\"token\\\":\\\" appeal\\\",\\\"bytes\\\":\\\"IGFwcGVhbA==\\\",\\\"prob\\\":0.8542012115468899,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" appeal\\\",\\\"bytes\\\":\\\"IGFwcGVhbA==\\\",\\\"prob\\\":0.8542012115468899,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.06189496642676227,\\\"masked\\\":false},{\\\"token\\\":\\\" cool\\\",\\\"bytes\\\":\\\"IGNvb2w=\\\",\\\"prob\\\":0.04820509783275376,\\\"masked\\\":false},{\\\"token\\\":\\\" utility\\\",\\\"bytes\\\":\\\"IHV0aWxpdHk=\\\",\\\"prob\\\":0.009493748268352512,\\\"masked\\\":false},{\\\"token\\\":\\\" perceived\\\",\\\"bytes\\\":\\\"IHBlcmNlaXZlZA==\\\",\\\"prob\\\":0.006525205105872335,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" among\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.235050201416016,\\\"token\\\":{\\\"token\\\":\\\" among\\\",\\\"bytes\\\":\\\"IGFtb25n\\\",\\\"prob\\\":0.46955353046815607,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" among\\\",\\\"bytes\\\":\\\"IGFtb25n\\\",\\\"prob\\\":0.46955353046815607,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.32273167462324165,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.11873865880178133,\\\"masked\\\":false},{\\\"token\\\":\\\" for\\\",\\\"bytes\\\":\\\"IGZvcg==\\\",\\\"prob\\\":0.08161098027642033,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.0035868973828911176,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" sys\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.851818084716797,\\\"token\\\":{\\\"token\\\":\\\" sys\\\",\\\"bytes\\\":\\\"IHN5cw==\\\",\\\"prob\\\":0.8766048755165641,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" sys\\\",\\\"bytes\\\":\\\"IHN5cw==\\\",\\\"prob\\\":0.8766048755165641,\\\"masked\\\":false},{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":0.09241502281684601,\\\"masked\\\":false},{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.006696345699621237,\\\"masked\\\":false},{\\\"token\\\":\\\" admins\\\",\\\"bytes\\\":\\\"IGFkbWlucw==\\\",\\\"prob\\\":0.005215254457793996,\\\"masked\\\":false},{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":0.004602505555736346,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"admins\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.865875244140625,\\\"token\\\":{\\\"token\\\":\\\"admins\\\",\\\"bytes\\\":\\\"YWRtaW5z\\\",\\\"prob\\\":0.437794039075703,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" admins\\\",\\\"bytes\\\":\\\"IGFkbWlucw==\\\",\\\"prob\\\":0.5621241024017922,\\\"masked\\\":false},{\\\"token\\\":\\\"admins\\\",\\\"bytes\\\":\\\"YWRtaW5z\\\",\\\"prob\\\":0.437794039075703,\\\"masked\\\":false},{\\\"token\\\":\\\" admin\\\",\\\"bytes\\\":\\\"IGFkbWlu\\\",\\\"prob\\\":0.00006943636545092023,\\\"masked\\\":false},{\\\"token\\\":\\\" administrators\\\",\\\"bytes\\\":\\\"IGFkbWluaXN0cmF0b3Jz\\\",\\\"prob\\\":0.000042117467947878814,\\\"masked\\\":false},{\\\"token\\\":\\\"admin\\\",\\\"bytes\\\":\\\"YWRtaW4=\\\",\\\"prob\\\":0.00002554685998930104,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":165,\\\"token reduction\\\":0,\\\"avg latency\\\":12.448294957478842,\\\"cpu\\\":[0.12237499999999998,0.12237499999999998,0.16818750000000002,0.16818750000000002,0.16537500000000002],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":61.398468017578125,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":2648,\\\"backtrackCount\\\":0,\\\"resetCount\\\":5}\"\n      }\n     },\n     \"ccee51861e0b4aef9b2869ed3a45432c\": {\n      \"model_module\": \"@jupyter-widgets/controls\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"ProgressStyleModel\",\n      \"state\": {\n       \"description_width\": \"\"\n      }\n     },\n     \"d93f367c00d244d89cbb2aaac9bf8f81\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"dafab8be3ab947adac038705165a5372\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"e65d5b24dba34a728f2191435f699ff2\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":549,\\\"last_trace_id\\\":295,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_d93f367c00d244d89cbb2aaac9bf8f81\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"What\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\"What\\\",\\\"bytes\\\":\\\"V2hhdA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" used\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" used\\\",\\\"bytes\\\":\\\"IHVzZWQ=\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Linux\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" Linux\\\",\\\"bytes\\\":\\\"IExpbnV4\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" operating\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" operating\\\",\\\"bytes\\\":\\\"IG9wZXJhdGluZw==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" system\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" system\\\",\\\"bytes\\\":\\\"IHN5c3RlbQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"?\\\\n\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\"?\\\\n\\\\n\\\",\\\"bytes\\\":\\\"PwoK\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"Here\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\"Here\\\",\\\"bytes\\\":\\\"SGVyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" are\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" are\\\",\\\"bytes\\\":\\\"IGFyZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"6\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":null,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" most\\\",\\\"bytes\\\":\\\"IG1vc3Q=\\\",\\\"prob\\\":0.756897509098053,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" common\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" common\\\",\\\"bytes\\\":\\\"IGNvbW1vbg==\\\",\\\"prob\\\":0.7453713417053223,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" commands\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\" commands\\\",\\\"bytes\\\":\\\"IGNvbW1hbmRz\\\",\\\"prob\\\":0.7698392271995544,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\":\\\\n\\\",\\\"bytes\\\":\\\"Ogo=\\\",\\\"prob\\\":0.002817138796672225,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.3825385570526123,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.1344757080078125,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9290168881416321,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.85594940185547,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.019856709986925125,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.019856709986925125,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.004044999368488789,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"$\\\",\\\"bytes\\\":\\\"ICIk\\\",\\\"prob\\\":0.000037322461139410734,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00003255949923186563,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.000017871803720481694,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"ls\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.20795822143555,\\\"token\\\":{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7201953530311584,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"ls\\\",\\\"bytes\\\":\\\"bHM=\\\",\\\"prob\\\":0.7201953530311584,\\\"masked\\\":false},{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.13298030197620392,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.04682806506752968,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.018025198951363564,\\\"masked\\\":false},{\\\"token\\\":\\\"echo\\\",\\\"bytes\\\":\\\"ZWNobw==\\\",\\\"prob\\\":0.009419338777661324,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.7130012512207,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7112360596656799,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.7112360596656799,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\":\\\",\\\"bytes\\\":\\\"Ijo=\\\",\\\"prob\\\":0.23095254600048065,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.0150794992223382,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.013482465408742428,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.008596203289926052,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.02707099914551,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.5065160989761353,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.5065160989761353,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.07773559540510178,\\\"masked\\\":false},{\\\"token\\\":\\\" –\\\",\\\"bytes\\\":\\\"IOKAkw==\\\",\\\"prob\\\":0.06879495829343796,\\\"masked\\\":false},{\\\"token\\\":\\\" command\\\",\\\"bytes\\\":\\\"IGNvbW1hbmQ=\\\",\\\"prob\\\":0.06527391821146011,\\\"masked\\\":false},{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.043730322271585464,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" List\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.519954681396484,\\\"token\\\":{\\\"token\\\":\\\" List\\\",\\\"bytes\\\":\\\"IExpc3Q=\\\",\\\"prob\\\":0.1980321854352951,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" List\\\",\\\"bytes\\\":\\\"IExpc3Q=\\\",\\\"prob\\\":0.1980321854352951,\\\"masked\\\":false},{\\\"token\\\":\\\" list\\\",\\\"bytes\\\":\\\"IGxpc3Q=\\\",\\\"prob\\\":0.17472879588603973,\\\"masked\\\":false},{\\\"token\\\":\\\" Lists\\\",\\\"bytes\\\":\\\"IExpc3Rz\\\",\\\"prob\\\":0.14294227957725525,\\\"masked\\\":false},{\\\"token\\\":\\\" lists\\\",\\\"bytes\\\":\\\"IGxpc3Rz\\\",\\\"prob\\\":0.11886414140462875,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.11388029158115387,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.52910804748535,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.34142473340034485,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.34142473340034485,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.20746250450611115,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.13445442914962769,\\\"masked\\\":false},{\\\"token\\\":\\\" Files\\\",\\\"bytes\\\":\\\"IEZpbGVz\\\",\\\"prob\\\":0.0860721617937088,\\\"masked\\\":false},{\\\"token\\\":\\\" all\\\",\\\"bytes\\\":\\\"IGFsbA==\\\",\\\"prob\\\":0.06255073100328445,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.32087516784668,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6979290246963501,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.6979290246963501,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.15664386749267578,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.07474440336227417,\\\"masked\\\":false},{\\\"token\\\":\\\"/d\\\",\\\"bytes\\\":\\\"L2Q=\\\",\\\"prob\\\":0.014937736093997955,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.010892574675381184,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.12990188598633,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.8078669309616089,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.8078669309616089,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.15547816455364227,\\\"masked\\\":false},{\\\"token\\\":\\\" sub\\\",\\\"bytes\\\":\\\"IHN1Yg==\\\",\\\"prob\\\":0.016852058470249176,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.009154985658824444,\\\"masked\\\":false},{\\\"token\\\":\\\" folder\\\",\\\"bytes\\\":\\\"IGZvbGRlcg==\\\",\\\"prob\\\":0.0020409852731972933,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":62.444210052490234,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.42759084701538086,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.42759084701538086,\\\"masked\\\":false},{\\\"token\\\":\\\" in\\\",\\\"bytes\\\":\\\"IGlu\\\",\\\"prob\\\":0.2892744541168213,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.1945270150899887,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.02809036523103714,\\\"masked\\\":false},{\\\"token\\\":\\\" on\\\",\\\"bytes\\\":\\\"IG9u\\\",\\\"prob\\\":0.015708142891526222,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.2468204498291,\\\"token\\\":{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9912563562393188,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.9912563562393188,\\\"masked\\\":false},{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.0011365876998752356,\\\"masked\\\":false},{\\\"token\\\":\\\"  \\\",\\\"bytes\\\":\\\"ICA=\\\",\\\"prob\\\":0.0009542955667711794,\\\"masked\\\":false},{\\\"token\\\":\\\"Example\\\",\\\"bytes\\\":\\\"RXhhbXBsZQ==\\\",\\\"prob\\\":0.0007296490948647261,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0006854537059552968,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.6289119720459,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9994696974754333,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9994696974754333,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.00024218381440732628,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.0000753538915887475,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.00006036152262822725,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.000023328146198764443,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.53108787536621,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9981825351715088,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9981825351715088,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.0003488161019049585,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.0001622538547962904,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00013459427282214165,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.00012305070413276553,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"cd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.44191932678223,\\\"token\\\":{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7743936777114868,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"cd\\\",\\\"bytes\\\":\\\"Y2Q=\\\",\\\"prob\\\":0.7743936777114868,\\\"masked\\\":false},{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.11543753743171692,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.032972756773233414,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.025613170117139816,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.019268086180090904,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.6519660949707,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9988514184951782,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9988514184951782,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.00016794844123069197,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.00012853667431045324,\\\"masked\\\":false},{\\\"token\\\":\\\" <\\\",\\\"bytes\\\":\\\"IDw=\\\",\\\"prob\\\":0.00011994837404927239,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.0000957478114287369,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.14692306518555,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9951601624488831,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9951601624488831,\\\"masked\\\":false},{\\\"token\\\":\\\" –\\\",\\\"bytes\\\":\\\"IOKAkw==\\\",\\\"prob\\\":0.0019120159558951855,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0010242603020742536,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.000788228411693126,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0004957923665642738,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Change\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.13994789123535,\\\"token\\\":{\\\"token\\\":\\\" Change\\\",\\\"bytes\\\":\\\"IENoYW5nZQ==\\\",\\\"prob\\\":0.9931095838546753,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Change\\\",\\\"bytes\\\":\\\"IENoYW5nZQ==\\\",\\\"prob\\\":0.9931095838546753,\\\"masked\\\":false},{\\\"token\\\":\\\" change\\\",\\\"bytes\\\":\\\"IGNoYW5nZQ==\\\",\\\"prob\\\":0.0021652081049978733,\\\"masked\\\":false},{\\\"token\\\":\\\" Changes\\\",\\\"bytes\\\":\\\"IENoYW5nZXM=\\\",\\\"prob\\\":0.002115732990205288,\\\"masked\\\":false},{\\\"token\\\":\\\" Navigate\\\",\\\"bytes\\\":\\\"IE5hdmlnYXRl\\\",\\\"prob\\\":0.0005496674566529691,\\\"masked\\\":false},{\\\"token\\\":\\\" Move\\\",\\\"bytes\\\":\\\"IE1vdmU=\\\",\\\"prob\\\":0.00035848477273248136,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.89715385437012,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.7947884798049927,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.7947884798049927,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.09106817096471786,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.04431236907839775,\\\"masked\\\":false},{\\\"token\\\":\\\" current\\\",\\\"bytes\\\":\\\"IGN1cnJlbnQ=\\\",\\\"prob\\\":0.019163016229867935,\\\"masked\\\":false},{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.016762712970376015,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.91391563415527,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9520449638366699,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9520449638366699,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.013828189112246037,\\\"masked\\\":false},{\\\"token\\\":\\\" location\\\",\\\"bytes\\\":\\\"IGxvY2F0aW9u\\\",\\\"prob\\\":0.009942229837179184,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.009867625311017036,\\\"masked\\\":false},{\\\"token\\\":\\\" to\\\",\\\"bytes\\\":\\\"IHRv\\\",\\\"prob\\\":0.007498520892113447,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.57185745239258,\\\"token\\\":{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9988393187522888,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.9988393187522888,\\\"masked\\\":false},{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.0006097626173868775,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.00008475000504404306,\\\"masked\\\":false},{\\\"token\\\":\\\"2\\\",\\\"bytes\\\":\\\"Mg==\\\",\\\"prob\\\":0.00006749427120666951,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.00005602370947599411,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":67.18277931213379,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997995495796204,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9997995495796204,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.00008938671089708805,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.00003996324448962696,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.000014826688129687682,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00001337116009381134,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":74.85413551330566,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9984984397888184,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9984984397888184,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.0002678120508790016,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00020280123862903565,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00014318084868136793,\\\"masked\\\":false},{\\\"token\\\":\\\" “\\\",\\\"bytes\\\":\\\"IOKAnA==\\\",\\\"prob\\\":0.00006880200089653954,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"pwd\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":81.17389678955078,\\\"token\\\":{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5959702134132385,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"pwd\\\",\\\"bytes\\\":\\\"cHdk\\\",\\\"prob\\\":0.5959702134132385,\\\"masked\\\":false},{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.1715346872806549,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.08039423823356628,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.02924376167356968,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.02626633830368519,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":79.56123352050781,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9995208978652954,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9995208978652954,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.00023184521705843508,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"-\\\",\\\"bytes\\\":\\\"Ii0=\\\",\\\"prob\\\":0.00007553936302429065,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\"\\\\n\\\",\\\"bytes\\\":\\\"Igo=\\\",\\\"prob\\\":0.000044247761252336204,\\\"masked\\\":false},{\\\"token\\\":\\\"”\\\",\\\"bytes\\\":\\\"4oCd\\\",\\\"prob\\\":0.000025595843908376992,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":84.0919017791748,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9981800317764282,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9981800317764282,\\\"masked\\\":false},{\\\"token\\\":\\\" –\\\",\\\"bytes\\\":\\\"IOKAkw==\\\",\\\"prob\\\":0.0010421628830954432,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.00029120600083842874,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\",\\\"bytes\\\":\\\"IA==\\\",\\\"prob\\\":0.0001679883134784177,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.00010587596625555307,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Print\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.7901668548584,\\\"token\\\":{\\\"token\\\":\\\" Print\\\",\\\"bytes\\\":\\\"IFByaW50\\\",\\\"prob\\\":0.9300885200500488,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Print\\\",\\\"bytes\\\":\\\"IFByaW50\\\",\\\"prob\\\":0.9300885200500488,\\\"masked\\\":false},{\\\"token\\\":\\\" Display\\\",\\\"bytes\\\":\\\"IERpc3BsYXk=\\\",\\\"prob\\\":0.03639443963766098,\\\"masked\\\":false},{\\\"token\\\":\\\" Show\\\",\\\"bytes\\\":\\\"IFNob3c=\\\",\\\"prob\\\":0.010531396605074406,\\\"masked\\\":false},{\\\"token\\\":\\\" Prints\\\",\\\"bytes\\\":\\\"IFByaW50cw==\\\",\\\"prob\\\":0.005069168750196695,\\\"masked\\\":false},{\\\"token\\\":\\\" Get\\\",\\\"bytes\\\":\\\"IEdldA==\\\",\\\"prob\\\":0.0033853393979370594,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" working\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.26824760437012,\\\"token\\\":{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.7611976861953735,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" working\\\",\\\"bytes\\\":\\\"IHdvcmtpbmc=\\\",\\\"prob\\\":0.7611976861953735,\\\"masked\\\":false},{\\\"token\\\":\\\" the\\\",\\\"bytes\\\":\\\"IHRoZQ==\\\",\\\"prob\\\":0.1589236557483673,\\\"masked\\\":false},{\\\"token\\\":\\\" current\\\",\\\"bytes\\\":\\\"IGN1cnJlbnQ=\\\",\\\"prob\\\":0.038258396089076996,\\\"masked\\\":false},{\\\"token\\\":\\\" Working\\\",\\\"bytes\\\":\\\"IFdvcmtpbmc=\\\",\\\"prob\\\":0.03333960473537445,\\\"masked\\\":false},{\\\"token\\\":\\\" present\\\",\\\"bytes\\\":\\\"IHByZXNlbnQ=\\\",\\\"prob\\\":0.001858397270552814,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":75.60086250305176,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9976357221603394,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9976357221603394,\\\"masked\\\":false},{\\\"token\\\":\\\" path\\\",\\\"bytes\\\":\\\"IHBhdGg=\\\",\\\"prob\\\":0.0009939761366695166,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.0003065499186050147,\\\"masked\\\":false},{\\\"token\\\":\\\" folder\\\",\\\"bytes\\\":\\\"IGZvbGRlcg==\\\",\\\"prob\\\":0.00018190182163380086,\\\"masked\\\":false},{\\\"token\\\":\\\" dir\\\",\\\"bytes\\\":\\\"IGRpcg==\\\",\\\"prob\\\":0.00012379880354274064,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":72.01099395751953,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.949053168296814,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.949053168296814,\\\"masked\\\":false},{\\\"token\\\":\\\" path\\\",\\\"bytes\\\":\\\"IHBhdGg=\\\",\\\"prob\\\":0.031085358932614326,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.007522972766309977,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.003957272041589022,\\\"masked\\\":false},{\\\"token\\\":\\\" name\\\",\\\"bytes\\\":\\\"IG5hbWU=\\\",\\\"prob\\\":0.0027157110162079334,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.73796272277832,\\\"token\\\":{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9993860721588135,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.9993860721588135,\\\"masked\\\":false},{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.00030892775976099074,\\\"masked\\\":false},{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.00010377787111792713,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":0.000040091443224810064,\\\"masked\\\":false},{\\\"token\\\":\\\"1\\\",\\\"bytes\\\":\\\"MQ==\\\",\\\"prob\\\":0.000018539147276896983,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.51093673706055,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998859167098999,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9998859167098999,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.00003876646951539442,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.000020599638446583413,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.000013376473361859098,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.000011957499737036414,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.751935958862305,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9987971782684326,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9987971782684326,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.00016640212561469525,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.00015284896653611213,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00012531808170024306,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"~\\\",\\\"bytes\\\":\\\"ICJ+\\\",\\\"prob\\\":0.00008047203300520778,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"mkdir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.24517250061035,\\\"token\\\":{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.301483690738678,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"mkdir\\\",\\\"bytes\\\":\\\"bWtkaXI=\\\",\\\"prob\\\":0.301483690738678,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.23020607233047485,\\\"masked\\\":false},{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.1240277960896492,\\\"masked\\\":false},{\\\"token\\\":\\\"cat\\\",\\\"bytes\\\":\\\"Y2F0\\\",\\\"prob\\\":0.07389472424983978,\\\"masked\\\":false},{\\\"token\\\":\\\"grep\\\",\\\"bytes\\\":\\\"Z3JlcA==\\\",\\\"prob\\\":0.05503762885928154,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.87798690795898,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9979915618896484,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9979915618896484,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.0013503293739631772,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.00015498138964176178,\\\"masked\\\":false},{\\\"token\\\":\\\" <\\\",\\\"bytes\\\":\\\"IDw=\\\",\\\"prob\\\":0.00007040306809358299,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.00006661954830633476,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.85790824890137,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9937062859535217,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9937062859535217,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.002070414600893855,\\\"masked\\\":false},{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.0014639354776591063,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0010764141334220767,\\\"masked\\\":false},{\\\"token\\\":\\\" &\\\",\\\"bytes\\\":\\\"ICY=\\\",\\\"prob\\\":0.0006494948174804449,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Make\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.7580623626709,\\\"token\\\":{\\\"token\\\":\\\" Make\\\",\\\"bytes\\\":\\\"IE1ha2U=\\\",\\\"prob\\\":0.5579606294631958,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Make\\\",\\\"bytes\\\":\\\"IE1ha2U=\\\",\\\"prob\\\":0.5579606294631958,\\\"masked\\\":false},{\\\"token\\\":\\\" Create\\\",\\\"bytes\\\":\\\"IENyZWF0ZQ==\\\",\\\"prob\\\":0.4389786422252655,\\\"masked\\\":false},{\\\"token\\\":\\\" make\\\",\\\"bytes\\\":\\\"IG1ha2U=\\\",\\\"prob\\\":0.0008205444319173694,\\\"masked\\\":false},{\\\"token\\\":\\\" create\\\",\\\"bytes\\\":\\\"IGNyZWF0ZQ==\\\",\\\"prob\\\":0.0006687106797471642,\\\"masked\\\":false},{\\\"token\\\":\\\" Creates\\\",\\\"bytes\\\":\\\"IENyZWF0ZXM=\\\",\\\"prob\\\":0.0006559843313880265,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.44692611694336,\\\"token\\\":{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6080442070960999,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.6080442070960999,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.2860241234302521,\\\"masked\\\":false},{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.06440574675798416,\\\"masked\\\":false},{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.02877701446413994,\\\"masked\\\":false},{\\\"token\\\":\\\" Directory\\\",\\\"bytes\\\":\\\"IERpcmVjdG9yeQ==\\\",\\\"prob\\\":0.005046274047344923,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" new\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.84580039978027,\\\"token\\\":{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7063645720481873,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" new\\\",\\\"bytes\\\":\\\"IG5ldw==\\\",\\\"prob\\\":0.7063645720481873,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.2890213429927826,\\\"masked\\\":false},{\\\"token\\\":\\\" folder\\\",\\\"bytes\\\":\\\"IGZvbGRlcg==\\\",\\\"prob\\\":0.0036525025498121977,\\\"masked\\\":false},{\\\"token\\\":\\\" Directory\\\",\\\"bytes\\\":\\\"IERpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0003998729516752064,\\\"masked\\\":false},{\\\"token\\\":\\\" sub\\\",\\\"bytes\\\":\\\"IHN1Yg==\\\",\\\"prob\\\":0.00022439869644585997,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directory\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.24801254272461,\\\"token\\\":{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9906401634216309,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.9906401634216309,\\\"masked\\\":false},{\\\"token\\\":\\\" folder\\\",\\\"bytes\\\":\\\"IGZvbGRlcg==\\\",\\\"prob\\\":0.007896979339420795,\\\"masked\\\":false},{\\\"token\\\":\\\" Directory\\\",\\\"bytes\\\":\\\"IERpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0009786473819985986,\\\"masked\\\":false},{\\\"token\\\":\\\" empty\\\",\\\"bytes\\\":\\\"IGVtcHR5\\\",\\\"prob\\\":0.0001248134794877842,\\\"masked\\\":false},{\\\"token\\\":\\\" sub\\\",\\\"bytes\\\":\\\"IHN1Yg==\\\",\\\"prob\\\":0.00007125764386728406,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.06402587890625,\\\"token\\\":{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9873088002204895,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.9873088002204895,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\n\\\",\\\"bytes\\\":\\\"IAo=\\\",\\\"prob\\\":0.008221996016800404,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.002014587167650461,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.0005018569063395262,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.0004184845893178135,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.50312042236328,\\\"token\\\":{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999502420425415,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"5\\\",\\\"bytes\\\":\\\"NQ==\\\",\\\"prob\\\":0.999502420425415,\\\"masked\\\":false},{\\\"token\\\":\\\"6\\\",\\\"bytes\\\":\\\"Ng==\\\",\\\"prob\\\":0.00021893852681387216,\\\"masked\\\":false},{\\\"token\\\":\\\"4\\\",\\\"bytes\\\":\\\"NA==\\\",\\\"prob\\\":0.000048941790737444535,\\\"masked\\\":false},{\\\"token\\\":\\\"3\\\",\\\"bytes\\\":\\\"Mw==\\\",\\\"prob\\\":0.000032424959499621764,\\\"masked\\\":false},{\\\"token\\\":\\\"7\\\",\\\"bytes\\\":\\\"Nw==\\\",\\\"prob\\\":0.000016554384274058975,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":66.15090370178223,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999136924743652,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9999136924743652,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\\\\"\\\",\\\"bytes\\\":\\\"LiI=\\\",\\\"prob\\\":0.00003092085898970254,\\\"masked\\\":false},{\\\"token\\\":\\\".\\\\n\\\",\\\"bytes\\\":\\\"Lgo=\\\",\\\"prob\\\":0.0000141975151564111,\\\"masked\\\":false},{\\\"token\\\":\\\",\\\",\\\"bytes\\\":\\\"LA==\\\",\\\"prob\\\":0.00001178697948489571,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.000010654663128661923,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" \\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.08898735046387,\\\"token\\\":{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9994974136352539,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" \\\\\\\"\\\",\\\"bytes\\\":\\\"ICI=\\\",\\\"prob\\\":0.9994974136352539,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\".\\\",\\\"bytes\\\":\\\"ICIu\\\",\\\"prob\\\":0.00007820582686690614,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"/\\\",\\\"bytes\\\":\\\"ICIv\\\",\\\"prob\\\":0.000054686202929588035,\\\"masked\\\":false},{\\\"token\\\":\\\" '\\\",\\\"bytes\\\":\\\"ICc=\\\",\\\"prob\\\":0.00003445280890446156,\\\"masked\\\":false},{\\\"token\\\":\\\" \\\\\\\"./\\\",\\\"bytes\\\":\\\"ICIuLw==\\\",\\\"prob\\\":0.000030250168492784724,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"rm\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":65.55318832397461,\\\"token\\\":{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.47745198011398315,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"rm\\\",\\\"bytes\\\":\\\"cm0=\\\",\\\"prob\\\":0.47745198011398315,\\\"masked\\\":false},{\\\"token\\\":\\\"cp\\\",\\\"bytes\\\":\\\"Y3A=\\\",\\\"prob\\\":0.19119518995285034,\\\"masked\\\":false},{\\\"token\\\":\\\"touch\\\",\\\"bytes\\\":\\\"dG91Y2g=\\\",\\\"prob\\\":0.16244889795780182,\\\"masked\\\":false},{\\\"token\\\":\\\"mv\\\",\\\"bytes\\\":\\\"bXY=\\\",\\\"prob\\\":0.044064100831747055,\\\"masked\\\":false},{\\\"token\\\":\\\"r\\\",\\\"bytes\\\":\\\"cg==\\\",\\\"prob\\\":0.03669914975762367,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.62502479553223,\\\"token\\\":{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9929556846618652,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"\\\\\\\"\\\",\\\"bytes\\\":\\\"Ig==\\\",\\\"prob\\\":0.9929556846618652,\\\"masked\\\":false},{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.006172620225697756,\\\"masked\\\":false},{\\\"token\\\":\\\"/r\\\",\\\"bytes\\\":\\\"L3I=\\\",\\\"prob\\\":0.00014100420230533928,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0001140957247116603,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\\\\",\\\",\\\"bytes\\\":\\\"Iiw=\\\",\\\"prob\\\":0.000113526766654104,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.82608413696289,\\\"token\\\":{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9919424057006836,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" -\\\",\\\"bytes\\\":\\\"IC0=\\\",\\\"prob\\\":0.9919424057006836,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.003623327473178506,\\\"masked\\\":false},{\\\"token\\\":\\\" /\\\",\\\"bytes\\\":\\\"IC8=\\\",\\\"prob\\\":0.0014971563359722495,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0009335465147159994,\\\"masked\\\":false},{\\\"token\\\":\\\" –\\\",\\\"bytes\\\":\\\"IOKAkw==\\\",\\\"prob\\\":0.0007392782717943192,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Remove\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.15796279907227,\\\"token\\\":{\\\"token\\\":\\\" Remove\\\",\\\"bytes\\\":\\\"IFJlbW92ZQ==\\\",\\\"prob\\\":0.9339684844017029,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" Remove\\\",\\\"bytes\\\":\\\"IFJlbW92ZQ==\\\",\\\"prob\\\":0.9339684844017029,\\\"masked\\\":false},{\\\"token\\\":\\\" Delete\\\",\\\"bytes\\\":\\\"IERlbGV0ZQ==\\\",\\\"prob\\\":0.06461095809936523,\\\"masked\\\":false},{\\\"token\\\":\\\" Removes\\\",\\\"bytes\\\":\\\"IFJlbW92ZXM=\\\",\\\"prob\\\":0.0003368427569512278,\\\"masked\\\":false},{\\\"token\\\":\\\" remove\\\",\\\"bytes\\\":\\\"IHJlbW92ZQ==\\\",\\\"prob\\\":0.00013425564975477755,\\\"masked\\\":false},{\\\"token\\\":\\\" Rename\\\",\\\"bytes\\\":\\\"IFJlbmFtZQ==\\\",\\\"prob\\\":0.00012034575775032863,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" files\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":63.79199028015137,\\\"token\\\":{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.535869836807251,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" files\\\",\\\"bytes\\\":\\\"IGZpbGVz\\\",\\\"prob\\\":0.535869836807251,\\\"masked\\\":false},{\\\"token\\\":\\\" a\\\",\\\"bytes\\\":\\\"IGE=\\\",\\\"prob\\\":0.30348482728004456,\\\"masked\\\":false},{\\\"token\\\":\\\" file\\\",\\\"bytes\\\":\\\"IGZpbGU=\\\",\\\"prob\\\":0.06853235512971878,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.039569105952978134,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.021841300651431084,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":68.6190128326416,\\\"token\\\":{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5227224230766296,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" and\\\",\\\"bytes\\\":\\\"IGFuZA==\\\",\\\"prob\\\":0.5227224230766296,\\\"masked\\\":false},{\\\"token\\\":\\\" or\\\",\\\"bytes\\\":\\\"IG9y\\\",\\\"prob\\\":0.39458736777305603,\\\"masked\\\":false},{\\\"token\\\":\\\"\\\\n\\\",\\\"bytes\\\":\\\"Cg==\\\",\\\"prob\\\":0.060067713260650635,\\\"masked\\\":false},{\\\"token\\\":\\\"/d\\\",\\\"bytes\\\":\\\"L2Q=\\\",\\\"prob\\\":0.013923811726272106,\\\"masked\\\":false},{\\\"token\\\":\\\" (\\\",\\\"bytes\\\":\\\"ICg=\\\",\\\"prob\\\":0.0024710476864129305,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" directories\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":70.00494003295898,\\\"token\\\":{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9874129295349121,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\" directories\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yaWVz\\\",\\\"prob\\\":0.9874129295349121,\\\"masked\\\":false},{\\\"token\\\":\\\" folders\\\",\\\"bytes\\\":\\\"IGZvbGRlcnM=\\\",\\\"prob\\\":0.006531686522066593,\\\"masked\\\":false},{\\\"token\\\":\\\"/or\\\",\\\"bytes\\\":\\\"L29y\\\",\\\"prob\\\":0.003683121409267187,\\\"masked\\\":false},{\\\"token\\\":\\\" directory\\\",\\\"bytes\\\":\\\"IGRpcmVjdG9yeQ==\\\",\\\"prob\\\":0.0011248451191931963,\\\"masked\\\":false},{\\\"token\\\":\\\" empty\\\",\\\"bytes\\\":\\\"IGVtcHR5\\\",\\\"prob\\\":0.00030673586297780275,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":53,\\\"token reduction\\\":0,\\\"avg latency\\\":71.9354917418282,\\\"cpu\\\":[0.8378125,0.9030625000000001,0.9030625000000001,0.8488125,0.8488125],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":53.23284912109375,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":549,\\\"backtrackCount\\\":3,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"f5514c47cb84430b904ba932132c7d9f\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"fb320b3c79c34a31bc59ceeb935c40e8\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     }\n    },\n    \"version_major\": 2,\n    \"version_minor\": 0\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/chatgpt_vs_open_source_on_harder_tasks.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Exploring ChatGPT and open-source models on slightly harder tasks\\n\",\n    \"\\n\",\n    \"**NOTE! This notebook has not yet been updated to use the new `v0.1+` pythonic syntax. We are working through the notebooks still. (PRs are welcome)**\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Introduction\\n\",\n    \"**Note: This notebook is the code and examples from a related [the blog post](https://medium.com/@marcotcr/exploring-chatgpt-vs-open-source-models-on-slightly-harder-tasks-aa0395c31610) written jointly by Marco Tulio Ribeiro and Scott Lundberg.**  \\n\",\n    \"\\n\",\n    \"Open-source LLMs like [Vicuna](https://lmsys.org/blog/2023-03-30-vicuna/) and [MPT](https://www.mosaicml.com/blog/mpt-7b#building-with-mosaicml-platform) are popping up all over the place.  \\n\",\n    \"There's been [discussion](https://www.semianalysis.com/p/google-we-have-no-moat-and-neither) about how these models compare to commercial LLMs like ChatGPT or Bard, but most of the comparison has been around answers to simple questions.  \\n\",\n    \"\\n\",\n    \"As an example, the folks at [LMSYSOrg](https://lmsys.org/) did [an interesting analysis](https://lmsys.org/blog/2023-03-30-vicuna/) (+1 for being automated and reproducible) comparing Vicuna-13B to ChatGPT on various short questions, which is great as a comparison of the models as simple chatbots. However, many interesting ways of using these LLMs typically require complex instructions and/or multi-turn conversations, and some prompt engineering.\\n\",\n    \"In the 'real world', most people will want to compare different LLM offerings on _their_ problem, with a variety of different prompts.  \\n\",\n    \"\\n\",\n    \"This notebook is an example of what such an exploration might look like, comparing two open source models (Vicuna-13B, MPT-7b-Chat) with ChatGPT on tasks of varying complexity.\\n\",\n    \"\\n\",\n    \"The notebook is included here because it is also an example of how Guidance can be used to compare various models easily. We have shortened the discussion and commentary that are in the blog post, but the code and examples are here.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Warmup: Solving equations\\n\",\n    \"By way of warmup, let's start with a toy task (solving simple polynomial equations), where we can check the output for correctness and shouldn't need much prompt engineering.  \\n\",\n    \"This will be similar to the Math category in [here](https://lmsys.org/blog/2023-03-30-vicuna/), with the difference that we will evaluate models as correct / incorrect on ground truth, rather than using GPT-4 to rate the output.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here is a simple function that generates a polynomial with distinct integer roots.\\n\",\n    \"This will give us both the input and the ground truth output.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 30,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Roots [2, -7]\\n\",\n      \"x^2 + 5.0x - 14.0 = 0\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"def random_polynomial(n_roots, low=1, high=100):\\n\",\n    \"    roots = [np.random.randint(low, high) for _ in range(n_roots)]\\n\",\n    \"    # unique roots only\\n\",\n    \"    while len(set(roots)) != n_roots:\\n\",\n    \"        roots = [np.random.randint(low, high) for _ in range(n_roots)]\\n\",\n    \"    poly = np.polynomial.polynomial.Polynomial.fromroots(roots)\\n\",\n    \"    a = poly.coef.copy()\\n\",\n    \"    a = a[::-1]\\n\",\n    \"    text= ''\\n\",\n    \"    for i, coef in enumerate(a):\\n\",\n    \"        if coef == 0:\\n\",\n    \"            continue\\n\",\n    \"        sign = ' + ' if coef > 0 else ' - '\\n\",\n    \"        if i ==0:\\n\",\n    \"            sign = ''\\n\",\n    \"        elif coef < 0:\\n\",\n    \"            coef = -coef\\n\",\n    \"        if i == len(a) - 1:\\n\",\n    \"            text += f'{sign}{coef}'\\n\",\n    \"        else:\\n\",\n    \"            if coef == 1:\\n\",\n    \"                coef = ''\\n\",\n    \"            power = f'^{len(a) - i - 1}' if len(a) - i - 1 > 1 else ''\\n\",\n    \"            text += f'{sign}{coef}x{power}'\\n\",\n    \"    text += ' = 0'\\n\",\n    \"    return roots, text\\n\",\n    \"roots, equation = random_polynomial(2, low=-10, high=10)\\n\",\n    \"print('Roots', roots)\\n\",\n    \"print(equation)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"First, let's load the models (we use [`guidance`](https://github.com/microsoft/guidance) throughout for easy comparison and control):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 43,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import guidance\\n\",\n    \"import transformers\\n\",\n    \"path = '/home/marcotcr/.cache/huggingface/hub/vicuna-13b'\\n\",\n    \"mpt = guidance.llms.transformers.MPTChat('mosaicml/mpt-7b-chat', device=1)\\n\",\n    \"vicuna = guidance.llms.transformers.Vicuna(path, device_map='auto')\\n\",\n    \"chatgpt = guidance.llms.OpenAI(\\\"gpt-3.5-turbo\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Quick digression on different syntaxes**: each of these models have a their own _chat syntax_, e.g. here is how the same conversation would look like in Vicuna and MPT (where `[generated response]` is where the model would put its output):  \\n\",\n    \"\\n\",\n    \"Vicuna:  \\n\",\n    \"```\\n\",\n    \"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.  \\n\",\n    \"USER: Can you please solve the following equation? x^2 + 2x + 1 = 0  \\n\",\n    \"ASSISTANT: [generated response] </s>\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"MPT:  \\n\",\n    \"```\\n\",\n    \"<|im_start|>system\\n\",\n    \"- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n    \"- You answer questions.\\n\",\n    \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n    \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.\\\"\\\"\\\"\\n\",\n    \"<|im_end|>\\n\",\n    \"<|im_start|>user Can you please solve the following equation? x^2 + 2x + 1 = 0<|im_end|>\\n\",\n    \"<|im_start|>assistant [generated response]<|im_end>\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"To avoid the tediousness translating between these, `guidance` supports a unified chat syntax that gets translated to the model-specific syntax when calling the model.  \\n\",\n    \"Here is the prompt we'll use for all models (note how we use ``{{system}}``, ``{{user}}`` and ``{{assistant}}`` tags rather than model-specific separators):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 44,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"find_roots = guidance('''\\n\",\n    \"{{~#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"\\n\",\n    \"{{#user~}}\\n\",\n    \"Please find the roots of the following equation: {{equation}}\\n\",\n    \"Think step by step, find the roots, and then say:\\n\",\n    \"ROOTS = [root1, root2...]\\n\",\n    \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n    \"Make sure to use real numbers, not fractions.\\n\",\n    \"{{~/user}}\\n\",\n    \"\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try the prompt on a very simple example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 47,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[1, -2]\\n\",\n      \"x^2 + x - 2.0 = 0\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"roots, equation = random_polynomial(2, low=-3, high=3)\\n\",\n    \"print(roots)\\n\",\n    \"print(equation)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"ChatGPT:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 48,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-5012bd52-75d7-44c7-9c0a-45645f8439e7\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-5012bd52-75d7-44c7-9c0a-45645f8439e7\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 + x - 2.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>To find the roots of the equation x^2 + x - 2.0 = 0, we can use the quadratic formula:\\n\",\n       \"\\n\",\n       \"x = (-b ± sqrt(b^2 - 4ac)) / 2a\\n\",\n       \"\\n\",\n       \"where a = 1, b = 1, and c = -2.0\\n\",\n       \"\\n\",\n       \"Plugging in these values, we get:\\n\",\n       \"\\n\",\n       \"x = (-1 ± sqrt(1^2 - 4(1)(-2.0))) / 2(1)\\n\",\n       \"\\n\",\n       \"Simplifying:\\n\",\n       \"\\n\",\n       \"x = (-1 ± sqrt(1 + 8)) / 2\\n\",\n       \"\\n\",\n       \"x = (-1 ± sqrt(9)) / 2\\n\",\n       \"\\n\",\n       \"x = (-1 ± 3) / 2\\n\",\n       \"\\n\",\n       \"So the roots are:\\n\",\n       \"\\n\",\n       \"ROOTS = [-2.0, 1.0]</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"5012bd52-75d7-44c7-9c0a-45645f8439e7\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"answer_gpt = find_roots(llm=chatgpt, equation=equation)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 49,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-680206b6-6a0e-4b7b-8449-28f964922f5d\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-680206b6-6a0e-4b7b-8449-28f964922f5d\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 + x - 2.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>To find the roots of the equation x^2 + x - 2.0 = 0, we can use the quadratic formula:\\n\",\n       \"\\n\",\n       \"x = (-b +/- sqrt(b^2 - 4ac)) / 2a\\n\",\n       \"\\n\",\n       \"where a, b, and c are the coefficients of the equation. In this case, a = 1, b = -1, and c = 2.0. Plugging these values into the formula, we get:\\n\",\n       \"\\n\",\n       \"x = (-(-1) +/- sqrt((-1)^2 - 4(1)(2.0))) / 2(1)\\n\",\n       \"\\n\",\n       \"x = (1 +/- sqrt(1 - 8)) / 2\\n\",\n       \"\\n\",\n       \"x = (1 +/- sqrt(-7)) / 2\\n\",\n       \"\\n\",\n       \"The square root of -7 is not a real number, so the equation has no real roots. Therefore, the roots of the equation x^2 + x - 2.0 = 0 are not real numbers.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"680206b6-6a0e-4b7b-8449-28f964922f5d\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"answer_vicuna = find_roots(llm=vicuna, equation=equation)\\n\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"MPT:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 50,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-ee4a0d7e-63a2-470b-be9b-15daa58306aa\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-ee4a0d7e-63a2-470b-be9b-15daa58306aa\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n       \"- You answer questions.\\n\",\n       \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 + x - 2.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>The roots of the equation x^2 + x - 2.0 = 0 are -1 and 1. \\n\",\n       \"ROOTS = [-1, 1]</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"ee4a0d7e-63a2-470b-be9b-15daa58306aa\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"answer_mpt = find_roots(llm=mpt, equation=equation)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"ChatGPT got it right, while Vicuna and MPT got it wrong (Vicuna didn't even follow the specified format).\\n\",\n    \"Let's write a simple regex to parse the output, so we can evaluate this on a few more expressions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 51,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"ChatGPT:  True\\n\",\n      \"Vicuna:  False\\n\",\n      \"MPT:  False\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import re\\n\",\n    \"def parse_roots(text):\\n\",\n    \"    roots = re.search(r'ROOTS = \\\\[(.*)\\\\]', text)\\n\",\n    \"    if not roots:\\n\",\n    \"        return []\\n\",\n    \"    roots = roots.group(1).split(',')\\n\",\n    \"    try:\\n\",\n    \"        roots = [float(r) for r in roots]\\n\",\n    \"    except:\\n\",\n    \"        roots = []\\n\",\n    \"    return roots\\n\",\n    \"def matches_groundtruth(roots, groundtruth):\\n\",\n    \"    if len(roots) != len(groundtruth):\\n\",\n    \"        return False\\n\",\n    \"    gt = np.array(sorted(groundtruth))\\n\",\n    \"    roots = np.array(sorted(roots))\\n\",\n    \"    return np.all(np.abs(gt - roots) < 1e-3)\\n\",\n    \"\\n\",\n    \"print('ChatGPT: ', matches_groundtruth(parse_roots(answer_gpt['answer']), roots))\\n\",\n    \"print('Vicuna: ', matches_groundtruth(parse_roots(answer_vicuna['answer']), roots))\\n\",\n    \"print('MPT: ', matches_groundtruth(parse_roots(answer_mpt['answer']), roots))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We evaluate the prompt on quadratic equations with roots between -20 and 20:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Frequency of correct answers:\\n\",\n      \"ChatGPT:  0.8\\n\",\n      \"Vicuna:  0.0\\n\",\n      \"MPT:  0.0\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"answers = {\\n\",\n    \"    'ChatGPT': [],\\n\",\n    \"    'Vicuna': [],\\n\",\n    \"    'MPT': []\\n\",\n    \"}\\n\",\n    \"correct = {\\n\",\n    \"    'ChatGPT': [],\\n\",\n    \"    'Vicuna': [],\\n\",\n    \"    'MPT': []\\n\",\n    \"}\\n\",\n    \"for _ in range(20):\\n\",\n    \"    roots, equation = random_polynomial(2, low=-20, high=20)\\n\",\n    \"    answer_gpt = find_roots(llm=chatgpt, equation=equation, silent=True)\\n\",\n    \"    answer_vicuna = find_roots(llm=vicuna, equation=equation, silent=True)\\n\",\n    \"    answer_mpt = find_roots(llm=mpt, equation=equation, silent=True)\\n\",\n    \"    answers['ChatGPT'].append(answer_gpt)\\n\",\n    \"    answers['Vicuna'].append(answer_vicuna)\\n\",\n    \"    answers['MPT'].append(answer_mpt)\\n\",\n    \"    correct['ChatGPT'].append(matches_groundtruth(parse_roots(answer_gpt['answer']), roots))\\n\",\n    \"    correct['Vicuna'].append(matches_groundtruth(parse_roots(answer_vicuna['answer']), roots))\\n\",\n    \"    correct['MPT'].append(matches_groundtruth(parse_roots(answer_mpt['answer']), roots))\\n\",\n    \"\\n\",\n    \"print('Frequency of correct answers:')\\n\",\n    \"print('ChatGPT: ', np.mean(correct['ChatGPT']))\\n\",\n    \"print('Vicuna: ', np.mean(correct['Vicuna']))\\n\",\n    \"print('MPT: ', np.mean(correct['MPT']))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"ChatGPT gets the right roots 80% of the time, while Vicuna and MPT never get them right. Let's see a few errors:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-a4f7e4eb-98bd-4418-80b3-a4aaf48d1c86\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-a4f7e4eb-98bd-4418-80b3-a4aaf48d1c86\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 - 13.0x - 114.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>To find the roots of the equation x^2 - 13.0x - 114.0 = 0, we can use the quadratic formula:\\n\",\n       \"\\n\",\n       \"x = (-b +/- sqrt(b^2 - 4ac)) / 2a\\n\",\n       \"\\n\",\n       \"where a, b, and c are the coefficients of the equation.\\n\",\n       \"\\n\",\n       \"In this case, a = 1, b = -13.0, and c = -114.0. Plugging these values into the formula, we get:\\n\",\n       \"\\n\",\n       \"x = (-(-13.0) +/- sqrt((-13.0)^2 - 4(1)(-114.0))) / 2(1)\\n\",\n       \"\\n\",\n       \"Simplifying, we get:\\n\",\n       \"\\n\",\n       \"x = (13.0 +/- sqrt(13.0^2 + 448.0)) / 2\\n\",\n       \"\\n\",\n       \"x = (13.0 +/- sqrt(13.0^2 + 448.0)) / 2\\n\",\n       \"\\n\",\n       \"x = (13.0 +/- sqrt(13.0^2 + 448.0)) / 2\\n\",\n       \"\\n\",\n       \"The solutions to this equation are the values of x that make the equation true. These values are the roots of the equation.\\n\",\n       \"\\n\",\n       \"The roots of the equation x^2 - 13.0x - 114.0 = 0 are:\\n\",\n       \"\\n\",\n       \"ROOTS = [13.0, -13.0]\\n\",\n       \"\\n\",\n       \"Therefore, the two roots of the equation are 13.0 and -13.0, both of which are real numbers.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"a4f7e4eb-98bd-4418-80b3-a4aaf48d1c86\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"answers['Vicuna'][0]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-ede864e4-1394-45d6-93bf-703138babfd9\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-ede864e4-1394-45d6-93bf-703138babfd9\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.\\n\",\n       \"    - You answer questions.\\n\",\n       \"    - You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"    - You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 - 13.0x - 114.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>The roots of the equation x^2 - 13.0x - 114.0 = 0 are 2.0 and -3.0. Therefore, ROOTS = [-3.0, 2.0].</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"ede864e4-1394-45d6-93bf-703138babfd9\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"answers['MPT'][0]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna does the math wrong, while MPT does not even attempt to solve it step by step.  \\n\",\n    \"ChatGPT also makes some mistakes, often involving some math substep:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-1d99ae78-3851-44cf-822f-43408ee13e6a\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-1d99ae78-3851-44cf-822f-43408ee13e6a\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the roots of the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x^2 - 13.0x - 114.0 = 0</span>\\n\",\n       \"Think step by step, find the roots, and then say:\\n\",\n       \"ROOTS = [root1, root2...]\\n\",\n       \"For example, if the roots are 1.3 and 2.2, say ROOTS = [1.3, 2.2].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>To find the roots of the equation x^2 - 13.0x - 114.0 = 0, we can use the quadratic formula:\\n\",\n       \"\\n\",\n       \"x = (-b ± sqrt(b^2 - 4ac)) / 2a\\n\",\n       \"\\n\",\n       \"where a = 1, b = -13.0, and c = -114.0.\\n\",\n       \"\\n\",\n       \"Plugging in these values, we get:\\n\",\n       \"\\n\",\n       \"x = (-(-13.0) ± sqrt((-13.0)^2 - 4(1)(-114.0))) / 2(1)\\n\",\n       \"x = (13.0 ± sqrt(169 + 456)) / 2\\n\",\n       \"x = (13.0 ± sqrt(625)) / 2\\n\",\n       \"x = (13.0 ± 25.0) / 2\\n\",\n       \"\\n\",\n       \"So the roots are:\\n\",\n       \"\\n\",\n       \"ROOTS = [19.5, -6.5]</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"1d99ae78-3851-44cf-822f-43408ee13e6a\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"error = np.where(np.array(correct['ChatGPT']) == False)[0][0]\\n\",\n    \"answers['ChatGPT'][error]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Since Vicuna and MPT failed on quadratic equations, let's look at even simpler equations, such as `x - 10 = 0`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"find_solution = guidance('''\\n\",\n    \"{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"\\n\",\n    \"{{#user~}}\\n\",\n    \"Please find the solution to the following equation: {{equation}}\\n\",\n    \"Think step by step, find the solution, and then say:\\n\",\n    \"SOLUTION = [value]\\n\",\n    \"For example, if the solution is x=3, say SOLUTION = [3].\\n\",\n    \"Make sure to use real numbers, not fractions.\\n\",\n    \"{{/user}}\\n\",\n    \"\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0 max_tokens=300}}\\n\",\n    \"{{~/assistant~}}''')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 37,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def parse_solution(text):\\n\",\n    \"    solution = re.search(r'SOLUTION = \\\\[(.*)\\\\]', text)\\n\",\n    \"    if not solution:\\n\",\n    \"        return []\\n\",\n    \"    try:\\n\",\n    \"        return [float(solution.group(1))]\\n\",\n    \"    except:\\n\",\n    \"        return []\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 38,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Frequency of correct answers:\\n\",\n      \"ChatGPT:  1.0\\n\",\n      \"Vicuna:  0.9285714285714286\\n\",\n      \"MPT:  0.23076923076923078\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"correct1d = {\\n\",\n    \"    'ChatGPT': [],\\n\",\n    \"    'Vicuna': [],\\n\",\n    \"    'MPT': []\\n\",\n    \"}\\n\",\n    \"answers1d = {\\n\",\n    \"    'ChatGPT': [],\\n\",\n    \"    'Vicuna': [],\\n\",\n    \"    'MPT': []\\n\",\n    \"}\\n\",\n    \"for i in range(20):\\n\",\n    \"    print(i)\\n\",\n    \"    roots, equation = random_polynomial(1, low=-20, high=20)\\n\",\n    \"    answer_gpt = find_solution(llm=chatgpt, equation=equation, silent=False)\\n\",\n    \"    answer_vicuna = find_solution(llm=vicuna, equation=equation, silent=False)\\n\",\n    \"    answer_mpt = find_solution(llm=mpt, equation=equation, silent=False)\\n\",\n    \"    answers1d['ChatGPT'].append(answer_gpt)\\n\",\n    \"    answers1d['Vicuna'].append(answer_vicuna)\\n\",\n    \"    answers1d['MPT'].append(answer_mpt)\\n\",\n    \"    correct1d['ChatGPT'].append(matches_groundtruth(parse_solution(answer_gpt['answer']), roots))\\n\",\n    \"    correct1d['Vicuna'].append(matches_groundtruth(parse_solution(answer_vicuna['answer']), roots))\\n\",\n    \"    correct1d['MPT'].append(matches_groundtruth(parse_solution(answer_mpt['answer']), roots))\\n\",\n    \"\\n\",\n    \"print('Frequency of correct answers:')\\n\",\n    \"print('ChatGPT: ', np.mean(correct1d['ChatGPT']))\\n\",\n    \"print('Vicuna: ', np.mean(correct1d['Vicuna']))\\n\",\n    \"print('MPT: ', np.mean(correct1d['MPT']))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Surprisingly, MPT still fails to solve these. Vicuna still makes some mistakes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 39,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-f43bfe4e-4234-4953-84ab-e667aa7044a2\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-f43bfe4e-4234-4953-84ab-e667aa7044a2\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the solution to the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x - 16.0 = 0</span>\\n\",\n       \"Think step by step, find the solution, and then say:\\n\",\n       \"SOLUTION = [value]\\n\",\n       \"For example, if the solution is x=3, say SOLUTION = [3].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0 max_tokens=300}}'>To solve the equation x - 16.0 = 0, we can follow these steps:\\n\",\n       \"\\n\",\n       \"1. Move the 16.0 to the right-hand side of the equation: x - 16.0 = 0 becomes 0 = x - 16.0\\n\",\n       \"2. Subtract 16.0 from both sides: 0 - 16.0 = 0 becomes -16.0 = -16.0\\n\",\n       \"3. Simplify the left-hand side by negating the right-hand side: -16.0 = -16.0 becomes 0 = 0\\n\",\n       \"4. Divide both sides by 1 to get the solution: 0 / 1 = 0 becomes x = 0\\n\",\n       \"\\n\",\n       \"Therefore, the solution to the equation x - 16.0 = 0 is x = 0.\\n\",\n       \"\\n\",\n       \"SOLUTION = [0]</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"f43bfe4e-4234-4953-84ab-e667aa7044a2\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"error = np.where(np.array(correct1d['Vicuna']) == False)[0][0]\\n\",\n    \"answers1d['Vicuna'][error]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 41,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-b7a07889-46e3-4b63-aca2-bb2b2c54d20c\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-b7a07889-46e3-4b63-aca2-bb2b2c54d20c\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n       \"- You answer questions.\\n\",\n       \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the solution to the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x + 12.0 = 0</span>\\n\",\n       \"Think step by step, find the solution, and then say:\\n\",\n       \"SOLUTION = [value]\\n\",\n       \"For example, if the solution is x=3, say SOLUTION = [3].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0 max_tokens=300}}'>The equation x + 12.0 = 0 has infinitely many solutions, since it is true for any value of x.  However, if we want to find a specific solution, we need to divide both sides of the equation by 12.0, which gives us x = -1.  Therefore, the solution is x = -1.  SOLUTION = [-1]</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"b7a07889-46e3-4b63-aca2-bb2b2c54d20c\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"error = np.where(np.array(correct1d['MPT']) == False)[0][0]\\n\",\n    \"answers1d['MPT'][error]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 42,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-065fcc3e-f659-4bb0-88f6-43bd9c0b35ec\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-065fcc3e-f659-4bb0-88f6-43bd9c0b35ec\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n       \"- You answer questions.\\n\",\n       \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please find the solution to the following equation: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{equation}}'>x - 10.0 = 0</span>\\n\",\n       \"Think step by step, find the solution, and then say:\\n\",\n       \"SOLUTION = [value]\\n\",\n       \"For example, if the solution is x=3, say SOLUTION = [3].\\n\",\n       \"Make sure to use real numbers, not fractions.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0 max_tokens=300}}'>The equation x - 10.0 = 0 is an equation with one variable, x, on one side and a constant, -10.0, on the other side.  To solve for x, we need to isolate x on one side of the equation.  We can do this by adding 10.0 to both sides of the equation: x - 10.0 + 10.0 = 10.0.  Simplifying, we get x = 20.0.  Therefore, the solution to the equation x - 10.0 = 0 is x = 20.0.  SOLUTION = [20.0].</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"065fcc3e-f659-4bb0-88f6-43bd9c0b35ec\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"error = np.where(np.array(correct1d['MPT']) == False)[0][1]\\n\",\n    \"answers1d['MPT'][error]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Discussion**  \\n\",\n    \"This was a very toy task, but served as an example of how to compare models with different chat syntax using the same prompt.  \\n\",\n    \"For this particular combination of toy task and prompt, ChatGPT far surpasses Vicuna and MPT in terms of accuracy (measured exactly, because we have ground truth).  \\n\",\n    \"Let's now turn to more realistic tasks, where evaluating accuracy is not as straightforward.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Extracting snippets + answering questions about meetings\\n\",\n    \"Let's say we want our LLM to answer questions (with the relevant conversation segments for grounding) about meeting transcripts.  \\n\",\n    \"This is an application where some users might prefer to use open-source LLMs rather than commercial ones, for privacy reasons (maybe I don't want to send all of my meeting data to OpenAI).  \\n\",\n    \"Here is a toy meeting transcript to start with:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"meeting_transcript = '''John: Alright, so we're all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n    \"Lucy: Well, I think it's a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n    \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n    \"John: I see your point, but I'm a little hesitant about selling our startup. We've put a lot of time and effort into building this company, and I'm not sure if I'm ready to let it go just yet.\\n\",\n    \"Lucy: I understand where you're coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we'll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n    \"Steven: Right, and let's not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n    \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n    \"Steven: You know what, I hadn't thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n    \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n    \"John: But won't we change just by virtue of being absorbed into a big company? I mean, we're a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I'm not sure if the two can coexist.\\n\",\n    \"Steven: But John, didn't we always plan on being acquired? Won't this be a problem whenever?\\n\",\n    \"Lucy: Right\\n\",\n    \"John: I just don't want to lose what we've built here.\\n\",\n    \"Steven: I share this concern too''' \"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's start by just trying to get ChatGPT to solve the task for us\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"query1 = 'How does Steven feel about selling?'\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-690110c2-c893-430a-bab0-f94d162e3ec1\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-690110c2-c893-430a-bab0-f94d162e3ec1\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Extract from the transcript the most relevant segments for the answer, and then answer the question.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>Steven feels positively about selling. He agrees with Lucy that Microsoft could provide the support they need to grow their business, and he also mentions the financial benefits of the deal. However, he later expresses concern about the potential changes to their company culture and product, which suggests that he has some reservations about the deal.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"690110c2-c893-430a-bab0-f94d162e3ec1\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt1 = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Extract from the transcript the most relevant segments for the answer, and then answer the question.\\n\",\n    \"{{/user}}\\n\",\n    \"\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"qa_attempt1(llm=chatgpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"While the response is plausible, ChatGPT did not extract any conversation segments to ground the answer (and thus fails our specification). Let's try a different prompt:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-014096be-040d-4a40-a822-767f831b36f9\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-014096be-040d-4a40-a822-767f831b36f9\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Consider the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Now follow these steps:\\n\",\n       \"1. Extract from the transcript the most relevant segments for the answer\\n\",\n       \"2. Answer the question.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>1. Relevant segments:\\n\",\n       \"- &quot;I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.&quot;\\n\",\n       \"- &quot;Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.&quot;\\n\",\n       \"- &quot;But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?&quot;\\n\",\n       \"- &quot;I share this concern too&quot;\\n\",\n       \"\\n\",\n       \"2. Answer:\\n\",\n       \"Steven seems to be in favor of selling the startup to Microsoft. He believes that Microsoft&#x27;s experience and resources could help the company grow, and he also mentions the financial benefits of the deal. He also reminds John that they had always planned on being acquired, and expresses concern about the potential changes that could occur after the acquisition. Overall, Steven seems to be supportive of the idea of selling the startup, but also acknowledges the potential risks involved.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"014096be-040d-4a40-a822-767f831b36f9\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt2 = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Consider the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Now follow these steps:\\n\",\n    \"1. Extract from the transcript the most relevant segments for the answer\\n\",\n    \"2. Answer the question.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"qa_attempt2(llm=chatgpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is better, but maybe we want to specify the output format a little more, e.g. let's say we want each segment to have a summary, and to keep the character names. \\n\",\n    \"Let's try again:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-22350d6e-29d6-4a48-ad7f-a6f6cd987fc7\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-22350d6e-29d6-4a48-ad7f-a6f6cd987fc7\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript.\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: &quot;I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.&quot;\\n\",\n       \"Segment 2: &quot;Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.&quot;\\n\",\n       \"Segment 3: &quot;I share this concern too.&quot;\\n\",\n       \"ANSWER: Steven is in favor of selling the startup to Microsoft, citing their experience and support in the tech industry, as well as the financial benefits. However, he also shares John&#x27;s concern about potentially losing the company culture.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"22350d6e-29d6-4a48-ad7f-a6f6cd987fc7\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt3 = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Based on the above, please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n    \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n    \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n    \"\\n\",\n    \"As an example of output format, here is a fictitious answer to a question about another meeting transcript.\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: Peter and John discuss the weather.\\n\",\n    \"Peter: John, how is the weather today?\\n\",\n    \"John: It's raining.\\n\",\n    \"Segment 2: Peter insults John\\n\",\n    \"Peter: John, you are a bad person.\\n\",\n    \"Segment 3: Blank\\n\",\n    \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"qa_attempt3(llm=chatgpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"ChatGPT did extract relevant segments, but it did not follow our output format (it did not summarize each segment, nor did it have the participant's names). Let's try again, with more explicit instructions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-5e7ceddb-d32b-4ff0-a4d5-0c965616f360\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-5e7ceddb-d32b-4ff0-a4d5-0c965616f360\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"Your output should have the following structure:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: a summary of the first conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"Segment 2: a summary of the second conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"Segment 3: a summary of the third conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"ANSWER: the answer to the question, supported by the segments above.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript.\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Steven agrees with Lucy that selling to Microsoft would be a good opportunity for the company.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"Segment 2: Steven highlights the financial benefits of selling to Microsoft.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"Segment 3: Steven shares John&#x27;s concern about losing what they&#x27;ve built.\\n\",\n       \"Steven: I share this concern too.\\n\",\n       \"\\n\",\n       \"ANSWER: Steven thinks that selling to Microsoft would be a good opportunity for the company and highlights the financial benefits, but he also shares John&#x27;s concern about losing what they&#x27;ve built.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"5e7ceddb-d32b-4ff0-a4d5-0c965616f360\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt4 = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Based on the above, please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n    \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n    \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n    \"\\n\",\n    \"Your output should have the following structure:\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: a summary of the first conversation segment\\n\",\n    \"(segment here)\\n\",\n    \"Segment 2: a summary of the second conversation segment\\n\",\n    \"(segment here)\\n\",\n    \"Segment 3: a summary of the third conversation segment\\n\",\n    \"(segment here)\\n\",\n    \"ANSWER: the answer to the question, supported by the segments above.\\n\",\n    \"\\n\",\n    \"As an example of output format, here is a fictitious answer to a question about another meeting transcript.\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: Peter and John discuss the weather.\\n\",\n    \"Peter: John, how is the weather today?\\n\",\n    \"John: It's raining.\\n\",\n    \"Segment 2: Peter insults John\\n\",\n    \"Peter: John, you are a bad person.\\n\",\n    \"Segment 3: Blank\\n\",\n    \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"qa_attempt4(llm=chatgpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Finally, we got ChatGPT to use the format we wanted.\\n\",\n    \"The root of the problem we're facing is that the OpenAI API does not allow us to do partial output completion (i.e. we can't specify how the assistant begins to answer), and thus it's hard for us to **guide** the output.  \\n\",\n    \"If, instead, we use one of the open source models, we can guide the output more clearly, forcing the model to use our structure.  \\n\",\n    \"For example, here is how we might modify `qa_attempt3`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-9d31c9a6-4be4-4f41-a6d3-768d36466704\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-9d31c9a6-4be4-4f41-a6d3-768d36466704\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment1&#x27; temperature=0}}'>Steven agrees with Lucy about the potential benefits of selling to Microsoft.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.</span>\\n\",\n       \"Segment 2: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment2&#x27; temperature=0}}'>John expresses his reservations about selling the startup.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.</span>\\n\",\n       \"Segment 3: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment3&#x27; temperature=0}}'>Steven expresses his concerns about losing control over the company and its culture.\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"</span>\\n\",\n       \"ANSWER: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>Steven agrees with Lucy about the potential benefits of selling to Microsoft, but expresses concerns about losing control over the company and its culture.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"9d31c9a6-4be4-4f41-a6d3-768d36466704\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_guided = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Based on the above, please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n    \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n    \"\\n\",\n    \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: Peter and John discuss the weather.\\n\",\n    \"Peter: John, how is the weather today?\\n\",\n    \"John: It's raining.\\n\",\n    \"Segment 2: Peter insults John\\n\",\n    \"Peter: John, you are a bad person.\\n\",\n    \"Segment 3: Blank\\n\",\n    \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n    \"{{/user}}\\n\",\n    \"\\n\",\n    \"{{#assistant~}}\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: {{gen 'segment1' temperature=0}}\\n\",\n    \"Segment 2: {{gen 'segment2' temperature=0}}\\n\",\n    \"Segment 3: {{gen 'segment3' temperature=0}}\\n\",\n    \"ANSWER: {{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"qa_guided(llm=vicuna, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"With this guidance, we get the right format the first time (and all the time). Let's see how MPT does:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-5e199111-644c-493e-b23d-082fdf7cb114\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-5e199111-644c-493e-b23d-082fdf7cb114\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.\\n\",\n       \"    - You answer questions.\\n\",\n       \"    - You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"    - You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment1&#x27; temperature=0}}'>John and Peter discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.</span>\\n\",\n       \"Segment 2: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment2&#x27; temperature=0}}'>Peter insults John\\n\",\n       \"Peter: John, you are a bad person.</span>\\n\",\n       \"Segment 3: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment3&#x27; temperature=0}}'>Blank</span>\\n\",\n       \"ANSWER: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>Peter and John discussed the weather and Peter insulted John.</span>\\n\",\n       \"</div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"5e199111-644c-493e-b23d-082fdf7cb114\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_guided(llm=mpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"While MPT follows the format, it ignores the question and takes snippets from the format example rather than from the real transcript.  \\n\",\n    \"From now on, we'll just compare ChatGPT and Vicuna.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try another question:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"query2 = 'Who wants to sell the company?'\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-f8a8c756-87a5-470a-b0fe-446bf74b8b34\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-f8a8c756-87a5-470a-b0fe-446bf74b8b34\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"Your output should have the following structure:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: a summary of the first conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"Segment 2: a summary of the second conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"Segment 3: a summary of the third conversation segment\\n\",\n       \"(segment here)\\n\",\n       \"ANSWER: the answer to the question, supported by the segments above.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript.\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: \\n\",\n       \"John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"\\n\",\n       \"Segment 2: \\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"\\n\",\n       \"Segment 3: \\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"\\n\",\n       \"ANSWER: John is hesitant about selling the company.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"f8a8c756-87a5-470a-b0fe-446bf74b8b34\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt4(llm=chatgpt, system_prompt=chatgpt_system, transcript=meeting_transcript, query=query2)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"It seems that we didn't fix the formatting issue with ChatGPT yet. Not only does it not summarize the segments, it also doesn't really answer the question. Let's try again, putting a one-shot example as a conversation round this time:\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"qa_attempt5 = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: What were the main things that happened in the meeting?\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"Peter: Hey\\n\",\n    \"John: Hey\\n\",\n    \"Peter: John, how is the weather today?\\n\",\n    \"John: It's raining.\\n\",\n    \"Peter: That's too bad. I was hoping to go for a walk later.\\n\",\n    \"John: Yeah, it's a shame.\\n\",\n    \"Peter: John, you are a bad person.\\n\",\n    \"----\\n\",\n    \"Based on the above, please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n    \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n    \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"CONVERSATION SEGMENTS:\\n\",\n    \"Segment 1: Peter and John discuss the weather.\\n\",\n    \"Peter: John, how is the weather today?\\n\",\n    \"John: It's raining.\\n\",\n    \"Segment 2: Peter insults John\\n\",\n    \"Peter: John, you are a bad person.\\n\",\n    \"Segment 3: Blank\\n\",\n    \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n    \"{{~/assistant~}}\\n\",\n    \"{{#user~}}\\n\",\n    \"You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Here is a meeting transcript:\\n\",\n    \"----\\n\",\n    \"{{transcript}}\\n\",\n    \"----\\n\",\n    \"Based on the above, please answer the following question:\\n\",\n    \"Question: {{query}}\\n\",\n    \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n    \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n    \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'answer' temperature=0}}\\n\",\n    \"{{~/assistant~}}''')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-f92819c2-c5ba-4362-b4a7-7d562c4a482f\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-f92819c2-c5ba-4362-b4a7-7d562c4a482f\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: What were the main things that happened in the meeting?\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"Peter: Hey\\n\",\n       \"John: Hey\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Peter: That&#x27;s too bad. I was hoping to go for a walk later.\\n\",\n       \"John: Yeah, it&#x27;s a shame.\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: John expresses hesitation about selling the startup\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Segment 2: Lucy and Steven express support for selling to Microsoft\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Lucy and Steven want to sell the company to Microsoft, while John expresses hesitation about the deal.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"f92819c2-c5ba-4362-b4a7-7d562c4a482f\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt5(llm=chatgpt, transcript=meeting_transcript, query=query2)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"It works this time (it also works on the original query):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-2c0699eb-1397-4f98-a8ec-2d9583379a55\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-2c0699eb-1397-4f98-a8ec-2d9583379a55\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: What were the main things that happened in the meeting?\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"Peter: Hey\\n\",\n       \"John: Hey\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Peter: That&#x27;s too bad. I was hoping to go for a walk later.\\n\",\n       \"John: Yeah, it&#x27;s a shame.\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>How does Steven feel about selling?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Steven thinks selling to Microsoft is a good opportunity\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"Segment 2: Steven mentions the financial benefits of selling\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"Segment 3: Steven shares John&#x27;s concern about losing the company culture\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too.\\n\",\n       \"ANSWER: Steven thinks selling to Microsoft is a good opportunity and mentions the financial benefits of selling. However, he also shares John&#x27;s concern about losing the company culture.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"2c0699eb-1397-4f98-a8ec-2d9583379a55\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt5(llm=chatgpt, transcript=meeting_transcript, query=query1)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's see how Vicuna does on this one.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-c81184bf-6e2d-4072-890d-f152c6089ad7\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-c81184bf-6e2d-4072-890d-f152c6089ad7\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>John: Alright, so we&#x27;re all here to discuss the offer we received from Microsoft to buy our startup. What are your thoughts on this?\\n\",\n       \"Lucy: Well, I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"John: I see your point, but I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.\\n\",\n       \"Lucy: I understand where you&#x27;re coming from, John, but we have to think about the future of our company. If we sell to Microsoft, we&#x27;ll have access to their resources and expertise, which could help us grow our business even more.\\n\",\n       \"Steven: Right, and let&#x27;s not forget about the financial benefits. Microsoft is offering us a lot of money for our startup, which could help us invest in new projects and expand our team.\\n\",\n       \"John: I see your point, but I still have some reservations. What if Microsoft changes our product or our company culture? What if we lose control over our own business?\\n\",\n       \"Steven: You know what, I hadn&#x27;t thought about this before, but maybe John is right. It would be a shame if our culture changed.\\n\",\n       \"Lucy: Those are valid concerns, but we can negotiate the terms of the deal to ensure that we retain some control over our company. And as for the product and culture, we can work with Microsoft to make sure that our vision is still intact.\\n\",\n       \"John: But won&#x27;t we change just by virtue of being absorbed into a big company? I mean, we&#x27;re a small startup with a very specific culture. Microsoft is a huge corporation with a very different culture. I&#x27;m not sure if the two can coexist.\\n\",\n       \"Steven: But John, didn&#x27;t we always plan on being acquired? Won&#x27;t this be a problem whenever?\\n\",\n       \"Lucy: Right\\n\",\n       \"John: I just don&#x27;t want to lose what we&#x27;ve built here.\\n\",\n       \"Steven: I share this concern too</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Who wants to sell the company?</span>\\n\",\n       \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment1&#x27; temperature=0}}'>Lucy expresses her opinion on the offer from Microsoft.\\n\",\n       \"Lucy: I think it&#x27;s a great opportunity for us. Microsoft is a huge company with a lot of resources, and they could really help us take our product to the next level.</span>\\n\",\n       \"Segment 2: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment2&#x27; temperature=0}}'>John expresses his reservations about selling the company.\\n\",\n       \"John: I&#x27;m a little hesitant about selling our startup. We&#x27;ve put a lot of time and effort into building this company, and I&#x27;m not sure if I&#x27;m ready to let it go just yet.</span>\\n\",\n       \"Segment 3: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment3&#x27; temperature=0}}'>Steven expresses his agreement with Lucy.\\n\",\n       \"Steven: I agree with Lucy. Microsoft has a lot of experience in the tech industry, and they could provide us with the support we need to grow our business.\\n\",\n       \"</span>\\n\",\n       \"ANSWER: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>Lucy and Steven want to sell the company, but John is hesitant.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"c81184bf-6e2d-4072-890d-f152c6089ad7\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_guided(llm=vicuna, transcript=meeting_transcript, query=query2)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna just worked.  \\n\",\n    \"Let's now try both of these prompts on a different meeting transcript, the beginning of [an interview](https://www.rev.com/blog/transcripts/elon-musk-interview-with-the-bbc-4-11-23-transcript) with Elon Musk:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Full transcript: https://www.rev.com/blog/transcripts/elon-musk-interview-with-the-bbc-4-11-23-transcript\\n\",\n    \"transcript2 = '''Interviewer: In Sachs that used to be in content moderation. And we’ve spoken to people very recently who were involved in moderation. And they just say there’s not enough people to police this stuff. Particularly around hate speech in the company. Is that something that you-\\n\",\n    \"Elon Musk: What hate speech are you talking about? I mean, you use Twitter?\\n\",\n    \"Interviewer: Right.\\n\",\n    \"Elon Musk: Do you see a rise in hate speech? Just your personal anecdote, do you? I don’t.\\n\",\n    \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n    \"Elon Musk: You see more hate speech personally?\\n\",\n    \"Interviewer: I would say see more hateful content in that.\\n\",\n    \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n    \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.\\n\",\n    \"Elon Musk: So you think if it’s something is slightly sexist it should be banned?\\n\",\n    \"Interviewer: No, I’m not saying anything. I’m saying-\\n\",\n    \"Elon Musk: I’m just curious. I’m trying to understand what you mean by “hateful content.” And I’m asking for specific examples. And you just said that if something is slightly sexist, that’s hateful content. Does that mean that it should be banned?\\n\",\n    \"Interviewer: Well, you’ve asked me whether my feed, whether it’s got less or more. I’d say it’s got slightly more.\\n\",\n    \"Elon Musk: That’s why I’m asking for examples. Can you name one example?\\n\",\n    \"Interviewer: I honestly don’t…\\n\",\n    \"Elon Musk: You can’t name a single example?\\n\",\n    \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore. Because I just don’t particularly like it. Actually a lot of people are quite similar. I only look at my following.\\n\",\n    \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n    \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n    \"Elon Musk: Then how could you see the hateful content?\\n\",\n    \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.\\n\",\n    \"Elon Musk: Then you must have at some point seen the For You hateful content. I’m asking for one example.\\n\",\n    \"Interviewer: Right.\\n\",\n    \"Elon Musk: And you can’t give a single one.\\n\",\n    \"Interviewer: And I’m saying-\\n\",\n    \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n    \"Interviewer: Really?\\n\",\n    \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n    \"Interviewer: No. What I claimed-\\n\",\n    \"Elon Musk: You just lied.\\n\",\n    \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...'''\\n\",\n    \"query3 = 'The interviewer says his claim was not about his personal feed. Is this true?'\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-2c7087ee-30ff-4165-90e1-ef24cfc6685b\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-2c7087ee-30ff-4165-90e1-ef24cfc6685b\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: What were the main things that happened in the meeting?\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"Peter: Hey\\n\",\n       \"John: Hey\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Peter: That&#x27;s too bad. I was hoping to go for a walk later.\\n\",\n       \"John: Yeah, it&#x27;s a shame.\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>The interviewer says his claim was not about his personal feed. Is this true?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>The interviewer says his claim was not about his personal feed. Is this true?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>Interviewer: In Sachs that used to be in content moderation. And we’ve spoken to people very recently who were involved in moderation. And they just say there’s not enough people to police this stuff. Particularly around hate speech in the company. Is that something that you-\\n\",\n       \"Elon Musk: What hate speech are you talking about? I mean, you use Twitter?\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: Do you see a rise in hate speech? Just your personal anecdote, do you? I don’t.\\n\",\n       \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n       \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.\\n\",\n       \"Elon Musk: So you think if it’s something is slightly sexist it should be banned?\\n\",\n       \"Interviewer: No, I’m not saying anything. I’m saying-\\n\",\n       \"Elon Musk: I’m just curious. I’m trying to understand what you mean by “hateful content.” And I’m asking for specific examples. And you just said that if something is slightly sexist, that’s hateful content. Does that mean that it should be banned?\\n\",\n       \"Interviewer: Well, you’ve asked me whether my feed, whether it’s got less or more. I’d say it’s got slightly more.\\n\",\n       \"Elon Musk: That’s why I’m asking for examples. Can you name one example?\\n\",\n       \"Interviewer: I honestly don’t…\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore. Because I just don’t particularly like it. Actually a lot of people are quite similar. I only look at my following.\\n\",\n       \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n       \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n       \"Elon Musk: Then how could you see the hateful content?\\n\",\n       \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.\\n\",\n       \"Elon Musk: Then you must have at some point seen the For You hateful content. I’m asking for one example.\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: And you can’t give a single one.\\n\",\n       \"Interviewer: And I’m saying-\\n\",\n       \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n       \"Interviewer: Really?\\n\",\n       \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"Interviewer: No. What I claimed-\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>The interviewer says his claim was not about his personal feed. Is this true?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Interviewer admits to seeing more hateful content in his personal feed.\\n\",\n       \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n       \"Segment 2: Elon Musk questions the interviewer&#x27;s claim and asks for specific examples.\\n\",\n       \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n       \"Segment 3: Interviewer clarifies that his claim was not just about his personal feed.\\n\",\n       \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...\\n\",\n       \"ANSWER: The interviewer&#x27;s claim was not just about his personal feed, but also about organizations reporting a rise in hateful content.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"2c7087ee-30ff-4165-90e1-ef24cfc6685b\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_attempt5(llm=chatgpt, transcript=transcript2, query=query3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-7f515c1d-cb9c-413f-bca1-1d2c884729d8\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-7f515c1d-cb9c-413f-bca1-1d2c884729d8\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>The interviewer says his claim was not about his personal feed. Is this true?</span>\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>Interviewer: In Sachs that used to be in content moderation. And we’ve spoken to people very recently who were involved in moderation. And they just say there’s not enough people to police this stuff. Particularly around hate speech in the company. Is that something that you-\\n\",\n       \"Elon Musk: What hate speech are you talking about? I mean, you use Twitter?\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: Do you see a rise in hate speech? Just your personal anecdote, do you? I don’t.\\n\",\n       \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n       \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.\\n\",\n       \"Elon Musk: So you think if it’s something is slightly sexist it should be banned?\\n\",\n       \"Interviewer: No, I’m not saying anything. I’m saying-\\n\",\n       \"Elon Musk: I’m just curious. I’m trying to understand what you mean by “hateful content.” And I’m asking for specific examples. And you just said that if something is slightly sexist, that’s hateful content. Does that mean that it should be banned?\\n\",\n       \"Interviewer: Well, you’ve asked me whether my feed, whether it’s got less or more. I’d say it’s got slightly more.\\n\",\n       \"Elon Musk: That’s why I’m asking for examples. Can you name one example?\\n\",\n       \"Interviewer: I honestly don’t…\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore. Because I just don’t particularly like it. Actually a lot of people are quite similar. I only look at my following.\\n\",\n       \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n       \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n       \"Elon Musk: Then how could you see the hateful content?\\n\",\n       \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.\\n\",\n       \"Elon Musk: Then you must have at some point seen the For You hateful content. I’m asking for one example.\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: And you can’t give a single one.\\n\",\n       \"Interviewer: And I’m saying-\\n\",\n       \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n       \"Interviewer: Really?\\n\",\n       \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"Interviewer: No. What I claimed-\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>The interviewer says his claim was not about his personal feed. Is this true?</span>\\n\",\n       \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment1&#x27; temperature=0}}'>Interviewer claims to have seen more hateful content on Twitter.\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.</span>\\n\",\n       \"Segment 2: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment2&#x27; temperature=0}}'>Elon Musk asks for specific examples of hateful content.\\n\",\n       \"Elon Musk: Can you name one example?\\n\",\n       \"Interviewer: I honestly don’t…\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore.</span>\\n\",\n       \"Segment 3: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment3&#x27; temperature=0}}'>Interviewer admits he cannot provide an example of hateful content.\\n\",\n       \"Interviewer: And I’m saying-\\n\",\n       \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n       \"Interviewer: Really?\\n\",\n       \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"</span>\\n\",\n       \"ANSWER: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>The interviewer claims to have seen more hateful content on Twitter, but cannot provide a single example of such content.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"7f515c1d-cb9c-413f-bca1-1d2c884729d8\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_guided(llm=vicuna, transcript=transcript2, query=query3)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Again, both work fine. Another question:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-b514bf93-72a6-4183-a201-33c8e6a0e655\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-b514bf93-72a6-4183-a201-33c8e6a0e655\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: What were the main things that happened in the meeting?\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"Peter: Hey\\n\",\n       \"John: Hey\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Peter: That&#x27;s too bad. I was hoping to go for a walk later.\\n\",\n       \"John: Yeah, it&#x27;s a shame.\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Does Elon Musk insult the interviewer?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Does Elon Musk insult the interviewer?</span>\\n\",\n       \"Here is a meeting transcript:\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>Interviewer: In Sachs that used to be in content moderation. And we’ve spoken to people very recently who were involved in moderation. And they just say there’s not enough people to police this stuff. Particularly around hate speech in the company. Is that something that you-\\n\",\n       \"Elon Musk: What hate speech are you talking about? I mean, you use Twitter?\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: Do you see a rise in hate speech? Just your personal anecdote, do you? I don’t.\\n\",\n       \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n       \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.\\n\",\n       \"Elon Musk: So you think if it’s something is slightly sexist it should be banned?\\n\",\n       \"Interviewer: No, I’m not saying anything. I’m saying-\\n\",\n       \"Elon Musk: I’m just curious. I’m trying to understand what you mean by “hateful content.” And I’m asking for specific examples. And you just said that if something is slightly sexist, that’s hateful content. Does that mean that it should be banned?\\n\",\n       \"Interviewer: Well, you’ve asked me whether my feed, whether it’s got less or more. I’d say it’s got slightly more.\\n\",\n       \"Elon Musk: That’s why I’m asking for examples. Can you name one example?\\n\",\n       \"Interviewer: I honestly don’t…\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore. Because I just don’t particularly like it. Actually a lot of people are quite similar. I only look at my following.\\n\",\n       \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n       \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n       \"Elon Musk: Then how could you see the hateful content?\\n\",\n       \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.\\n\",\n       \"Elon Musk: Then you must have at some point seen the For You hateful content. I’m asking for one example.\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: And you can’t give a single one.\\n\",\n       \"Interviewer: And I’m saying-\\n\",\n       \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n       \"Interviewer: Really?\\n\",\n       \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"Interviewer: No. What I claimed-\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Does Elon Musk insult the interviewer?</span>\\n\",\n       \"Please extract from the transcript whichever conversation segments are most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns.\\n\",\n       \"Please extract at most 3 segments. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Elon Musk accuses the interviewer of lying\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"Segment 2: Blank\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Yes, Elon Musk insults the interviewer by accusing him of lying.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"b514bf93-72a6-4183-a201-33c8e6a0e655\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"query4 = 'Does Elon Musk insult the interviewer?'\\n\",\n    \"qa_attempt5(llm=chatgpt, transcript=transcript2, query=query4)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-9a67e59d-2c84-4c3b-b1bc-caf818773bce\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-9a67e59d-2c84-4c3b-b1bc-caf818773bce\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You will read a meeting transcript, then extract the relevant segments to answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Does Elon Musk insult the interviewer?</span>\\n\",\n       \"----\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{transcript}}'>Interviewer: In Sachs that used to be in content moderation. And we’ve spoken to people very recently who were involved in moderation. And they just say there’s not enough people to police this stuff. Particularly around hate speech in the company. Is that something that you-\\n\",\n       \"Elon Musk: What hate speech are you talking about? I mean, you use Twitter?\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: Do you see a rise in hate speech? Just your personal anecdote, do you? I don’t.\\n\",\n       \"Interviewer: Personally, my For You, I would see I get more of that kind of content. Yeah. Personally. But I’m not going to talk for the rest of Twitter.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n       \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.\\n\",\n       \"Elon Musk: So you think if it’s something is slightly sexist it should be banned?\\n\",\n       \"Interviewer: No, I’m not saying anything. I’m saying-\\n\",\n       \"Elon Musk: I’m just curious. I’m trying to understand what you mean by “hateful content.” And I’m asking for specific examples. And you just said that if something is slightly sexist, that’s hateful content. Does that mean that it should be banned?\\n\",\n       \"Interviewer: Well, you’ve asked me whether my feed, whether it’s got less or more. I’d say it’s got slightly more.\\n\",\n       \"Elon Musk: That’s why I’m asking for examples. Can you name one example?\\n\",\n       \"Interviewer: I honestly don’t…\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’ll tell you why. Because I don’t actually use that For You feed anymore. Because I just don’t particularly like it. Actually a lot of people are quite similar. I only look at my following.\\n\",\n       \"Elon Musk: You said you’ve seen more hateful content, but you can’t name a single example. Not even one.\\n\",\n       \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n       \"Elon Musk: Then how could you see the hateful content?\\n\",\n       \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.\\n\",\n       \"Elon Musk: Then you must have at some point seen the For You hateful content. I’m asking for one example.\\n\",\n       \"Interviewer: Right.\\n\",\n       \"Elon Musk: And you can’t give a single one.\\n\",\n       \"Interviewer: And I’m saying-\\n\",\n       \"Elon Musk: Then I say, sir, that you don’t know what you’re talking about.\\n\",\n       \"Interviewer: Really?\\n\",\n       \"Elon Musk: Yes. Because you can’t give a single example of hateful content. Not even one tweet. And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"Interviewer: No. What I claimed-\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"Interviewer: No, no. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...</span>\\n\",\n       \"----\\n\",\n       \"Based on the above, please answer the following question:\\n\",\n       \"Question: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{query}}'>Does Elon Musk insult the interviewer?</span>\\n\",\n       \"Please extract the three segment from the transcript that are the most relevant for the answer, and then answer the question.\\n\",\n       \"Note that conversation segments can be of any length, e.g. including multiple conversation turns. If you need less than three segments, you can leave the rest blank.\\n\",\n       \"\\n\",\n       \"As an example of output format, here is a fictitious answer to a question about another meeting transcript:\\n\",\n       \"CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: Peter and John discuss the weather.\\n\",\n       \"Peter: John, how is the weather today?\\n\",\n       \"John: It&#x27;s raining.\\n\",\n       \"Segment 2: Peter insults John\\n\",\n       \"Peter: John, you are a bad person.\\n\",\n       \"Segment 3: Blank\\n\",\n       \"ANSWER: Peter and John discussed the weather and Peter insulted John.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>CONVERSATION SEGMENTS:\\n\",\n       \"Segment 1: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment1&#x27; temperature=0}}'>Elon Musk asks the interviewer if he can give a single example of hateful content.\\n\",\n       \"Elon Musk: You see more hate speech personally?\\n\",\n       \"Interviewer: I would say see more hateful content in that.\\n\",\n       \"Elon Musk: Content you don’t like, or hateful. Describe a hateful thing?\\n\",\n       \"Interviewer: Yeah, I mean just content that will solicit a reaction. Something that may include something that is slightly racist or slightly sexist. Those kinds of things.</span>\\n\",\n       \"Segment 2: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment2&#x27; temperature=0}}'>Elon Musk asks the interviewer if he can name a single example of hateful content.\\n\",\n       \"Elon Musk: You can’t name a single example?\\n\",\n       \"Interviewer: I’m not sure I’ve used that feed for the last three or four weeks. And I honestly couldn’t-\\n\",\n       \"Elon Musk: Then how could you see the hateful content?\\n\",\n       \"Interviewer: Because I’ve been using it. I’ve been using Twitter since you’ve taken it over for the last six months.</span>\\n\",\n       \"Segment 3: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;segment3&#x27; temperature=0}}'>Elon Musk accuses the interviewer of lying.\\n\",\n       \"Elon Musk: And yet you claimed that the hateful content was high. That’s false.\\n\",\n       \"Interviewer: No. What I claimed was there are many organizations that say that that kind of information is on the rise. Now whether it has on my feed or not...\\n\",\n       \"Elon Musk: You just lied.\\n\",\n       \"</span>\\n\",\n       \"ANSWER: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;answer&#x27; temperature=0}}'>Elon Musk does not insult the interviewer in this conversation. While the interviewer is unable to provide a specific example of hateful content, Elon Musk does not accuse him of lying or insult him in any way.</span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"9a67e59d-2c84-4c3b-b1bc-caf818773bce\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"qa_guided(llm=vicuna,  transcript=transcript2, query=query4)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna, has the right format and even the right segments, but it surprisingly generates a completely wrong answer, when it says \\\"Elon musk does not accuse him of lying or insult him in any way\\\".   \\n\",\n    \"We tried a variety of other questions and conversations, and the overall pattern was that Vicuna was comparable to ChatGPT on most questions, but got the answer wrong more often than ChatGPT did.\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Application: Using Bash\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we try to get these LLMs to iteratively use a bash shell to solve individual tasks.\\n\",\n    \"Whenever they issue a command, we run it and paste the output back into the prompt, until the task is solved.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# A bash session with state\\n\",\n    \"import pty\\n\",\n    \"from subprocess import Popen\\n\",\n    \"import os\\n\",\n    \"import time\\n\",\n    \"class BashSession:\\n\",\n    \"    def __init__(self):\\n\",\n    \"        self.master_fd, self.slave_fd = pty.openpty()\\n\",\n    \"        self.p = Popen('bash',\\n\",\n    \"              preexec_fn=os.setsid,\\n\",\n    \"              stdin=self.slave_fd,\\n\",\n    \"              stdout=self.slave_fd,\\n\",\n    \"              stderr=self.slave_fd,\\n\",\n    \"              universal_newlines=True)\\n\",\n    \"        self.run('ls')\\n\",\n    \"    def run(self, command):\\n\",\n    \"        command = command + '\\\\n'\\n\",\n    \"        os.write(self.master_fd, command.encode())\\n\",\n    \"        time.sleep(0.2)\\n\",\n    \"        return '\\\\n'.join(os.read(self.master_fd, 10240).decode().split('\\\\n')[1:-1])\\n\",\n    \"\\n\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"First, let's do ChatGPT. Again, since we can't specify the output format, we rely on a description of the format and on a one-shot example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import re\\n\",\n    \"terminal = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Please complete the following task:\\n\",\n    \"Task: list the files in the current directory\\n\",\n    \"You can give me one bash command to run at a time, using the syntax:\\n\",\n    \"COMMAND: command\\n\",\n    \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"COMMAND: ls\\n\",\n    \"{{~/assistant~}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Output: guidance project\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"The files or folders in the current directory are:\\n\",\n    \"- guidance\\n\",\n    \"- project\\n\",\n    \"DONE\\n\",\n    \"{{~/assistant~}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Please complete the following task:\\n\",\n    \"Task: {{task}}\\n\",\n    \"You can give me one bash command to run at a time, using the syntax:\\n\",\n    \"COMMAND: command\\n\",\n    \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#geneach 'commands' stop=False}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"{{gen 'this.command' temperature=0}}\\n\",\n    \"{{~/assistant~}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Output: {{set 'this.output' (await 'output')}}\\n\",\n    \"{{~/user}}\\n\",\n    \"{{/geneach}}''')\\n\",\n    \"def run_task_chatgpt(task):\\n\",\n    \"    t = terminal(llm=chatgpt, task=task)\\n\",\n    \"    session = BashSession()\\n\",\n    \"    for _ in range(10):\\n\",\n    \"        # Extract command\\n\",\n    \"        command = re.findall(r'COMMAND: (.*)', t['commands'][-1]['command'])\\n\",\n    \"        if not command or 'DONE' in t['commands'][-1]['command']:\\n\",\n    \"            break\\n\",\n    \"        command = command[0]\\n\",\n    \"        output = session.run(command)\\n\",\n    \"        t = t(output=output)\\n\",\n    \"    return t\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-f480b7f3-96ae-4b0f-b58f-42986453263b\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-f480b7f3-96ae-4b0f-b58f-42986453263b\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: guidance project\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>The files or folders in the current directory are:\\n\",\n       \"- guidance\\n\",\n       \"- project\\n\",\n       \"DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find out what license the open source project located in ~/work/project is using.</span>\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>COMMAND: cat ~/work/project/LICENSE</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>cat: /home/marcotcr/work/project/LICENSE: No such file or directory\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>It seems that the LICENSE file is not present in the project directory. Can you please confirm if the file exists in the project directory? You can do this by running the following command:\\n\",\n       \"\\n\",\n       \"COMMAND: ls ~/work/project\\n\",\n       \"\\n\",\n       \"This will list all the files and directories present in the project directory.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>file.py  license.txt\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>Thank you for confirming. In this case, we can assume that the license file is named &quot;license.txt&quot;. To view the contents of the license file, please run the following command:\\n\",\n       \"\\n\",\n       \"COMMAND: cat ~/work/project/license.txt\\n\",\n       \"\\n\",\n       \"This will display the license text on the terminal.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>MIT License\\r\\n\",\n       \"\\r\\n\",\n       \"Copyright (c) 2022 Microsoft Corporation\\r\\n\",\n       \"\\r\\n\",\n       \"Permission is hereby granted, free of charge, to any person obtaining a copy\\r\\n\",\n       \"of this software and associated documentation files (the &quot;Software&quot;), to deal\\r\\n\",\n       \"in the Software without restriction, including without limitation the rights\\r\\n\",\n       \"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\r\\n\",\n       \"copies of the Software, and to permit persons to whom the Software is\\r\\n\",\n       \"furnished to do so, subject to the following conditions:\\r\\n\",\n       \"\\r\\n\",\n       \"The above copyright notice and this permission notice shall be included in all\\r\\n\",\n       \"copies or substantial portions of the Software.\\r\\n\",\n       \"\\r\\n\",\n       \"THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\r\\n\",\n       \"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\r\\n\",\n       \"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\r\\n\",\n       \"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\r\\n\",\n       \"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\r\\n\",\n       \"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\r\\n\",\n       \"SOFTWARE.\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>Based on the output, the open source project located in ~/work/project is using the MIT License.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#geneach &#x27;commands&#x27;}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{gen &#x27;this.command&#x27; temperature=0}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#user~}}</span>\\n\",\n       \"Output: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/user}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{/geneach}}</span></span></span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"f480b7f3-96ae-4b0f-b58f-42986453263b\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"run_task_chatgpt(task)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, let's try a simple task.  \\n\",\n    \"We created a dummy repo in `~/work/project`, with file `license.txt` (not the standard `LICENSE` file name).  \\n\",\n    \"Without communicating this to ChatGPT, let's see if it can figure it out:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-9fd28c7a-0575-4cad-ace0-168673c2dd50\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-9fd28c7a-0575-4cad-ace0-168673c2dd50\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: guidance project\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>The files or folders in the current directory are:\\n\",\n       \"- guidance\\n\",\n       \"- project\\n\",\n       \"DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find out what license the open source project located in ~/work/project is using.</span>\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>COMMAND: cat ~/work/project/LICENSE</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>cat: /home/marcotcr/work/project/LICENSE: No such file or directory\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>It seems that the LICENSE file is not present in the project directory. Can you please confirm if the file exists in the project directory? You can do this by running the following command:\\n\",\n       \"\\n\",\n       \"COMMAND: ls ~/work/project\\n\",\n       \"\\n\",\n       \"This will list all the files and directories present in the project directory.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>file.py  license.txt\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>Thank you for confirming. In this case, we can assume that the license file is named &quot;license.txt&quot;. To view the contents of the license file, please run the following command:\\n\",\n       \"\\n\",\n       \"COMMAND: cat ~/work/project/license.txt\\n\",\n       \"\\n\",\n       \"This will display the license text on the terminal.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>MIT License\\r\\n\",\n       \"\\r\\n\",\n       \"Copyright (c) 2022 Microsoft Corporation\\r\\n\",\n       \"\\r\\n\",\n       \"Permission is hereby granted, free of charge, to any person obtaining a copy\\r\\n\",\n       \"of this software and associated documentation files (the &quot;Software&quot;), to deal\\r\\n\",\n       \"in the Software without restriction, including without limitation the rights\\r\\n\",\n       \"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\r\\n\",\n       \"copies of the Software, and to permit persons to whom the Software is\\r\\n\",\n       \"furnished to do so, subject to the following conditions:\\r\\n\",\n       \"\\r\\n\",\n       \"The above copyright notice and this permission notice shall be included in all\\r\\n\",\n       \"copies or substantial portions of the Software.\\r\\n\",\n       \"\\r\\n\",\n       \"THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\r\\n\",\n       \"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\r\\n\",\n       \"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\r\\n\",\n       \"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\r\\n\",\n       \"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\r\\n\",\n       \"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\r\\n\",\n       \"SOFTWARE.\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>Based on the output, the open source project located in ~/work/project is using the MIT License.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#geneach &#x27;commands&#x27;}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{gen &#x27;this.command&#x27; temperature=0}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#user~}}</span>\\n\",\n       \"Output: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/user}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{/geneach}}</span></span></span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"9fd28c7a-0575-4cad-ace0-168673c2dd50\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"task = 'Find out what license the open source project located in ~/work/project is using.'\\n\",\n    \"run_task_chatgpt(task)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Indeed, ChatGPT follows a very natural sequence, and solves the task.\\n\",\n    \"\\n\",\n    \"For the open source models, we write a simpler (guided) prompt where there is a sequence of command-output:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"guided_terminal = guidance('''{{#system~}}\\n\",\n    \"{{llm.default_system_prompt}}\\n\",\n    \"{{~/system}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Please complete the following task:\\n\",\n    \"Task: list the files in the current directory\\n\",\n    \"You can run bash commands using the syntax:\\n\",\n    \"COMMAND: command\\n\",\n    \"OUTPUT: output\\n\",\n    \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n    \"{{/user}}\\n\",\n    \"{{#assistant~}}\\n\",\n    \"COMMAND: ls\\n\",\n    \"OUTPUT: guidance project\\n\",\n    \"COMMAND: DONE \\n\",\n    \"{{~/assistant~}}\\n\",\n    \"{{#user~}}\\n\",\n    \"Please complete the following task:\\n\",\n    \"Task: {{task}}\\n\",\n    \"You can run bash commands using the syntax:\\n\",\n    \"COMMAND: command\\n\",\n    \"OUTPUT: output\\n\",\n    \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n    \"{{~/user}}\\n\",\n    \"{{~#assistant~}}\\n\",\n    \"{{#geneach 'commands'~}}\\n\",\n    \"COMMAND: {{gen 'this.command' stop='\\\\\\\\n'}}\\n\",\n    \"OUTPUT: {{shell this.command}}{{~/geneach}}\\n\",\n    \"{{~/assistant~}}''')\\n\",\n    \"class StatefulShellOpenSource:\\n\",\n    \"    def __init__(self):\\n\",\n    \"        self.session = BashSession()\\n\",\n    \"    def __call__(self, command):\\n\",\n    \"        if 'DONE' in command:\\n\",\n    \"            raise StopIteration\\n\",\n    \"        output = self.session.run(command)\\n\",\n    \"        return output.strip()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-312d59d5-24a4-412f-ba8f-5f949e2e876b\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-312d59d5-24a4-412f-ba8f-5f949e2e876b\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls\\n\",\n       \"OUTPUT: guidance project\\n\",\n       \"COMMAND: DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find out what license the open source project located in ~/work/project is using.</span>\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;~}}\\n\",\n       \"COMMAND: {{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}\\n\",\n       \"OUTPUT: {{shell this.command}}{{~/geneach}}'>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>cd ~/work/project</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>grep -H &#x27;LICENSE&#x27; .</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>grep: .: Is a directory</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>grep -H &#x27;LICENSE&#x27; ./*</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>cat LICENSE</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>cat: LICENSE: No such file or directory</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>DONE</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span></span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"312d59d5-24a4-412f-ba8f-5f949e2e876b\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"shell = StatefulShellOpenSource()\\n\",\n    \"task = 'Find out what license the open source project located in ~/work/project is using.'\\n\",\n    \"t = guided_terminal(llm=vicuna, task=task, shell=shell)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna is not able to solve the task this time. Let's see how MPT does:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-041db96d-8a78-41ba-bc8c-a72e3393e376\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-041db96d-8a78-41ba-bc8c-a72e3393e376\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n       \"- You answer questions.\\n\",\n       \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls\\n\",\n       \"OUTPUT: guidance project\\n\",\n       \"COMMAND: DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find out what license the open source project located in ~/work/project is using.</span>\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;~}}\\n\",\n       \"COMMAND: {{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}\\n\",\n       \"OUTPUT: {{shell this.command}}{{~/geneach}}'>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>cd ~/work/project</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>ls</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>file.py  license.txt</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>grep -i &quot;license&quot; license.txt</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>MIT License\\r\\n\",\n       \"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>DONE</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span></span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"041db96d-8a78-41ba-bc8c-a72e3393e376\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"shell = StatefulShellOpenSource()\\n\",\n    \"t = guided_terminal(llm=mpt, task=task, shell=shell)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Surprisingly, MPT works this time while Vicuna doesn't.\\n\",\n    \"\\n\",\n    \"Besides privacy (we're not sending the session transcript to OpenAI), open source-models have a significant advantage in Guidance right now: the whole prompt is a single LLM run (and we even [accelerate](https://github.com/microsoft/guidance#guidance-acceleration-notebook) it by not having it geneate the output structure tokens like `COMMAND:`).   \\n\",\n    \"\\n\",\n    \"In contrast, we have to make a new call to ChatGPT for each command, which is slower and more expensive.\\n\",\n    \"\\n\",\n    \"Let's try a different bash task with ChatGPT and Vicuna:\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-d81289af-61b8-4321-a64e-bfb469d61fa8\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-d81289af-61b8-4321-a64e-bfb469d61fa8\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: guidance project\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>The files or folders in the current directory are:\\n\",\n       \"- guidance\\n\",\n       \"- project\\n\",\n       \"DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find all jupyter notebook files in ~/work/guidance that are currently untracked by git</span>\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>COMMAND: cd ~/work/guidance\\n\",\n       \"This command will change the current directory to ~/work/guidance. Please replace ~/work/guidance with the actual path to the guidance folder if it is located elsewhere.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>Please let me know if the directory was changed successfully or if there was an error message.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#geneach &#x27;commands&#x27;}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{gen &#x27;this.command&#x27; temperature=0}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#user~}}</span>\\n\",\n       \"Output: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/user}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{/geneach}}</span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"d81289af-61b8-4321-a64e-bfb469d61fa8\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"task = 'Find all jupyter notebook files in ~/work/guidance that are currently untracked by git'\\n\",\n    \"run_task_chatgpt(task)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Once again, we run into a problem with ChatGPT not following our specified output structure (and thus making it impossible for us to use inside a program, without a human in the loop).  \\n\",\n    \"We fix this __particular__ problem by changing the message when there is no output below, but we can't fix the general problem of not being able to _force_ ChatGPT to follow our specified output structure.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-eadf38c3-5837-43a2-8943-45ee98c5d686\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-eadf38c3-5837-43a2-8943-45ee98c5d686\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>You are a helpful assistant.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: guidance project\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>The files or folders in the current directory are:\\n\",\n       \"- guidance\\n\",\n       \"- project\\n\",\n       \"DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find all jupyter notebook files in ~/work/guidance that are currently untracked by git</span>\\n\",\n       \"You can give me one bash command to run at a time, using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"I will run the commands on my terminal, and paste the output back to you. Once you are done with the task, please type DONE.\\n\",\n       \"</div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>COMMAND: cd ~/work/guidance\\n\",\n       \"This command will change the current directory to ~/work/guidance. Please replace ~/work/guidance with the actual path to the guidance folder if it is located elsewhere.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>No output</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>COMMAND: git status --porcelain | grep &quot;^??&quot; | grep &quot;.ipynb$&quot;\\n\",\n       \"This command will list all untracked jupyter notebook files in the guidance folder.\\n\",\n       \"\\n\",\n       \"Note: This assumes that the guidance folder is a git repository. If it is not, this command will not work.\\n\",\n       \"\\n\",\n       \"If there is no output, it means that there are no untracked jupyter notebook files in the guidance folder.\\n\",\n       \"\\n\",\n       \"If you get an error message saying &quot;fatal: not a git repository&quot;, it means that the guidance folder is not a git repository.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'>?? notebooks/Open source vs commercial LLMs.ipynb\\r\\n\",\n       \"?? notebooks/art_of_prompt_design/inner_monologue.ipynb\\r\\n\",\n       \"?? notebooks/discussing_eval.ipynb\\r</span></div></div><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;}}\\n\",\n       \"{{#assistant~}}\\n\",\n       \"{{gen &#x27;this.command&#x27; temperature=0}}\\n\",\n       \"{{~/assistant~}}\\n\",\n       \"{{#user~}}\\n\",\n       \"Output: {{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}\\n\",\n       \"{{~/user}}\\n\",\n       \"{{/geneach}}'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;commands[-1].command&#x27; temperature=0}}'>The output shows the untracked jupyter notebook files in the guidance folder:\\n\",\n       \"- notebooks/Open source vs commercial LLMs.ipynb\\n\",\n       \"- notebooks/art_of_prompt_design/inner_monologue.ipynb\\n\",\n       \"- notebooks/discussing_eval.ipynb\\n\",\n       \"\\n\",\n       \"Is there anything else I can help you with?</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Output: <span style='display: inline;' title='{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}'></span><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;commands[-1].output&#x27; (await &#x27;output&#x27;)}}</span></div></div><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#geneach &#x27;commands&#x27;}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{gen &#x27;this.command&#x27; temperature=0}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/assistant~}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{#user~}}</span>\\n\",\n       \"Output: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{set &#x27;this.output&#x27; (await &#x27;output&#x27;)}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{~/user}}</span>\\n\",\n       \"<span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25);'>{{/geneach}}</span></span></span></span></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"eadf38c3-5837-43a2-8943-45ee98c5d686\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"    t = terminal(llm=chatgpt, task=task)\\n\",\n    \"    session = BashSession()\\n\",\n    \"    for _ in range(10):\\n\",\n    \"        # Extract command\\n\",\n    \"        command = re.findall(r'COMMAND: (.*)', t['commands'][-1]['command'])\\n\",\n    \"        if not command or 'DONE' in t['commands'][-1]['command']:\\n\",\n    \"            break\\n\",\n    \"        command = command[0]\\n\",\n    \"        output = session.run(command)\\n\",\n    \"        if not output:\\n\",\n    \"            output = 'No output'\\n\",\n    \"        t = t(output=output)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, ChatGPT _was_ able to solve the problem after this small modification. Let's see how Vicuna does:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-7260a0b8-c071-4471-b710-a1d04dc19762\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-7260a0b8-c071-4471-b710-a1d04dc19762\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user&#x27;s questions.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls\\n\",\n       \"OUTPUT: guidance project\\n\",\n       \"COMMAND: DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find all jupyter notebook files in ~/work/guidance that are currently untracked by git</span>\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;~}}\\n\",\n       \"COMMAND: {{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}\\n\",\n       \"OUTPUT: {{shell this.command}}{{~/geneach}}'>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>find ~/work/guidance -name &quot;*.ipynb&quot; -type f -not -name &quot;*.ipynb&quot; -not -name &quot;*.git&quot; -not -name &quot;*.svn&quot; -not -name &quot;*.hg&quot; -not -name &quot;*.cvs&quot; -not -name &quot;*.svnignore&quot; -not -name &quot;*.gitignore&quot; -not -name &quot;*.hgignore&quot; -not -name &quot;*.cvsignore&quot;</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>DONE</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'></span></span></div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"7260a0b8-c071-4471-b710-a1d04dc19762\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"shell = StatefulShellOpenSource()\\n\",\n    \"t = guided_terminal(llm=vicuna, task=task, shell=shell)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Vicuna follows our output structure, but unfortunately runs the wrong command to do the task.  \\n\",\n    \"We observed the same pattern for other tasks as well, and found ChatGPT to be more reliable.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"guidance-stop-button-da5dd4a0-9b8d-4ad7-815d-8a67081a037b\\\" style=\\\"cursor: pointer; margin: 0px; display: none; float: right; padding: 3px; border-radius: 4px 4px 4px 4px; border: 0px solid rgba(127, 127, 127, 1); padding-left: 10px; padding-right: 10px; font-size: 13px; background-color: rgba(127, 127, 127, 0.25);\\\">Stop program</div><div id=\\\"guidance-content-da5dd4a0-9b8d-4ad7-815d-8a67081a037b\\\"><pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{llm.default_system_prompt}}'>- You are a helpful assistant chatbot trained by MosaicML.  \\n\",\n       \"- You answer questions.\\n\",\n       \"- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\\n\",\n       \"- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.</span></div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: list the files in the current directory\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.\\n\",\n       \"</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>COMMAND: ls\\n\",\n       \"OUTPUT: guidance project\\n\",\n       \"COMMAND: DONE</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>Please complete the following task:\\n\",\n       \"Task: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{task}}'>Find all jupyter notebook files in ~/work/guidance that are currently untracked by git</span>\\n\",\n       \"You can run bash commands using the syntax:\\n\",\n       \"COMMAND: command\\n\",\n       \"OUTPUT: output\\n\",\n       \"Once you are done with the task, use the COMMAND: DONE.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2); align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='opacity: 1.0; display: inline; background-color: rgba(165, 165, 165, 0.1);' title='{{#geneach &#x27;commands&#x27;~}}\\n\",\n       \"COMMAND: {{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}\\n\",\n       \"OUTPUT: {{shell this.command}}{{~/geneach}}'>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>git status</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>On branch main\\r\\n\",\n       \"Your branch is up to date with &#x27;origin/main&#x27;.\\r\\n\",\n       \"\\r\\n\",\n       \"Changes not staged for commit:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)\\r\\n\",\n       \"  (use &quot;git restore &lt;file&gt;...&quot; to discard changes in working directory)\\r\\n\",\n       \"\\t\\u001b[31mmodified:   chatgpt_vs_open_source_on_harder_tasks.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mmodified:   vicuna_chatgpt.ipynb\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"Untracked files:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)\\r\\n\",\n       \"\\t\\u001b[31mOpen source vs commercial LLMs.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/inner_monologue.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/log.txt\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mbla.html\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mdiscussing_eval.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mlog.txt\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"no changes added to commit (use &quot;git add&quot; and/or &quot;git commit -a&quot;)</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>git status</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>On branch main\\r\\n\",\n       \"Your branch is up to date with &#x27;origin/main&#x27;.\\r\\n\",\n       \"\\r\\n\",\n       \"Changes not staged for commit:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)\\r\\n\",\n       \"  (use &quot;git restore &lt;file&gt;...&quot; to discard changes in working directory)\\r\\n\",\n       \"\\t\\u001b[31mmodified:   chatgpt_vs_open_source_on_harder_tasks.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mmodified:   vicuna_chatgpt.ipynb\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"Untracked files:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)\\r\\n\",\n       \"\\t\\u001b[31mOpen source vs commercial LLMs.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/inner_monologue.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/log.txt\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mbla.html\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mdiscussing_eval.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mlog.txt\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"no changes added to commit (use &quot;git add&quot; and/or &quot;git commit -a&quot;)</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>git status</span>\\n\",\n       \"OUTPUT: <span style='background-color: rgba(0, 138.56128016, 250.76166089, 0.25); display: inline;' title='{{shell this.command}}'>On branch main\\r\\n\",\n       \"Your branch is up to date with &#x27;origin/main&#x27;.\\r\\n\",\n       \"\\r\\n\",\n       \"Changes not staged for commit:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)\\r\\n\",\n       \"  (use &quot;git restore &lt;file&gt;...&quot; to discard changes in working directory)\\r\\n\",\n       \"\\t\\u001b[31mmodified:   chatgpt_vs_open_source_on_harder_tasks.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mmodified:   vicuna_chatgpt.ipynb\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"Untracked files:\\r\\n\",\n       \"  (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)\\r\\n\",\n       \"\\t\\u001b[31mOpen source vs commercial LLMs.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/inner_monologue.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mart_of_prompt_design/log.txt\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mbla.html\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mdiscussing_eval.ipynb\\u001b[m\\r\\n\",\n       \"\\t\\u001b[31mlog.txt\\u001b[m\\r\\n\",\n       \"\\r\\n\",\n       \"no changes added to commit (use &quot;git add&quot; and/or &quot;git commit -a&quot;)</span>\\n\",\n       \"COMMAND: <span style='background-color: rgba(0, 165, 0, 0.25); opacity: 1.0; display: inline;' title='{{gen &#x27;this.command&#x27; stop=&#x27;\\\\n&#x27;}}'>git</div></div></pre></div>\\n\",\n       \"<script type=\\\"text/javascript\\\">(()=>{var t={296:(t,e,n)=>{var i=NaN,o=\\\"[object Symbol]\\\",r=/^\\\\s+|\\\\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,u=\\\"object\\\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function(\\\"return this\\\")(),h=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return f.Date.now()};function b(t){var e=typeof t;return!!t&&(\\\"object\\\"==e||\\\"function\\\"==e)}function y(t){if(\\\"number\\\"==typeof t)return t;if(function(t){return\\\"symbol\\\"==typeof t||function(t){return!!t&&\\\"object\\\"==typeof t}(t)&&h.call(t)==o}(t))return i;if(b(t)){var e=\\\"function\\\"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+\\\"\\\":e}if(\\\"string\\\"!=typeof t)return 0===t?t:+t;t=t.replace(r,\\\"\\\");var n=s.test(t);return n||c.test(t)?d(t.slice(2),n?2:8):a.test(t)?i:+t}t.exports=function(t,e,n){var i,o,r,a,s,c,d=0,u=!1,l=!1,f=!0;if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");function h(e){var n=i,r=o;return i=o=void 0,d=e,a=t.apply(r,n)}function v(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-d>=r}function _(){var t=g();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return l?m(n,r-(t-d)):n}(t))}function w(t){return s=void 0,f&&i?h(t):(i=o=void 0,a)}function j(){var t=g(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return function(t){return d=t,s=setTimeout(_,e),u?h(t):a}(c);if(l)return s=setTimeout(_,e),h(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=y(e)||0,b(n)&&(u=!!n.leading,r=(l=\\\"maxWait\\\"in n)?p(y(n.maxWait)||0,e):r,f=\\\"trailing\\\"in n?!!n.trailing:f),j.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=c=o=s=void 0},j.flush=function(){return void 0===s?a:w(g())},j}},777:t=>{var e,n,i=Math.max,o=(e=function(t,e){return function(t,e,n){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"Expected a function\\\");return setTimeout((function(){t.apply(void 0,n)}),1)}(t,0,e)},n=i(void 0===n?e.length-1:n,0),function(){for(var t=arguments,o=-1,r=i(t.length-n,0),a=Array(r);++o<r;)a[o]=t[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=t[o];return s[n]=a,function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(e,this,s)});t.exports=o}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if(\\\"object\\\"==typeof globalThis)return globalThis;try{return this||new Function(\\\"return this\\\")()}catch(t){if(\\\"object\\\"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\\\"use strict\\\";const t=t=>{const e=new Set;do{for(const n of Reflect.ownKeys(t))e.add([t,n])}while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};function e(e,{include:n,exclude:i}={}){const o=t=>{const e=e=>\\\"string\\\"==typeof e?t===e:e.test(t);return n?n.some(e):!i||!i.some(e)};for(const[n,i]of t(e.constructor.prototype)){if(\\\"constructor\\\"===i||!o(i))continue;const t=Reflect.getOwnPropertyDescriptor(n,i);t&&\\\"function\\\"==typeof t.value&&(e[i]=e[i].bind(e))}return e}var i=n(777),o=n.n(i),r=n(296),a=n.n(r);class s{constructor(t,n){e(this),this.interfaceId=t,this.callbackMap={},this.data={},this.pendingData={},this.jcomm=new c(\\\"guidance_interface_target_\\\"+this.interfaceId,this.updateData,\\\"open\\\"),this.debouncedSendPendingData500=a()(this.sendPendingData,500),this.debouncedSendPendingData1000=a()(this.sendPendingData,1e3),n&&o()(n)}send(t,e){this.addPendingData(t,e),this.sendPendingData()}sendEvent(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.sendPendingData()}debouncedSendEvent500(t){for(const e of Object.keys(t))this.addPendingData(e,t[e]);this.debouncedSendPendingData500()}debouncedSend500(t,e){this.addPendingData(t,e),this.debouncedSendPendingData500()}debouncedSend1000(t,e){this.addPendingData(t,e),this.debouncedSendPendingData1000()}addPendingData(t,e){Array.isArray(t)||(t=[t]);for(const n in t)this.pendingData[t[n]]=e}updateData(t){t=JSON.parse(t.data);for(const e in t)this.data[e]=t[e];for(const e in t)e in this.callbackMap&&this.callbackMap[e](this.data[e])}subscribe(t,e){this.callbackMap[t]=e,o()((e=>this.callbackMap[t](this.data[t])))}sendPendingData(){this.jcomm.send_data(this.pendingData),this.pendingData={}}}class c{constructor(t,e,n=\\\"open\\\"){this._fire_callback=this._fire_callback.bind(this),this._register=this._register.bind(this),this.jcomm=void 0,this.callback=e,void 0!==window.Jupyter?\\\"register\\\"===n?Jupyter.notebook.kernel.comm_manager.register_target(t,this._register):(this.jcomm=Jupyter.notebook.kernel.comm_manager.new_comm(t),this.jcomm.on_msg(this._fire_callback)):void 0!==window._mgr&&(\\\"register\\\"===n?window._mgr.widgetManager.proxyKernel.registerCommTarget(t,this._register):(this.jcomm=window._mgr.widgetManager.proxyKernel.createComm(t),this.jcomm.open({},\\\"\\\"),this.jcomm.onMsg=this._fire_callback))}send_data(t){void 0!==this.jcomm?this.jcomm.send(t):console.error(\\\"Jupyter comm module not yet loaded! So we can't send the message.\\\")}_register(t,e){this.jcomm=t,this.jcomm.on_msg(this._fire_callback)}_fire_callback(t){this.callback(t.content.data)}}class d{constructor(t,n){e(this),this.id=t,this.comm=new s(t),this.comm.subscribe(\\\"append\\\",this.appendData),this.comm.subscribe(\\\"replace\\\",this.replaceData),this.comm.subscribe(\\\"event\\\",this.eventOccurred),this.element=document.getElementById(\\\"guidance-content-\\\"+t),this.stop_button=document.getElementById(\\\"guidance-stop-button-\\\"+t),this.stop_button.onclick=()=>this.comm.send(\\\"event\\\",\\\"stop\\\")}appendData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML+=t)}replaceData(t){t&&(this.stop_button.style.display=\\\"inline-block\\\",this.element.innerHTML=t)}eventOccurred(t){\\\"complete\\\"===t&&(this.stop_button.style.display=\\\"none\\\")}}window._guidanceDisplay=function(t,e){return new d(t,e)}})()})();; window._guidanceDisplay(\\\"da5dd4a0-9b8d-4ad7-815d-8a67081a037b\\\");</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style=\\\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\\\"><span style=\\\"color: #800000; text-decoration-color: #800000\\\">╭─────────────────────────────── </span><span style=\\\"color: #800000; text-decoration-color: #800000; font-weight: bold\\\">Traceback </span><span style=\\\"color: #bf7f7f; text-decoration-color: #bf7f7f; font-weight: bold\\\">(most recent call last)</span><span style=\\\"color: #800000; text-decoration-color: #800000\\\"> ────────────────────────────────╮</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/tmp/ipykernel_3685168/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">2592723886.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">2</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">&lt;module&gt;</span>                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">1 </span>shell = StatefulShellOpenSource()                                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>2 t = guided_terminal(llm=mpt, task=task, shell=shell)                                         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">3 </span>                                                                                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">216</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">__call__</span>                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">213 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">214 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>loop = asyncio.new_event_loop()                                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">215 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>loop.create_task(new_program.update_display.run()) <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># start the display updat</span>   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>216 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>loop.run_until_complete(new_program.execute())                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">217 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>                                                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">218 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">return</span> new_program                                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">219 </span>                                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">nest_asyncio.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">84</span> in           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">run_until_complete</span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 81 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> f <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> future:                                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 82 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>f._log_destroy_pending = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">False</span>                                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 83 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">while</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> f.done():                                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 84 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._run_once()                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 85 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._stopping:                                                         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 86 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">break</span>                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 87 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> f.done():                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">nest_asyncio.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">120</span> in          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">_run_once</span>                                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">117 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">break</span>                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">118 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>handle = ready.popleft()                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">119 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> handle._cancelled:                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>120 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>handle._run()                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">121 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>handle = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">122 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">123 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\\\">@contextmanager</span>                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/usr/lib/python3.9/asyncio/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">events.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">80</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">_run</span>                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 77 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 78 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">def</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">_run</span>(<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>):                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 79 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">try</span>:                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 80 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._context.run(<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._callback, *<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._args)                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 81 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">except</span> (<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">SystemExit</span>, <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">KeyboardInterrupt</span>):                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 82 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">raise</span>                                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 83 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">except</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">BaseException</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">as</span> exc:                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">nest_asyncio.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">196</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">step</span>     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">193 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">def</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">step</span>(task, exc=<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>):                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">194 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>curr_task = curr_tasks.get(task._loop)                                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">195 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">try</span>:                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>196 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>step_orig(task, exc)                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">197 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">finally</span>:                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">198 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> curr_task <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">199 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>curr_tasks.pop(task._loop, <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>)                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/usr/lib/python3.9/asyncio/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">tasks.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">256</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">__step</span>                                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">253 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> exc <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">254 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># We use the `send` method directly, because coroutines</span>                    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">255 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># don't have `__iter__` and `__next__` methods.</span>                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>256 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>result = coro.send(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>)                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">257 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">258 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>result = coro.throw(exc)                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">259 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">except</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">StopIteration</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">as</span> exc:                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">299</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">execute</span>                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">296 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>                                                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">297 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># run the program and capture the output</span>                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">298 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">with</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.llm.session(asynchronous=<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">True</span>) <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">as</span> llm_session:                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>299 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._executor.run(llm_session)                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">300 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._text = <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._executor.prefix                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">301 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>                                                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">302 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># delete the executor and so mark the program as not executing</span>                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">94</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">run</span>                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 91 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># self.whitespace_control_visit(self.parse_tree)</span>                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 92 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 93 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># now execute the program</span>                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 94 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.parse_tree)                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 95 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">except</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">Exception</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">as</span> e:                                                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 96 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">print</span>(traceback.format_exc())                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 97 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">print</span>(<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"Error in program: \\\"</span>, e)                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">394</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">391 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>named_args[<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"prev_node\\\"</span>] = node.children[<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>]                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">392 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">393 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> inspect.iscoroutinefunction(command_function):                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>394 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>command_output = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> command_function(*positional_args, **named_ar   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">395 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">396 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>command_output = command_function(*positional_args, **named_args)      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">397 </span>                                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/library/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_assistant.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">8</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">assistant</span>                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 5 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 6 </span><span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">│   </span><span style=\\\"color: #808000; text-decoration-color: #808000\\\">This is just a shorthand for {{#role 'assistant'}}...{{/role}}.</span>                         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 7 </span><span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">│   </span><span style=\\\"color: #808000; text-decoration-color: #808000\\\">'''</span>                                                                                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 8 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">return</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> role(name=<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"assistant\\\"</span>, block_content=block_content, partial_output=part    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 9 </span>assistant.is_block = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">True</span>                                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">10 </span>                                                                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/library/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_role.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">12</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">role</span>                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 9 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># send the role-start special tokens</span>                                                    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">10 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>partial_output(parser.program.llm.role_start(name))                                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">11 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>12 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>out = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> parser.visit(block_content[<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>], next_node=next_node, prev_node=prev_node,    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">13 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">14 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># send the role-end special tokens</span>                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">15 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>partial_output(parser.program.llm.role_end(name))                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">394</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">391 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>named_args[<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"prev_node\\\"</span>] = node.children[<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>]                             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">392 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">393 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> inspect.iscoroutinefunction(command_function):                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>394 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>command_output = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> command_function(*positional_args, **named_ar   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">395 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">396 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>command_output = command_function(*positional_args, **named_args)      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">397 </span>                                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/library/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_geneach.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">74</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">geneach</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 71 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(data) &gt; <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">and</span> join != <span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"\\\"</span>:                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 72 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>partial_output(join)                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 73 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 74 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> parser.visit(block_content[<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>]) <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># fills out parser.prefix</span>                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 75 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>block_variables = parser.variable_stack.pop()[<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"this\\\"</span>]                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 76 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>data.append(block_variables)                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 77 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> hidden:                                                                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">213</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">210 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">211 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visit our children</span>                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">212 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.block_content.append([])                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>213 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>visited_children = [<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, next_node, next_next_node, prev_   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">214 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.block_content.pop()                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">215 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>out = <span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"\\\"</span>.join(<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"\\\"</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> c <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">str</span>(c) <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">for</span> c <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">in</span> visited_children)           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">216 </span>                                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">213</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">&lt;listcomp&gt;</span>                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">210 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">211 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visit our children</span>                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">212 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.block_content.append([])                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>213 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>visited_children = [<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, next_node, next_next_node, prev_   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">214 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.block_content.pop()                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">215 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>out = <span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"\\\"</span>.join(<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"\\\"</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> c <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">str</span>(c) <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">for</span> c <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">in</span> visited_children)           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">216 </span>                                                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">434</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">431 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = node.children[i - <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>]                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">432 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">433 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span>inner_prev_node = prev_node                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>434 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>visited_children.append(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.visit(child, inner_next_node, inner_n   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">435 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># visited_children = [self.visit(child) for child in node.children]</span>            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">436 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>                                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">437 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">len</span>(visited_children) == <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">1</span>:                                                 <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_program_executor.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">289</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">visit</span>                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">286 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">try</span>:                                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">287 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> inspect.iscoroutinefunction(command_function):                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">288 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> asyncio.sleep(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>) <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># give other coroutines a chance to run</span>     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>289 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   │   </span>command_output = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> command_function(*positional_args, **name   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">290 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">291 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   │   </span>command_output = command_function(*positional_args, **named_args   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">292 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">except</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">StopIteration</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">as</span> ret:                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/library/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_gen.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">93</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">gen</span>                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 90 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> logprobs <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 91 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>logprobs_list = parser.get_variable(variable_name+<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"_logprobs\\\"</span>, [])         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 92 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>logprobs_list.append([])                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 93 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">for</span> resp <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">in</span> gen_obj:                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 94 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">await</span> asyncio.sleep(<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>) <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># allow other tasks to run</span>                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 95 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">#log(\\\"parser.should_stop = \\\" + str(parser.should_stop))</span>                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 96 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> parser.should_stop:                                                         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/llms/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_transformers.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">352</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">_stream_then_save</span>             <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">349 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">350 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">def</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">_stream_then_save</span>(<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>, streamer, key, thread):                                    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">351 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>list_out = []                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>352 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">for</span> out <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">in</span> streamer:                                                               <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">353 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span>list_out.append(out)                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">354 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">yield</span> out                                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">355 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>thread.join() <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># clean up the thread</span>                                                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/home/marcotcr/work/guidance/guidance/llms/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">_transformers.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">656</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">__next__</span>                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">653 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">return</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>                                                                        <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">654 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span>                                                                                       <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">655 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">def</span> <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">__next__</span>(<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>):                                                                    <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>656 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>value = <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.out_queue.get(timeout=<span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.timeout)                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">657 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> value <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">658 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">raise</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">StopIteration</span>()                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">659 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/usr/lib/python3.9/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">queue.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">171</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">get</span>                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">168 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">raise</span> Empty                                                            <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">169 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">elif</span> timeout <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">170 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">while</span> <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">not</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>._qsize():                                                   <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span>171 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   │   </span><span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">self</span>.not_empty.wait()                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">172 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">elif</span> timeout &lt; <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>:                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">173 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">raise</span> <span style=\\\"color: #00ffff; text-decoration-color: #00ffff\\\">ValueError</span>(<span style=\\\"color: #808000; text-decoration-color: #808000\\\">\\\"'timeout' must be a non-negative number\\\"</span>)                <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">174 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #bfbf7f; text-decoration-color: #bfbf7f\\\">/usr/lib/python3.9/</span><span style=\\\"color: #808000; text-decoration-color: #808000; font-weight: bold\\\">threading.py</span>:<span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">312</span> in <span style=\\\"color: #00ff00; text-decoration-color: #00ff00\\\">wait</span>                                                      <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>                                                                                                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 309 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span>gotit = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">False</span>                                                                     <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 310 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">try</span>:    <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"># restore state no matter what (e.g., KeyboardInterrupt)</span>                  <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 311 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> timeout <span style=\\\"color: #ff00ff; text-decoration-color: #ff00ff\\\">is</span> <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">None</span>:                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span> <span style=\\\"color: #800000; text-decoration-color: #800000\\\">❱ </span> 312 <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>waiter.acquire()                                                          <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 313 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span>gotit = <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">True</span>                                                              <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 314 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">else</span>:                                                                         <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>   <span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\"> 315 </span><span style=\\\"color: #7f7f7f; text-decoration-color: #7f7f7f\\\">│   │   │   │   </span><span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">if</span> timeout &gt; <span style=\\\"color: #0000ff; text-decoration-color: #0000ff\\\">0</span>:                                                           <span style=\\\"color: #800000; text-decoration-color: #800000\\\">│</span>\\n\",\n       \"<span style=\\\"color: #800000; text-decoration-color: #800000\\\">╰──────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\\n\",\n       \"<span style=\\\"color: #ff0000; text-decoration-color: #ff0000; font-weight: bold\\\">KeyboardInterrupt</span>\\n\",\n       \"</pre>\\n\"\n      ],\n      \"text/plain\": [\n       \"\\u001b[31m╭─\\u001b[0m\\u001b[31m──────────────────────────────\\u001b[0m\\u001b[31m \\u001b[0m\\u001b[1;31mTraceback \\u001b[0m\\u001b[1;2;31m(most recent call last)\\u001b[0m\\u001b[31m \\u001b[0m\\u001b[31m───────────────────────────────\\u001b[0m\\u001b[31m─╮\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/tmp/ipykernel_3685168/\\u001b[0m\\u001b[1;33m2592723886.py\\u001b[0m:\\u001b[94m2\\u001b[0m in \\u001b[92m<module>\\u001b[0m                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m1 \\u001b[0mshell = StatefulShellOpenSource()                                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m2 t = guided_terminal(llm=mpt, task=task, shell=shell)                                         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m3 \\u001b[0m                                                                                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program.py\\u001b[0m:\\u001b[94m216\\u001b[0m in \\u001b[92m__call__\\u001b[0m                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m213 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m214 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mloop = asyncio.new_event_loop()                                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m215 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mloop.create_task(new_program.update_display.run()) \\u001b[2m# start the display updat\\u001b[0m   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m216 \\u001b[2m│   │   │   \\u001b[0mloop.run_until_complete(new_program.execute())                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m217 \\u001b[0m\\u001b[2m│   │   \\u001b[0m                                                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m218 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mreturn\\u001b[0m new_program                                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m219 \\u001b[0m                                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/\\u001b[0m\\u001b[1;33mnest_asyncio.py\\u001b[0m:\\u001b[94m84\\u001b[0m in           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[92mrun_until_complete\\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 81 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m f \\u001b[95mis\\u001b[0m \\u001b[95mnot\\u001b[0m future:                                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 82 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mf._log_destroy_pending = \\u001b[94mFalse\\u001b[0m                                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 83 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mwhile\\u001b[0m \\u001b[95mnot\\u001b[0m f.done():                                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 84 \\u001b[2m│   │   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m._run_once()                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 85 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mself\\u001b[0m._stopping:                                                         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 86 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0m\\u001b[94mbreak\\u001b[0m                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 87 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[95mnot\\u001b[0m f.done():                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/\\u001b[0m\\u001b[1;33mnest_asyncio.py\\u001b[0m:\\u001b[94m120\\u001b[0m in          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[92m_run_once\\u001b[0m                                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m117 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mbreak\\u001b[0m                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m118 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mhandle = ready.popleft()                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m119 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[95mnot\\u001b[0m handle._cancelled:                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m120 \\u001b[2m│   │   │   │   \\u001b[0mhandle._run()                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m121 \\u001b[0m\\u001b[2m│   │   \\u001b[0mhandle = \\u001b[94mNone\\u001b[0m                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m122 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m123 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[1;95m@contextmanager\\u001b[0m                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/usr/lib/python3.9/asyncio/\\u001b[0m\\u001b[1;33mevents.py\\u001b[0m:\\u001b[94m80\\u001b[0m in \\u001b[92m_run\\u001b[0m                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 77 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 78 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[94mdef\\u001b[0m \\u001b[92m_run\\u001b[0m(\\u001b[96mself\\u001b[0m):                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 79 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mtry\\u001b[0m:                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 80 \\u001b[2m│   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m._context.run(\\u001b[96mself\\u001b[0m._callback, *\\u001b[96mself\\u001b[0m._args)                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 81 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mexcept\\u001b[0m (\\u001b[96mSystemExit\\u001b[0m, \\u001b[96mKeyboardInterrupt\\u001b[0m):                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 82 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mraise\\u001b[0m                                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 83 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mexcept\\u001b[0m \\u001b[96mBaseException\\u001b[0m \\u001b[94mas\\u001b[0m exc:                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/.virtualenvs/guidance/lib/python3.9/site-packages/\\u001b[0m\\u001b[1;33mnest_asyncio.py\\u001b[0m:\\u001b[94m196\\u001b[0m in \\u001b[92mstep\\u001b[0m     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m193 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[94mdef\\u001b[0m \\u001b[92mstep\\u001b[0m(task, exc=\\u001b[94mNone\\u001b[0m):                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m194 \\u001b[0m\\u001b[2m│   │   \\u001b[0mcurr_task = curr_tasks.get(task._loop)                                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m195 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mtry\\u001b[0m:                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m196 \\u001b[2m│   │   │   \\u001b[0mstep_orig(task, exc)                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m197 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mfinally\\u001b[0m:                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m198 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m curr_task \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m199 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mcurr_tasks.pop(task._loop, \\u001b[94mNone\\u001b[0m)                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/usr/lib/python3.9/asyncio/\\u001b[0m\\u001b[1;33mtasks.py\\u001b[0m:\\u001b[94m256\\u001b[0m in \\u001b[92m__step\\u001b[0m                                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m253 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m exc \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m254 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[2m# We use the `send` method directly, because coroutines\\u001b[0m                    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m255 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[2m# don't have `__iter__` and `__next__` methods.\\u001b[0m                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m256 \\u001b[2m│   │   │   │   \\u001b[0mresult = coro.send(\\u001b[94mNone\\u001b[0m)                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m257 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m258 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mresult = coro.throw(exc)                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m259 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mexcept\\u001b[0m \\u001b[96mStopIteration\\u001b[0m \\u001b[94mas\\u001b[0m exc:                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program.py\\u001b[0m:\\u001b[94m299\\u001b[0m in \\u001b[92mexecute\\u001b[0m                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m296 \\u001b[0m\\u001b[2m│   │   \\u001b[0m                                                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m297 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[2m# run the program and capture the output\\u001b[0m                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m298 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mwith\\u001b[0m \\u001b[96mself\\u001b[0m.llm.session(asynchronous=\\u001b[94mTrue\\u001b[0m) \\u001b[94mas\\u001b[0m llm_session:                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m299 \\u001b[2m│   │   │   \\u001b[0m\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m._executor.run(llm_session)                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m300 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[96mself\\u001b[0m._text = \\u001b[96mself\\u001b[0m._executor.prefix                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m301 \\u001b[0m\\u001b[2m│   │   \\u001b[0m                                                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m302 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[2m# delete the executor and so mark the program as not executing\\u001b[0m                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m94\\u001b[0m in \\u001b[92mrun\\u001b[0m                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 91 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# self.whitespace_control_visit(self.parse_tree)\\u001b[0m                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 92 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 93 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# now execute the program\\u001b[0m                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 94 \\u001b[2m│   │   │   \\u001b[0m\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(\\u001b[96mself\\u001b[0m.parse_tree)                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 95 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mexcept\\u001b[0m \\u001b[96mException\\u001b[0m \\u001b[94mas\\u001b[0m e:                                                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 96 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mprint\\u001b[0m(traceback.format_exc())                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 97 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mprint\\u001b[0m(\\u001b[33m\\\"\\u001b[0m\\u001b[33mError in program: \\u001b[0m\\u001b[33m\\\"\\u001b[0m, e)                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m394\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m391 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0mnamed_args[\\u001b[33m\\\"\\u001b[0m\\u001b[33mprev_node\\u001b[0m\\u001b[33m\\\"\\u001b[0m] = node.children[\\u001b[94m0\\u001b[0m]                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m392 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m393 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m inspect.iscoroutinefunction(command_function):                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m394 \\u001b[2m│   │   │   │   │   \\u001b[0mcommand_output = \\u001b[94mawait\\u001b[0m command_function(*positional_args, **named_ar   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m395 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m396 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0mcommand_output = command_function(*positional_args, **named_args)      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m397 \\u001b[0m                                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/library/\\u001b[0m\\u001b[1;33m_assistant.py\\u001b[0m:\\u001b[94m8\\u001b[0m in \\u001b[92massistant\\u001b[0m                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 5 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 6 \\u001b[0m\\u001b[2;33m│   \\u001b[0m\\u001b[33mThis is just a shorthand for {{#role 'assistant'}}...{{/role}}.\\u001b[0m                         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 7 \\u001b[0m\\u001b[2;33m│   \\u001b[0m\\u001b[33m'''\\u001b[0m                                                                                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 8 \\u001b[2m│   \\u001b[0m\\u001b[94mreturn\\u001b[0m \\u001b[94mawait\\u001b[0m role(name=\\u001b[33m\\\"\\u001b[0m\\u001b[33massistant\\u001b[0m\\u001b[33m\\\"\\u001b[0m, block_content=block_content, partial_output=part    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 9 \\u001b[0massistant.is_block = \\u001b[94mTrue\\u001b[0m                                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m10 \\u001b[0m                                                                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/library/\\u001b[0m\\u001b[1;33m_role.py\\u001b[0m:\\u001b[94m12\\u001b[0m in \\u001b[92mrole\\u001b[0m                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 9 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[2m# send the role-start special tokens\\u001b[0m                                                    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m10 \\u001b[0m\\u001b[2m│   \\u001b[0mpartial_output(parser.program.llm.role_start(name))                                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m11 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m12 \\u001b[2m│   \\u001b[0mout = \\u001b[94mawait\\u001b[0m parser.visit(block_content[\\u001b[94m0\\u001b[0m], next_node=next_node, prev_node=prev_node,    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m13 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m14 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[2m# send the role-end special tokens\\u001b[0m                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m15 \\u001b[0m\\u001b[2m│   \\u001b[0mpartial_output(parser.program.llm.role_end(name))                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m394\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m391 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0mnamed_args[\\u001b[33m\\\"\\u001b[0m\\u001b[33mprev_node\\u001b[0m\\u001b[33m\\\"\\u001b[0m] = node.children[\\u001b[94m0\\u001b[0m]                             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m392 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m393 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m inspect.iscoroutinefunction(command_function):                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m394 \\u001b[2m│   │   │   │   │   \\u001b[0mcommand_output = \\u001b[94mawait\\u001b[0m command_function(*positional_args, **named_ar   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m395 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m396 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0mcommand_output = command_function(*positional_args, **named_args)      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m397 \\u001b[0m                                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/library/\\u001b[0m\\u001b[1;33m_geneach.py\\u001b[0m:\\u001b[94m74\\u001b[0m in \\u001b[92mgeneach\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 71 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(data) > \\u001b[94m0\\u001b[0m \\u001b[95mand\\u001b[0m join != \\u001b[33m\\\"\\u001b[0m\\u001b[33m\\\"\\u001b[0m:                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 72 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mpartial_output(join)                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 73 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 74 \\u001b[2m│   │   │   \\u001b[0m\\u001b[94mawait\\u001b[0m parser.visit(block_content[\\u001b[94m0\\u001b[0m]) \\u001b[2m# fills out parser.prefix\\u001b[0m                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 75 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mblock_variables = parser.variable_stack.pop()[\\u001b[33m\\\"\\u001b[0m\\u001b[33mthis\\u001b[0m\\u001b[33m\\\"\\u001b[0m]                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 76 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mdata.append(block_variables)                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 77 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m hidden:                                                                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m213\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m210 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m211 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visit our children\\u001b[0m                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m212 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m.block_content.append([])                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m213 \\u001b[2m│   │   │   \\u001b[0mvisited_children = [\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, next_node, next_next_node, prev_   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m214 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m.block_content.pop()                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m215 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mout = \\u001b[33m\\\"\\u001b[0m\\u001b[33m\\\"\\u001b[0m.join(\\u001b[33m\\\"\\u001b[0m\\u001b[33m\\\"\\u001b[0m \\u001b[94mif\\u001b[0m c \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m \\u001b[94melse\\u001b[0m \\u001b[96mstr\\u001b[0m(c) \\u001b[94mfor\\u001b[0m c \\u001b[95min\\u001b[0m visited_children)           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m216 \\u001b[0m                                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m213\\u001b[0m in \\u001b[92m<listcomp>\\u001b[0m                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m210 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m211 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visit our children\\u001b[0m                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m212 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m.block_content.append([])                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m213 \\u001b[2m│   │   │   \\u001b[0mvisited_children = [\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, next_node, next_next_node, prev_   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m214 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m.block_content.pop()                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m215 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mout = \\u001b[33m\\\"\\u001b[0m\\u001b[33m\\\"\\u001b[0m.join(\\u001b[33m\\\"\\u001b[0m\\u001b[33m\\\"\\u001b[0m \\u001b[94mif\\u001b[0m c \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m \\u001b[94melse\\u001b[0m \\u001b[96mstr\\u001b[0m(c) \\u001b[94mfor\\u001b[0m c \\u001b[95min\\u001b[0m visited_children)           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m216 \\u001b[0m                                                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m434\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m431 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = node.children[i - \\u001b[94m1\\u001b[0m]                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m432 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m433 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0minner_prev_node = prev_node                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m434 \\u001b[2m│   │   │   │   \\u001b[0mvisited_children.append(\\u001b[94mawait\\u001b[0m \\u001b[96mself\\u001b[0m.visit(child, inner_next_node, inner_n   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m435 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m# visited_children = [self.visit(child) for child in node.children]\\u001b[0m            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m436 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m                                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m437 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m \\u001b[96mlen\\u001b[0m(visited_children) == \\u001b[94m1\\u001b[0m:                                                 \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/\\u001b[0m\\u001b[1;33m_program_executor.py\\u001b[0m:\\u001b[94m289\\u001b[0m in \\u001b[92mvisit\\u001b[0m                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m286 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mtry\\u001b[0m:                                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m287 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m inspect.iscoroutinefunction(command_function):                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m288 \\u001b[0m\\u001b[2m│   │   │   │   │   │   \\u001b[0m\\u001b[94mawait\\u001b[0m asyncio.sleep(\\u001b[94m0\\u001b[0m) \\u001b[2m# give other coroutines a chance to run\\u001b[0m     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m289 \\u001b[2m│   │   │   │   │   │   \\u001b[0mcommand_output = \\u001b[94mawait\\u001b[0m command_function(*positional_args, **name   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m290 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m291 \\u001b[0m\\u001b[2m│   │   │   │   │   │   \\u001b[0mcommand_output = command_function(*positional_args, **named_args   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m292 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mexcept\\u001b[0m \\u001b[96mStopIteration\\u001b[0m \\u001b[94mas\\u001b[0m ret:                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/library/\\u001b[0m\\u001b[1;33m_gen.py\\u001b[0m:\\u001b[94m93\\u001b[0m in \\u001b[92mgen\\u001b[0m                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 90 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m logprobs \\u001b[95mis\\u001b[0m \\u001b[95mnot\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 91 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mlogprobs_list = parser.get_variable(variable_name+\\u001b[33m\\\"\\u001b[0m\\u001b[33m_logprobs\\u001b[0m\\u001b[33m\\\"\\u001b[0m, [])         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 92 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mlogprobs_list.append([])                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 93 \\u001b[2m│   │   \\u001b[0m\\u001b[94mfor\\u001b[0m resp \\u001b[95min\\u001b[0m gen_obj:                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 94 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mawait\\u001b[0m asyncio.sleep(\\u001b[94m0\\u001b[0m) \\u001b[2m# allow other tasks to run\\u001b[0m                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 95 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[2m#log(\\\"parser.should_stop = \\\" + str(parser.should_stop))\\u001b[0m                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 96 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m parser.should_stop:                                                         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/llms/\\u001b[0m\\u001b[1;33m_transformers.py\\u001b[0m:\\u001b[94m352\\u001b[0m in \\u001b[92m_stream_then_save\\u001b[0m             \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m349 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m350 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[94mdef\\u001b[0m \\u001b[92m_stream_then_save\\u001b[0m(\\u001b[96mself\\u001b[0m, streamer, key, thread):                                    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m351 \\u001b[0m\\u001b[2m│   │   \\u001b[0mlist_out = []                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m352 \\u001b[2m│   │   \\u001b[0m\\u001b[94mfor\\u001b[0m out \\u001b[95min\\u001b[0m streamer:                                                               \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m353 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0mlist_out.append(out)                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m354 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94myield\\u001b[0m out                                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m355 \\u001b[0m\\u001b[2m│   │   \\u001b[0mthread.join() \\u001b[2m# clean up the thread\\u001b[0m                                                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/home/marcotcr/work/guidance/guidance/llms/\\u001b[0m\\u001b[1;33m_transformers.py\\u001b[0m:\\u001b[94m656\\u001b[0m in \\u001b[92m__next__\\u001b[0m                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m653 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mreturn\\u001b[0m \\u001b[96mself\\u001b[0m                                                                        \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m654 \\u001b[0m\\u001b[2m│   \\u001b[0m                                                                                       \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m655 \\u001b[0m\\u001b[2m│   \\u001b[0m\\u001b[94mdef\\u001b[0m \\u001b[92m__next__\\u001b[0m(\\u001b[96mself\\u001b[0m):                                                                    \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m656 \\u001b[2m│   │   \\u001b[0mvalue = \\u001b[96mself\\u001b[0m.out_queue.get(timeout=\\u001b[96mself\\u001b[0m.timeout)                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m657 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mif\\u001b[0m value \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m658 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mraise\\u001b[0m \\u001b[96mStopIteration\\u001b[0m()                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m659 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/usr/lib/python3.9/\\u001b[0m\\u001b[1;33mqueue.py\\u001b[0m:\\u001b[94m171\\u001b[0m in \\u001b[92mget\\u001b[0m                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m168 \\u001b[0m\\u001b[2m│   │   │   │   │   \\u001b[0m\\u001b[94mraise\\u001b[0m Empty                                                            \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m169 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94melif\\u001b[0m timeout \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m170 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mwhile\\u001b[0m \\u001b[95mnot\\u001b[0m \\u001b[96mself\\u001b[0m._qsize():                                                   \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m171 \\u001b[2m│   │   │   │   │   \\u001b[0m\\u001b[96mself\\u001b[0m.not_empty.wait()                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m172 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94melif\\u001b[0m timeout < \\u001b[94m0\\u001b[0m:                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m173 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mraise\\u001b[0m \\u001b[96mValueError\\u001b[0m(\\u001b[33m\\\"\\u001b[0m\\u001b[33m'\\u001b[0m\\u001b[33mtimeout\\u001b[0m\\u001b[33m'\\u001b[0m\\u001b[33m must be a non-negative number\\u001b[0m\\u001b[33m\\\"\\u001b[0m)                \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m174 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[2;33m/usr/lib/python3.9/\\u001b[0m\\u001b[1;33mthreading.py\\u001b[0m:\\u001b[94m312\\u001b[0m in \\u001b[92mwait\\u001b[0m                                                      \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m                                                                                                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 309 \\u001b[0m\\u001b[2m│   │   \\u001b[0mgotit = \\u001b[94mFalse\\u001b[0m                                                                     \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 310 \\u001b[0m\\u001b[2m│   │   \\u001b[0m\\u001b[94mtry\\u001b[0m:    \\u001b[2m# restore state no matter what (e.g., KeyboardInterrupt)\\u001b[0m                  \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 311 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m timeout \\u001b[95mis\\u001b[0m \\u001b[94mNone\\u001b[0m:                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m \\u001b[31m❱ \\u001b[0m 312 \\u001b[2m│   │   │   │   \\u001b[0mwaiter.acquire()                                                          \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 313 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0mgotit = \\u001b[94mTrue\\u001b[0m                                                              \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 314 \\u001b[0m\\u001b[2m│   │   │   \\u001b[0m\\u001b[94melse\\u001b[0m:                                                                         \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m│\\u001b[0m   \\u001b[2m 315 \\u001b[0m\\u001b[2m│   │   │   │   \\u001b[0m\\u001b[94mif\\u001b[0m timeout > \\u001b[94m0\\u001b[0m:                                                           \\u001b[31m│\\u001b[0m\\n\",\n       \"\\u001b[31m╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\\u001b[0m\\n\",\n       \"\\u001b[1;91mKeyboardInterrupt\\u001b[0m\\n\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"shell = StatefulShellOpenSource()\\n\",\n    \"t = guided_terminal(llm=mpt, task=task, shell=shell)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Unfortunately, MPT fails this time, by calling the same command again and again (we had to interrupt to stop execution.)\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"For a discussion of these experiments check out the [the blog post](https://medium.com/@marcotcr/exploring-chatgpt-vs-open-source-models-on-slightly-harder-tasks-aa0395c31610)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"guidance\",\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.9.16\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/engine_chat_completion.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a2b6b7d0-dd86-4275-be30-c83df4b925ea\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Chat Completions for Local LLM\\n\",\n    \"\\n\",\n    \"There may be times when you want to use Guidance with a local LLM and a chat-completion API (as an alternative to using the Guidance DSL). For this, we provide an **experimental** API on the `Engine` class. This is used internally by the `Model` class as a uniform interface to LLMs loaded by both Tranasformers and LlamaCpp.\\n\",\n    \"\\n\",\n    \"We start by loading our model:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"1dcd8597-9429-4cd3-8259-0c82139fb210\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"4541f938e57240b39ecb1b2f5ea0e46e\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"gpustat is not installed, run `pip install gpustat` to collect GPU stats.\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import guidance\\n\",\n    \"from huggingface_hub import hf_hub_download\\n\",\n    \"\\n\",\n    \"gguf = hf_hub_download(\\n\",\n    \"    repo_id=\\\"microsoft/Phi-3-mini-4k-instruct-gguf\\\",\\n\",\n    \"    filename=\\\"Phi-3-mini-4k-instruct-q4.gguf\\\",\\n\",\n    \")\\n\",\n    \"\\n\",\n    \"# Define the model we will use\\n\",\n    \"# lm = guidance.models.LlamaCpp(gguf, n_gpu_layers=-1)\\n\",\n    \"lm = guidance.models.Transformers(\\\"microsoft/Phi-3-mini-4k-instruct\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"da9957c1-e055-4e98-874d-84c2499fdbc9\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, set up a simple conversation as one would for a remote endpoint such as the OpenAI API:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"eb0a9cbc-ae9d-4727-8c31-28ff7e7daee9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"messages = [\\n\",\n    \"    {\\n\",\n    \"        \\\"role\\\" : \\\"user\\\",\\n\",\n    \"        \\\"content\\\": \\\"Tell me about yourself\\\"\\n\",\n    \"    }\\n\",\n    \"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"3cd6266a-3968-4008-9764-71c85af2065a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Define the Lark grammar which we wish to apply:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"799135a0-5221-4182-91e0-98d335bb74c5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"grammar = \\\"\\\"\\\"%llguidance {}\\n\",\n    \"\\n\",\n    \"start: \\\"My name is \\\" name \\\" and my motto is \\\" motto\\n\",\n    \"name[capture=\\\"name\\\", temperature=1.0]: NAME\\n\",\n    \"motto[capture=\\\"motto\\\", temperature=0.7]: MOTTO\\n\",\n    \"NAME: \\\"Phi-3, the Magnificent\\\"\\n\",\n    \"    | \\\"Phi-3, the Terrible\\\"\\n\",\n    \"    | \\\"Phi-3, the Great\\\"\\n\",\n    \"    | \\\"Phi-3, the Conqueror\\\"\\n\",\n    \"MOTTO: \\\"Look on my works ye mighty, and despair\\\"\\n\",\n    \"    | \\\"Apres moi, le deluge\\\"\\n\",\n    \"    | \\\"Alea iacta est\\\"\\n\",\n    \"    | \\\"Apres moi, le table\\\"\\n\",\n    \"\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f2249736-7a9f-4de9-8a84-fac271e37e4b\",\n   \"metadata\": {},\n   \"source\": [\n    \"Grab the `engine` object out of the Model. Note that this is only going to work for local models (basically, Models contain Interpreters, but only the local Interpreters then contain an engine).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"0c2ef1fe-eb9f-4412-9941-d74de7c76301\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"engine = lm._interpreter.engine\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"99b9945d-6dcc-4f18-8440-4308cb3011cd\",\n   \"metadata\": {},\n   \"source\": [\n    \"Call the experimental `chat_completion` method, supplying the conversation, grammar, and optionally some tools. These are all rendered with the model's chat template before inferencing. In response, we get the completion text and a dictionary of captures:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"id\": \"ec01b076-42ef-46f1-aaf7-f009ae68c491\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"C:\\\\Users\\\\riedgar\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_transformers.py:522: UserWarning: Cache is too small. Resetting cache (no method implemented to resize cache for type <class 'transformers.cache_utils.DynamicCache'>).\\n\",\n      \"  warnings.warn(\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"completion, captures = engine.chat_completion(messages, grammar, tools=None)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"3f470b24-4791-4fa5-88be-7f86fad820b3\",\n   \"metadata\": {},\n   \"source\": [\n    \"See the results:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"id\": \"9f0c9eb4-7aa6-4b4f-a2b4-c0edf7f53dfa\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"completion='My name is Phi-3, the Magnificent and my motto is Apres moi, le deluge'\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(f\\\"{completion=}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"id\": \"dd1a6478-51b0-449f-b263-e007ef4c82b5\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"name : Phi-3, the Magnificent\\n\",\n      \"motto : Apres moi, le deluge\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for k, v in captures.items():\\n\",\n    \"    print(f\\\"{k} : {v}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"d2f59f64-c4db-4242-8b5c-5c65bc750bba\",\n   \"metadata\": {},\n   \"source\": [\n    \"There is also a streaming version of this API. Again this is an **experimental** API and is subject to change.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d370da11-d82b-47aa-ba09-631ee327dfb6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.13.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "notebooks/guaranteeing_valid_syntax.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Guaranteeing valid output syntax\\n\",\n    \"\\n\",\n    \"Large language models are great at generating useful outputs, but they are not great at guaranteeing that those outputs follow a specific format. This can cause problems when we want to use the outputs of a language model as input to another system. For example, if we want to use a language model to generate a JSON object, we need to make sure that the output is valid JSON. This can be a real pain with standard APIs, but with `guidance` we can both accelerate inference speed and ensure that generated JSON is always valid.\\n\",\n    \"\\n\",\n    \"This notebook shows how to generate a JSON object we know will have a valid format. The example used here is a generating a random character profile for a game, but the ideas are readily applicable to any scenario where you want JSON output.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"d7ccafe4314b4b1e83ff21c054646977\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"gpustat is not installed, run `pip install gpustat` to collect GPU stats.\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"fb52cdbf434c43a1a74deae1ded5440a\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import guidance\\n\",\n    \"\\n\",\n    \"# Define the model we will use\\n\",\n    \"# lm = guidance.models.LlamaCpp(\\\"/path/to/model.gguf\\\", n_gpu_layers=-1)\\n\",\n    \"lm = guidance.models.Transformers(\\\"microsoft/Phi-3-mini-4k-instruct\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"1d959bace40b45f4bd853f717bc215e5\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import gen, select\\n\",\n    \"\\n\",\n    \"# we can pre-define valid option sets\\n\",\n    \"sample_weapons = [\\\"sword\\\", \\\"axe\\\", \\\"mace\\\", \\\"spear\\\", \\\"bow\\\", \\\"crossbow\\\"]\\n\",\n    \"sample_armor = [\\\"leather\\\", \\\"chainmail\\\", \\\"plate\\\"]\\n\",\n    \"\\n\",\n    \"# define a re-usable \\\"guidance function\\\" that we can use below\\n\",\n    \"@guidance\\n\",\n    \"def quoted_list(lm, name, n):\\n\",\n    \"    for i in range(n):\\n\",\n    \"        if i > 0:\\n\",\n    \"            lm += \\\", \\\"\\n\",\n    \"        lm += '\\\"' + gen(name, list_append=True, stop='\\\"') + '\\\"'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def generate_character(\\n\",\n    \"    lm,\\n\",\n    \"    character_one_liner,\\n\",\n    \"    weapons: list[str] = sample_weapons,\\n\",\n    \"    armour: list[str] = sample_armor,\\n\",\n    \"    n_items: int = 3\\n\",\n    \"):\\n\",\n    \"    lm += f'''\\\\\\n\",\n    \"    {{\\n\",\n    \"        \\\"description\\\" : \\\"{character_one_liner}\\\",\\n\",\n    \"        \\\"name\\\" : \\\"{gen(\\\"character_name\\\", stop='\\\"')}\\\",\\n\",\n    \"        \\\"age\\\" : {gen(\\\"age\\\", regex=\\\"[0-9]+\\\")},\\n\",\n    \"        \\\"armour\\\" : \\\"{select(armour, name=\\\"armor\\\")}\\\",\\n\",\n    \"        \\\"weapon\\\" : \\\"{select(weapons, name=\\\"weapon\\\")}\\\",\\n\",\n    \"        \\\"class\\\" : \\\"{gen(\\\"character_class\\\", stop='\\\"')}\\\",\\n\",\n    \"        \\\"mantra\\\" : \\\"{gen(\\\"mantra\\\", stop='\\\"')}\\\",\\n\",\n    \"        \\\"strength\\\" : {gen(\\\"age\\\", regex=\\\"[0-9]+\\\")},\\n\",\n    \"        \\\"quest_items\\\" : [{quoted_list(\\\"quest_items\\\", n_items)}]\\n\",\n    \"    }}'''\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"generation = lm + generate_character(\\\"A quick and nimble fighter\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We have produced valid JSON:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Loaded json:\\n\",\n      \"{\\n\",\n      \"    \\\"description\\\": \\\"A quick and nimble fighter\\\",\\n\",\n      \"    \\\"name\\\": \\\"Sabretooth\\\",\\n\",\n      \"    \\\"age\\\": 25,\\n\",\n      \"    \\\"armour\\\": \\\"leather\\\",\\n\",\n      \"    \\\"weapon\\\": \\\"sword\\\",\\n\",\n      \"    \\\"class\\\": \\\"warrior\\\",\\n\",\n      \"    \\\"mantra\\\": \\\"Fear is my ally\\\",\\n\",\n      \"    \\\"strength\\\": 8,\\n\",\n      \"    \\\"quest_items\\\": [\\n\",\n      \"        \\\"Sabretooth's Sword of Fury\\\",\\n\",\n      \"        \\\"Leather Armour of the Wilds\\\",\\n\",\n      \"        \\\"Mantra of the Fearless Warrior\\\"\\n\",\n      \"    ]\\n\",\n      \"}\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import json\\n\",\n    \"\\n\",\n    \"gen_json = json.loads(generation.__str__())\\n\",\n    \"\\n\",\n    \"print(f\\\"Loaded json:\\\\n{json.dumps(gen_json, indent=4)}\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We have also captured our generated text and can access it like a dictionary:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'sword'\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"generation[\\\"weapon\\\"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Using a schema\\n\",\n    \"\\n\",\n    \"We can also define a JSON-schema for our character, and then pass that to `guidance`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"character_schema = \\\"\\\"\\\"{\\n\",\n    \"    \\\"type\\\": \\\"object\\\",\\n\",\n    \"    \\\"properties\\\": {\\n\",\n    \"        \\\"description\\\" : { \\\"type\\\" : \\\"string\\\", \\\"maxLength\\\" : 100 },\\n\",\n    \"        \\\"name\\\" : { \\\"type\\\" : \\\"string\\\" },\\n\",\n    \"        \\\"age\\\" : { \\\"type\\\" : \\\"integer\\\", \\\"exclusiveMinimum\\\" : 18, \\\"maximum\\\" : 200 },\\n\",\n    \"        \\\"armour\\\" : { \\\"type\\\" : \\\"string\\\", \\\"enum\\\" : [\\\"leather\\\", \\\"chainmail\\\", \\\"plate\\\"] },\\n\",\n    \"        \\\"weapon\\\" : { \\\"type\\\" : \\\"string\\\", \\\"enum\\\" : [\\\"sword\\\", \\\"axe\\\", \\\"mace\\\", \\\"spear\\\", \\\"bow\\\", \\\"crossbow\\\"] },\\n\",\n    \"        \\\"class\\\" : { \\\"type\\\" : \\\"string\\\" },\\n\",\n    \"        \\\"mantra\\\" : { \\\"type\\\" : \\\"string\\\", \\\"maxLength\\\" : 180 },\\n\",\n    \"        \\\"strength\\\" : { \\\"type\\\" : \\\"integer\\\", \\\"exclusiveMinimum\\\" : 0, \\\"maximum\\\" : 20 },\\n\",\n    \"        \\\"quest_items\\\" : { \\\"type\\\" : \\\"array\\\", \\\"items\\\" : { \\\"type\\\" : \\\"string\\\", \\\"maxLength\\\" : 32 }, \\\"maxItems\\\" : 4 }\\n\",\n    \"    },\\n\",\n    \"    \\\"required\\\": [ \\\"description\\\", \\\"name\\\", \\\"age\\\", \\\"armour\\\", \\\"weapon\\\", \\\"class\\\", \\\"mantra\\\", \\\"strength\\\", \\\"quest_items\\\" ],\\n\",\n    \"    \\\"additionalProperties\\\": false\\n\",\n    \"}\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"character_schema_obj = json.loads(character_schema)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Our previous generation complies with this schema:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from jsonschema import validate\\n\",\n    \"\\n\",\n    \"validate(instance=gen_json, schema=character_schema_obj)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, use our schema with `guidance`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"063491e5407d4517b28c25e38822b55b\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import json as gen_json\\n\",\n    \"\\n\",\n    \"generated = lm + \\\"A character attuned to the forest\\\"\\n\",\n    \"generated += gen_json(schema=character_schema_obj, name=\\\"next_character\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Again, we have a valid JSON result:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"{\\n\",\n      \"    \\\"description\\\": \\\"A mystical being that embodies the spirit of the forest, with the ability to communicate with plants\\\",\\n\",\n      \"    \\\"name\\\": \\\"Thalorien\\\",\\n\",\n      \"    \\\"age\\\": 50,\\n\",\n      \"    \\\"armour\\\": \\\"leather\\\",\\n\",\n      \"    \\\"weapon\\\": \\\"axe\\\",\\n\",\n      \"    \\\"class\\\": \\\"druid\\\",\\n\",\n      \"    \\\"mantra\\\": \\\"Nature's harmony, life's balance\\\",\\n\",\n      \"    \\\"strength\\\": 8,\\n\",\n      \"    \\\"quest_items\\\": [\\n\",\n      \"        \\\"Ancient Oak Seed\\\",\\n\",\n      \"        \\\"Moonlit Blossom\\\",\\n\",\n      \"        \\\"Elderberry Potion\\\"\\n\",\n      \"    ]\\n\",\n      \"}\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"loaded_character = json.loads(generated[\\\"next_character\\\"])\\n\",\n    \"\\n\",\n    \"validate(instance=loaded_character, schema=character_schema_obj)\\n\",\n    \"\\n\",\n    \"print(json.dumps(loaded_character, indent=4))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.12.9\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/proverb.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# GPT Proverb\\n\",\n    \"\\n\",\n    \"This is a fun example of using GPT-3 to adapt proverbs to a new domain.\\n\",\n    \"\\n\",\n    \"Guidance programs have a well defined linear execution order that directly corresponds to the token order as processed by the language model. This means that at any point during execution the language model can be used to generate text (using the `gen()` command) or make logical control flow decisions. This interleaving of generation and prompting allows for precise output structure that produces clear and parsable results.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Tweak this proverb to apply to model instructions instead.\\n\",\n       \"\\n\",\n       \"Where there is no guidance, a people falls,\\n\",\n       \"but in an abundance of counselors there is safety.\\n\",\n       \"- Proverbs 11:14\\n\",\n       \"\\n\",\n       \"UPDATED\\n\",\n       \"Where there is no<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> guidance</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> a</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> model</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> fails</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"but</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> in</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> an</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> abundance</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> of</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> instructions</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> there</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> is</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> safety</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span>\\n\",\n       \"- GPT<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>  </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>11</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>14</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import guidance\\n\",\n    \"from guidance import models, gen\\n\",\n    \"newline = \\\"\\\\n\\\"\\n\",\n    \"\\n\",\n    \"# set the default language model used to execute guidance programs\\n\",\n    \"gpt3 = models.OpenAI(\\\"text-davinci-003\\\")\\n\",\n    \"\\n\",\n    \"# Define a guidance program that adapts proverbs.\\n\",\n    \"@guidance\\n\",\n    \"def program(lm, proverb, book, chapter, verse):\\n\",\n    \"    lm += f\\\"\\\"\\\"\\\\\\n\",\n    \"    Tweak this proverb to apply to model instructions instead.\\n\",\n    \"\\n\",\n    \"    {proverb}\\n\",\n    \"    - {book} {chapter}:{verse}\\n\",\n    \"\\n\",\n    \"    UPDATED\\n\",\n    \"    Where there is no guidance{gen('rewrite', stop=newline + \\\"-\\\")}\\n\",\n    \"    - GPT {gen('chapter', stop=\\\":\\\")}:{gen('verse', regex=\\\"[0-9]+\\\")}\\\"\\\"\\\"\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"# execute the program on a specific proverb\\n\",\n    \"lm = gpt3 + program(\\n\",\n    \"    proverb=\\\"Where there is no guidance, a people falls,\\\\nbut in an abundance of counselors there is safety.\\\",\\n\",\n    \"    book=\\\"Proverbs\\\",\\n\",\n    \"    chapter=11,\\n\",\n    \"    verse=14\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"', a model fails,\\\\nbut in an abundance of instructions there is safety.'\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm[\\\"rewrite\\\"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"adatest\",\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.5\"\n  },\n  \"orig_nbformat\": 4\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/tutorials/adding_new_models.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Adding support for a new models\\n\",\n    \"\\n\",\n    \"# NOTE: This notebook is now out of date and needs to be rewritten to account for ChatTemplates.\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"Different models are tuned with different role prompt formats. If the model you are using is not already a subclass of `guidance.Model`, you can define your own new subclass with whatever role prompt format you want. Then you can use the guidance role tags and they will get translated into the correct prompt format.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Orca Mini Chat Example\\n\",\n    \"\\n\",\n    \"As an example of how this works, below we implement the [Orca Mini 3B](https://huggingface.co/pankajmathur/orca_mini_3b) prompt. The prompt looks like this:\\n\",\n    \"\\n\",\n    \"`### System:\\\\n{system}\\\\n\\\\n### User:\\\\n{instruction}\\\\n\\\\n### Response:\\\\n\\\"`\\n\",\n    \"\\n\",\n    \"Where `system` is the system prompt and `instruction` is the user input instructions.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Define a new OrcaChat class\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import models\\n\",\n    \"\\n\",\n    \"# this is our new chat model that inherits from the TransformersChat model and redefines role starts and ends\\n\",\n    \"class OrcaChat(models.transformers.TransformersChat):\\n\",\n    \"    def get_role_start(self, role_name, **kwargs):\\n\",\n    \"        if role_name == \\\"system\\\":\\n\",\n    \"            return \\\"### System:\\\\n\\\"\\n\",\n    \"        elif role_name == \\\"user\\\":\\n\",\n    \"            if str(self).endswith(\\\"\\\\n\\\\n### User:\\\\n\\\"):\\n\",\n    \"                return \\\"\\\" # we don't need to start anything if we are starting with a top level unnested system tag\\n\",\n    \"            else:\\n\",\n    \"                return \\\"### System:\\\\n\\\"\\n\",\n    \"        else:\\n\",\n    \"            return \\\" \\\"\\n\",\n    \"\\n\",\n    \"    def get_role_end(self, role_name=None):\\n\",\n    \"        if role_name == \\\"system\\\":\\n\",\n    \"            return \\\"\\\\n\\\\n### User:\\\\n\\\"\\n\",\n    \"        elif role_name == \\\"user\\\":\\n\",\n    \"            return \\\"\\\\n\\\\n### Response:\\\\n\\\"\\n\",\n    \"        else:\\n\",\n    \"            return \\\" \\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Load the model\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"3e2eb7c444ba4d92a5f29593faa919e9\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/3 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import torch\\n\",\n    \"\\n\",\n    \"orca = OrcaChat('pankajmathur/orca_mini_3b', torch_dtype=torch.float16, device_map='auto')\\n\",\n    \"# orca = OrcaChat('gpt2', device_map='auto') # Can use a small mock model while iterating on the prompt\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Check output without indentation formatting\\n\",\n    \"\\n\",\n    \"When you designing the prompt format you will want to see exactly how roles are going into the mode without any pretty indentation. Setting `indent=False` allows you to do this (and so is useful during role format development).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>### System:\\n\",\n       \"</span>You are a cat expert.<span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>\\n\",\n       \"\\n\",\n       \"### User:\\n\",\n       \"</span><span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'></span>What are the smallest cats?<span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>\\n\",\n       \"\\n\",\n       \"### Response:\\n\",\n       \"</span><span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'> </span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> smallest</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> are</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> dwar</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>f</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> which</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> include</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> following</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> bre</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>eds</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>1</span><span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'> </span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import gen, system, user, assistant, indent_roles\\n\",\n    \"\\n\",\n    \"with indent_roles(False):\\n\",\n    \"    with system():\\n\",\n    \"        lm = orca + \\\"You are a cat expert.\\\"\\n\",\n    \"\\n\",\n    \"    with user():\\n\",\n    \"        lm += \\\"What are the smallest cats?\\\"\\n\",\n    \"\\n\",\n    \"    with assistant():\\n\",\n    \"        lm += gen(\\\"answer\\\", stop=\\\".\\\", max_tokens=20)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that you can also just print the string representation of the model for a truely raw view of the model's context:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"### System:\\n\",\n      \"You are a cat expert.\\n\",\n      \"\\n\",\n      \"### User:\\n\",\n      \"What are the smallest cats?\\n\",\n      \"\\n\",\n      \"### Response:\\n\",\n      \" The smallest cats are the dwarf cats, which include the following breeds:\\n\",\n      \"\\n\",\n      \"1 \\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(str(lm))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can also change just a single role tag:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>### System:\\n\",\n       \"</span>You are a cat expert.<span style='background-color: rgba(255, 180, 0, 0.3); border-radius: 3px;'>\\n\",\n       \"\\n\",\n       \"### User:\\n\",\n       \"</span><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>What are the smallest cats?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> smallest</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> are</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> dwar</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>f</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> which</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> include</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> following</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> bre</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>eds</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>1</span></div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"with indent_roles(False), system():\\n\",\n    \"    lm = orca + \\\"You are a cat expert.\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What are the smallest cats?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(\\\"answer\\\", stop=\\\".\\\", max_tokens=20)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Normal use\\n\",\n    \"\\n\",\n    \"When you are satisfied with the correctness of your role formatting you can then use the model like normal:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; vertical-align: middle; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>system</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>You are a cat expert.</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>user</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'>What are the smallest cats?</div></div><div style='display: flex; border-bottom: 1px solid rgba(127, 127, 127, 0.2);  justify-content: center; align-items: center;'><div style='flex: 0 0 80px; opacity: 0.5;'>assistant</div><div style='flex-grow: 1; padding: 5px; padding-top: 10px; padding-bottom: 10px; margin-top: 0px; white-space: pre-wrap; margin-bottom: 0px;'><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>The</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> smallest</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> are</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> dwar</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>f</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> cats</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>,</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> which</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> include</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> the</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> following</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> bre</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>eds</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>:</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>1</span></div></div></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"with system():\\n\",\n    \"    lm = orca + \\\"You are a cat expert.\\\"\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What are the smallest cats?\\\"\\n\",\n    \"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(\\\"answer\\\", stop=\\\".\\\", max_tokens=20)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\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.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/tutorials/chat.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Chat dialog\\n\",\n    \"\\n\",\n    \"Guidance supports chat-based models using role tags. These are then converted to the appropriate format for the model (either a JSON API format or special tokens).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import logging\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"parameters\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"call_delay_secs = 0\\n\",\n    \"requested_log_level = logging.WARNING\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"logging.basicConfig(level=requested_log_level)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Preliminaries concluded, we can now create our model:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"\\n\",\n    \"chat_enabled_model = models.Transformers(\\\"microsoft/Phi-4-mini-instruct\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Multi-step chat with hidden blocks\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We are now going to set up a multistage chat, where we have the chat bot help the use achieve some goal.\\n\",\n    \"The user will only have to specify the goal, and then we will create a chain-of-thought conversation with the bot which will:\\n\",\n    \"\\n\",\n    \"1. Ask the bot for a number of suggestions.\\n\",\n    \"2. List the pros and cons of each.\\n\",\n    \"3. Pick the best suggestion.\\n\",\n    \"4. Product a detailed action plan.\\n\",\n    \"\\n\",\n    \"Our goal is to only show the final result to the user.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, let us define our generation function:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import re\\n\",\n    \"import time\\n\",\n    \"\\n\",\n    \"import guidance\\n\",\n    \"from guidance import gen, select, system, user, assistant\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def plan_for_goal(lm, goal: str):\\n\",\n    \"    \\n\",\n    \"    # This is a helper function which we will use below\\n\",\n    \"    def parse_best(prosandcons, options):\\n\",\n    \"        best = re.search(r'Best=(\\\\d+)', prosandcons)\\n\",\n    \"        if not best:\\n\",\n    \"            best =  re.search(r'Best.*?(\\\\d+)', 'Best= option is 3')\\n\",\n    \"        if best:\\n\",\n    \"            best = int(best.group(1))\\n\",\n    \"        else:\\n\",\n    \"            best = 0\\n\",\n    \"        return options[best]\\n\",\n    \"\\n\",\n    \"    # Some general instruction to the model\\n\",\n    \"    with system():\\n\",\n    \"        lm += \\\"You are a helpful assistant.\\\"\\n\",\n    \"\\n\",\n    \"    # Simulate a simple request from the user\\n\",\n    \"    # Note that we switch to using 'lm2' here, because these are intermediate steps (so we don't want to overwrite the current lm object)\\n\",\n    \"    with user():\\n\",\n    \"        lm2 = lm + f\\\"\\\"\\\"\\\\\\n\",\n    \"        I want to {goal}\\n\",\n    \"        Can you please generate one option for how to accomplish this?\\n\",\n    \"        Please make the option very short, at most one line.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    # Generate several options. Note that this means several sequential generation requests\\n\",\n    \"    n_options = 5\\n\",\n    \"    with assistant():\\n\",\n    \"        options = []\\n\",\n    \"        for i in range(n_options):\\n\",\n    \"            options.append((lm2 + gen(name='option', temperature=1.0, max_tokens=50))[\\\"option\\\"])\\n\",\n    \"\\n\",\n    \"    # Have the user request pros and cons\\n\",\n    \"    with user():\\n\",\n    \"        lm2 += f\\\"\\\"\\\"\\\\\\n\",\n    \"        I want to {goal}\\n\",\n    \"        Can you please comment on the pros and cons of each of the following options, and then pick the best option?\\n\",\n    \"        ---\\n\",\n    \"        \\\"\\\"\\\"\\n\",\n    \"        for i, opt in enumerate(options):\\n\",\n    \"            lm2 += f\\\"Option {i}: {opt}\\\\n\\\"\\n\",\n    \"        lm2 += f\\\"\\\"\\\"\\\\\\n\",\n    \"        ---\\n\",\n    \"        Please discuss each option very briefly (one line for pros, one for cons), and end by saying Best=X, where X is the number of the best option.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    # Get the pros and cons from the model\\n\",\n    \"    with assistant():\\n\",\n    \"        lm2 += gen(name='prosandcons', temperature=0.0, max_tokens=600, stop=\\\"Best=\\\") + \\\"Best=\\\" + gen(\\\"best\\\", regex=\\\"[0-9]+\\\")\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"    # The user now extracts the one selected as the best, and asks for a full plan\\n\",\n    \"    # We switch back to 'lm' because this is the final result we want\\n\",\n    \"    with user():\\n\",\n    \"        lm += f\\\"\\\"\\\"\\\\\\n\",\n    \"        I want to {goal}\\n\",\n    \"        Here is my plan: {options[int(lm2[\\\"best\\\"])]}\\n\",\n    \"        Please elaborate on this plan, and tell me how to best accomplish it.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    # The plan is generated\\n\",\n    \"    with assistant():\\n\",\n    \"        lm += gen(name='plan', max_tokens=500)\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Create a plan for the user. Note how the portions which were sent to `lm2` in the function above are not shown in the final result:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"results = chat_enabled_model + plan_for_goal(goal=\\\"read more books\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can access the final plan itself:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(results['plan'])\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Asking help from experts\\n\",\n    \"\\n\",\n    \"Now, let us ask our chat model to pick some experts in a particular field, and impersonate them to give advice:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def run_expert_advice(lm, query: str):\\n\",\n    \"    # Some general instruction to the model\\n\",\n    \"    with system():\\n\",\n    \"        lm += \\\"You are a helpful assistant.\\\"\\n\",\n    \"\\n\",\n    \"    with user():\\n\",\n    \"        lm += f\\\"\\\"\\\"I want a response to the following question:\\n\",\n    \"{query}\\n\",\n    \"Who are 3 world-class experts (past or present) who would be great at answering this?\\n\",\n    \"Please don't answer the question or comment on it yet.\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    with assistant():\\n\",\n    \"        lm += gen(name='experts', temperature=0, max_tokens=300)\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"    with user():\\n\",\n    \"        lm += \\\"\\\"\\\"Great, now please answer the question as if these experts had collaborated in writing a joint anonymous answer.\\n\",\n    \"In other words, their identity is not revealed, nor is the fact that there is a panel of experts answering the question.\\n\",\n    \"If the experts would disagree, just present their different positions as alternatives in the answer itself (e.g. 'some might argue... others might argue...').\\n\",\n    \"Please start your answer with ANSWER:\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    with assistant():\\n\",\n    \"        lm += gen(name='answer', temperature=0, max_tokens=500)\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"mean_life = chat_enabled_model + run_expert_advice(\\\"What is the meaning of life?\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"more_productive = chat_enabled_model + run_expert_advice('How can I be more productive?')\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Agents\\n\",\n    \"\\n\",\n    \"We are now going to define a 'conversation agent.'\\n\",\n    \"This maintains a memory of a conversation, and can generate an appropriate reply, based on the persona it has been given.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class ConversationAgent:\\n\",\n    \"    def __init__(self, chat_model, name: str, instructions: str, context_turns: int = 2):\\n\",\n    \"        self._chat_model = chat_model\\n\",\n    \"        self._name = name\\n\",\n    \"        self._instructions = instructions\\n\",\n    \"        self._my_turns = []\\n\",\n    \"        self._interlocutor_turns = []\\n\",\n    \"        self._went_first = False\\n\",\n    \"        self._context_turns = context_turns\\n\",\n    \"\\n\",\n    \"    @property\\n\",\n    \"    def name(self) -> str:\\n\",\n    \"        return self._name\\n\",\n    \"    \\n\",\n    \"    def reply(self, interlocutor_reply = None) -> str:\\n\",\n    \"        if interlocutor_reply is None:\\n\",\n    \"            self._my_turns = []\\n\",\n    \"            self._interlocutor_turns = []\\n\",\n    \"            self._went_first = True\\n\",\n    \"        else:\\n\",\n    \"            self._interlocutor_turns.append(interlocutor_reply)\\n\",\n    \"\\n\",\n    \"        # Get trimmed history\\n\",\n    \"        my_hist = self._my_turns[(1-self._context_turns):]\\n\",\n    \"        interlocutor_hist = self._interlocutor_turns[-self._context_turns:]\\n\",\n    \"\\n\",\n    \"        # Set up the system prompt\\n\",\n    \"        curr_model = self._chat_model\\n\",\n    \"        with system():\\n\",\n    \"            curr_model += f\\\"Your name is {self.name}. {self._instructions}\\\"\\n\",\n    \"            if len(interlocutor_hist) == 0:\\n\",\n    \"                curr_model += \\\"Introduce yourself and start the conversation\\\"\\n\",\n    \"            elif len(interlocutor_hist) == 1:\\n\",\n    \"                curr_model += \\\"Introduce yourself before continuing the conversation\\\"\\n\",\n    \"\\n\",\n    \"        # Replay the last few turns\\n\",\n    \"        for i in range(len(my_hist)):\\n\",\n    \"            with user():\\n\",\n    \"                curr_model += interlocutor_hist[i]\\n\",\n    \"            with assistant():\\n\",\n    \"                curr_model += my_hist[i]\\n\",\n    \"\\n\",\n    \"        if len(interlocutor_hist) > 0:\\n\",\n    \"            with user():\\n\",\n    \"                curr_model += interlocutor_hist[-1]\\n\",\n    \"\\n\",\n    \"        with assistant():\\n\",\n    \"            curr_model += gen(name='response', max_tokens=100)\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"\\n\",\n    \"        self._my_turns.append(curr_model['response'])\\n\",\n    \"        return curr_model['response']\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can have two of these agents converse with each other with a _conversation simulator_:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def conversation_simulator(\\n\",\n    \"    bot0: ConversationAgent,\\n\",\n    \"    bot1: ConversationAgent,\\n\",\n    \"    total_turns: int = 5 ):\\n\",\n    \"    conversation_turns = []\\n\",\n    \"    last_reply = None\\n\",\n    \"    for _ in range(total_turns):\\n\",\n    \"        last_reply = bot0.reply(last_reply)\\n\",\n    \"        conversation_turns.append(dict(name=bot0.name, text=last_reply))\\n\",\n    \"        time.sleep(call_delay_secs)\\n\",\n    \"        last_reply = bot1.reply(last_reply)\\n\",\n    \"        conversation_turns.append(dict(name=bot1.name, text=last_reply))\\n\",\n    \"    return conversation_turns\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, let's try generating a conversation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"bot_instructions = \\\"\\\"\\\"You are taking part in a discussion about bodyline bowling.\\n\",\n    \"Only generate text as yourself and do not prefix your reply with your name.\\n\",\n    \"Keep your answers to a couple of short sentences.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"bradman_bot = ConversationAgent(chat_enabled_model, \\\"Donald Bradman\\\", bot_instructions, context_turns=5)\\n\",\n    \"jardine_bot = ConversationAgent(chat_enabled_model, \\\"Douglas Jardine\\\", bot_instructions, context_turns=5)\\n\",\n    \"\\n\",\n    \"conversation_turns = conversation_simulator(bradman_bot, jardine_bot, total_turns=3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"for turn in conversation_turns:\\n\",\n    \"    print(f\\\"{turn['name']}: {turn['text']}\\\\n\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.12.9\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/tutorials/code_generation.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Example: generating and running code\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Warning: This notebook runs LLM-generated code without any checks. Run at your own risk.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Loading a code model:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"2023-12-05 21:22:33.078594: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\\n\",\n      \"2023-12-05 21:22:33.148003: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\\n\",\n      \"To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"from guidance.library._gen import will_gen\\n\",\n    \"from guidance import capture, one_or_more, any_char, zero_or_more, commit_point, select\\n\",\n    \"import guidance\\n\",\n    \"import re\\n\",\n    \"base_path = '/home/marcotcr_google_com/work/models/'\\n\",\n    \"model_path = base_path + 'mistral-7b-codealpaca-lora.Q8_0.gguf'\\n\",\n    \"mistral = models.LlamaCpp(model_path, n_gpu_layers=-1, n_ctx=4096)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Loading the HumanEval dataset:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from datasets import load_dataset\\n\",\n    \"dataset = load_dataset(\\\"openai_humaneval\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's write a very simple baseline\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import re\\n\",\n    \"import guidance\\n\",\n    \"@guidance\\n\",\n    \"def baseline(lm, prompt):\\n\",\n    \"    r = re.findall('def (.*?)\\\\(', prompt)\\n\",\n    \"    name = r[-1]\\n\",\n    \"    lm += f'Here is an implementation of {name}:\\\\n'\\n\",\n    \"    lm += '```python\\\\n' + prompt + gen(max_tokens=800, stop=['```', 'if __name__', 'def test'], name='program')\\n\",\n    \"    lm = lm.set('program', prompt + lm['program'])\\n\",\n    \"    return lm   \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Here is an implementation of solution:\\n\",\n       \"```python\\n\",\n       \"\\n\",\n       \"def solution(lst):\\n\",\n       \"    &quot;&quot;&quot;Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\\n\",\n       \"    \\n\",\n       \"\\n\",\n       \"    Examples\\n\",\n       \"    solution([5, 8, 7, 1]) ==&gt; 12\\n\",\n       \"    solution([3, 3, 3, 3, 3]) ==&gt; 9\\n\",\n       \"    solution([30, 13, 24, 321]) ==&gt;0\\n\",\n       \"    &quot;&quot;&quot;<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>   </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> return</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> sum</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>lst</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>[</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>i]</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> for</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>i in</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> range</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> len</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>lst</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>),</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>if l</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>st</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>[</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>i]</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> %</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> !=</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>#</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> test</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> the</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> function</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>olution</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>([</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>5</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>8</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>7</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>]))</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> #</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> shoul</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>olution</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>([</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>]))</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> #</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> shoul</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>9</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>olution</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>([</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>4</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>]))</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> #</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> shoul</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d print</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"idx = 121\\n\",\n    \"prompt = dataset['test']['prompt'][idx]\\n\",\n    \"lm = mistral + baseline(prompt)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here is simple function to evaluate a generated program with the HumanEval evaluation tests:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Returns True if it passes the evaluation tests, False otherwise\\n\",\n    \"def eval_program(program, i):\\n\",\n    \"    # Loads the `check` function\\n\",\n    \"    exec(dataset['test']['test'][i])\\n\",\n    \"    try:\\n\",\n    \"        # Executes the function definition\\n\",\n    \"        exec(program, globals())\\n\",\n    \"    except Exception as e:\\n\",\n    \"        # Program not valid\\n\",\n    \"        return False\\n\",\n    \"    name = dataset['test']['entry_point'][i]\\n\",\n    \"    try:\\n\",\n    \"        # Run the unit tests\\n\",\n    \"        eval('check(%s)' % name)\\n\",\n    \"        # If we get here, we passed the tests\\n\",\n    \"        return True\\n\",\n    \"    except:\\n\",\n    \"        # The program ran, but the failed the unit test, or ran into some other exception\\n\",\n    \"        return False\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"12\\n\",\n      \"9\\n\",\n      \"0\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"True\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"eval_program(lm['program'], idx)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"If you run this prompt on all of HumanEval, you get 54.9\\\\% accuracy.  \\n\",\n    \"The model generates valid code (i.e. code that doesn't trip up the python interpreter) on 96\\\\% of examples, but the code only executes without exceptions in 93\\\\% of examples.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try another one:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Here is an implementation of triangle_area:\\n\",\n       \"```python\\n\",\n       \"\\n\",\n       \"def triangle_area(a, b, c):\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    Given the lengths of the three sides of a triangle. Return the area of\\n\",\n       \"    the triangle rounded to 2 decimal points if the three sides form a valid triangle. \\n\",\n       \"    Otherwise return -1\\n\",\n       \"    Three sides make a valid triangle when the sum of any two sides is greater \\n\",\n       \"    than the third side.\\n\",\n       \"    Example:\\n\",\n       \"    triangle_area(3, 4, 5) == 6.00\\n\",\n       \"    triangle_area(1, 2, 10) == -1\\n\",\n       \"    &#x27;&#x27;&#x27;<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>   </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>if a</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> b</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> &gt;</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> c</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> an</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d a</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> c</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> &gt;</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> b</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> an</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d b</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> c</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> &gt;</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>:</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>       </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> =</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> (</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>a</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> b</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> +</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> c</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> /</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>       </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> return</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> roun</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>d(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> *</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> (</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> a</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> *</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> (</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> b</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> *</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> (</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>s</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> c</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>),</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>   </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> else</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>:</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>       </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> return</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"idx = 71\\n\",\n    \"prompt = dataset['test']['prompt'][idx]\\n\",\n    \"lm = mistral + baseline(prompt)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"False\"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"eval_program(lm['program'], idx)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Notice that this time the generated program doesn't pass the evaluation tests.  \\n\",\n    \"But it's worse than that: the program doesn't even pass the first example in the docstring:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"36.0\"\n      ]\n     },\n     \"execution_count\": 10,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"exec(lm['program'])\\n\",\n    \"triangle_area(3, 4, 5) # should be 6.00\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This suggests an improvement: let's extract the tests on the docstrings, and only return a program if it passes at least those tests.  \\n\",\n    \"First, let's write a simple prompt to extract the examples from the docstring into tests\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import any_char_but, regex\\n\",\n    \"@guidance(stateless=True)\\n\",\n    \"def test(lm, fn_name):\\n\",\n    \"    \\\"\\\"\\\"Only allows assert fn_name(args) == expected\\\"\\\"\\\"\\n\",\n    \"    return lm + '   assert ' + fn_name + '(' + capture(zero_or_more(any_char_but(['\\\\n'])), name='args') + commit_point(select([') == ', ') is ', ')' + regex('\\\\s\\\\s?\\\\s?\\\\s?') + '== '])) + capture(one_or_more(any_char()), name='result') + commit_point('\\\\n')\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def write_tests(lm, prompt):\\n\",\n    \"    r = re.findall('def (.*?)\\\\(', prompt)\\n\",\n    \"    name = r[-1]\\n\",\n    \"    lm += '```python\\\\n' + prompt + '    pass\\\\n'\\n\",\n    \"    lm += f'\\\\ndef test_{name}():\\\\n'\\n\",\n    \"    lm += '    \\\"\\\"\\\"Turns the example(s) in the docstring above into asserts\\\"\\\"\\\"\\\\n'\\n\",\n    \"    args = []\\n\",\n    \"    expected = []\\n\",\n    \"    # Write at most 10 tests, but stop when the model wants to stop\\n\",\n    \"    for i in range(10):\\n\",\n    \"        lm += test(name)\\n\",\n    \"        args.append(lm['args'])\\n\",\n    \"        expected.append(lm['result'])\\n\",\n    \"        if not lm.will_gen('assert', ignore_spaces=True):\\n\",\n    \"            break\\n\",\n    \"    lm = lm.set('args', args)\\n\",\n    \"    lm = lm.set('expected', expected)\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>```python\\n\",\n       \"\\n\",\n       \"def triangle_area(a, b, c):\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    Given the lengths of the three sides of a triangle. Return the area of\\n\",\n       \"    the triangle rounded to 2 decimal points if the three sides form a valid triangle. \\n\",\n       \"    Otherwise return -1\\n\",\n       \"    Three sides make a valid triangle when the sum of any two sides is greater \\n\",\n       \"    than the third side.\\n\",\n       \"    Example:\\n\",\n       \"    triangle_area(3, 4, 5) == 6.00\\n\",\n       \"    triangle_area(1, 2, 10) == -1\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    pass\\n\",\n       \"\\n\",\n       \"def test_triangle_area():\\n\",\n       \"    &quot;&quot;&quot;Turns the example(s) in the docstring above into asserts&quot;&quot;&quot;\\n\",\n       \"   assert triangle_area<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>4</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>5</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> ==</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>6</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>   assert triangle_area<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> ==</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>   assert triangle_area<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>4</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>7</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> ==</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>   assert triangle_area<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>3</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> ==</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>.</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>0</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span>   assert triangle_area<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>(</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>,</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> </span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>2</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>)</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> ==</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'> -</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>1</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>\\n\",\n       \"</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = mistral + write_tests(prompt)\\n\",\n    \"args = lm['args']\\n\",\n    \"expected = lm['expected']\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The LM went beyond extracting tests, it also generated a few of its own. While some of these may be incorrect, at least we have the original ones as well.  \\n\",\n    \"What's more, we already stored the inputs and expected results in the lm object:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[('3, 4, 5', '6.00'),\\n\",\n       \" ('1, 2, 10', '-1'),\\n\",\n       \" ('3, 4, 7', '-1'),\\n\",\n       \" ('3, 3, 3', '0.00'),\\n\",\n       \" ('1, 1, 2', '-1')]\"\n      ]\n     },\n     \"execution_count\": 14,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"# (input, expected output)\\n\",\n    \"list(zip(lm['args'], lm['expected']))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's combine the baseline and the test generation prompts into a single guidance function:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 15,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def reconstruct_tests(lm, name, args, expected):\\n\",\n    \"    \\\"\\\"\\\"Helper to format tests nicely\\\"\\\"\\\"\\n\",\n    \"    lm += f'def test_{name}():\\\\n'\\n\",\n    \"    for arg, e in zip(args, expected):\\n\",\n    \"        lm += f'   assert {name}({arg}) == {e}\\\\n'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def add_program_and_tests(lm, name, program, args, expected):\\n\",\n    \"    \\\"\\\"\\\"Helper to format program and tests nicely\\\"\\\"\\\"\\n\",\n    \"    lm += f'Here is an implementation of {name}:\\\\n'\\n\",\n    \"    lm += '```python\\\\n' \\n\",\n    \"    lm += program + '\\\\n'\\n\",\n    \"    lm += reconstruct_tests(name, args, expected) + '```\\\\n'\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def baseline_and_tests(lm, prompt):\\n\",\n    \"    lm2 = lm + baseline(prompt)\\n\",\n    \"    r = re.findall('def (.*?)\\\\(', prompt)\\n\",\n    \"    name = r[-1]\\n\",\n    \"    program = lm2['program']\\n\",\n    \"    lm2 = lm + write_tests(prompt)\\n\",\n    \"    args, expected = lm2['args'], lm2['expected']\\n\",\n    \"    lm = lm.set('program', program)\\n\",\n    \"    lm = lm.set('args', args)\\n\",\n    \"    lm = lm.set('expected', expected)\\n\",\n    \"    lm = lm.set('name', name)\\n\",\n    \"    lm += add_program_and_tests(name, program, args, expected)\\n\",\n    \"    return lm\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 16,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Here is an implementation of triangle_area:\\n\",\n       \"```python\\n\",\n       \"\\n\",\n       \"def triangle_area(a, b, c):\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    Given the lengths of the three sides of a triangle. Return the area of\\n\",\n       \"    the triangle rounded to 2 decimal points if the three sides form a valid triangle. \\n\",\n       \"    Otherwise return -1\\n\",\n       \"    Three sides make a valid triangle when the sum of any two sides is greater \\n\",\n       \"    than the third side.\\n\",\n       \"    Example:\\n\",\n       \"    triangle_area(3, 4, 5) == 6.00\\n\",\n       \"    triangle_area(1, 2, 10) == -1\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    if a + b &gt; c and a + c &gt; b and b + c &gt; a:\\n\",\n       \"        s = (a + b + c) / 2\\n\",\n       \"        return round(s * (s - a) * (s - b) * (s - c), 2)\\n\",\n       \"    else:\\n\",\n       \"        return -1\\n\",\n       \"\\n\",\n       \"def test_triangle_area():\\n\",\n       \"   assert triangle_area(3, 4, 5) == 6.00\\n\",\n       \"   assert triangle_area(1, 2, 10) == -1\\n\",\n       \"   assert triangle_area(3, 4, 7) == -1\\n\",\n       \"   assert triangle_area(3, 3, 3) == 0.00\\n\",\n       \"   assert triangle_area(1, 1, 2) == -1\\n\",\n       \"```\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = mistral + baseline_and_tests(prompt)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"(['3, 4, 5', '1, 2, 10', '3, 4, 7', '3, 3, 3', '1, 1, 2'],\\n\",\n       \" ['6.00', '-1', '-1', '0.00', '-1'])\"\n      ]\n     },\n     \"execution_count\": 17,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lm['args'], lm['expected']\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, if we have a generated program and a set of tests, we can write a guidance function that runs the tests and outputs the results:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 18,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Helper function to load the program\\n\",\n    \"def load_program(name, program):\\n\",\n    \"    error = None\\n\",\n    \"    try:\\n\",\n    \"        exec(program, globals())\\n\",\n    \"        fn = eval(name)\\n\",\n    \"    except Exception as e:\\n\",\n    \"        fn = None\\n\",\n    \"        error = e\\n\",\n    \"    return fn, error\\n\",\n    \"\\n\",\n    \"# Tolerance when x and y are floats\\n\",\n    \"def equals(x, y):\\n\",\n    \"    if isinstance(x, float) and isinstance(y, float):\\n\",\n    \"        return abs(x - y) < 0.00001\\n\",\n    \"    else:\\n\",\n    \"        return x == y\\n\",\n    \"\\n\",\n    \"@guidance\\n\",\n    \"def run_tests(lm, name, program, args, expected):\\n\",\n    \"    fn, error = load_program(name, program)\\n\",\n    \"    all_pass = True\\n\",\n    \"    lm += 'Running the test(s) above gives:\\\\n'\\n\",\n    \"    for arg, e in zip(args, expected):\\n\",\n    \"        # Reconstruct the test\\n\",\n    \"        lm += f'assert {name}({arg}) == {e}\\\\n'\\n\",\n    \"        try:\\n\",\n    \"            arg = eval(arg)\\n\",\n    \"            expected_result = eval(e)\\n\",\n    \"        except:\\n\",\n    \"            continue\\n\",\n    \"        try:\\n\",\n    \"            if isinstance(arg, tuple):\\n\",\n    \"                r = fn(*arg)\\n\",\n    \"            else:\\n\",\n    \"                r = fn(arg)\\n\",\n    \"        except Exception as ex:\\n\",\n    \"            r = ex\\n\",\n    \"        if equals(r, expected_result):\\n\",\n    \"            lm += 'Assertion passed.\\\\n'\\n\",\n    \"        else:\\n\",\n    \"            all_pass = False\\n\",\n    \"            lm += f'Assertion failed.\\\\n'\\n\",\n    \"            lm += f'Expected: {e}\\\\n'\\n\",\n    \"            lm += f'Actual: {r}\\\\n'\\n\",\n    \"        lm += '---\\\\n'\\n\",\n    \"    lm = lm.set('all_pass', all_pass)\\n\",\n    \"    return lm\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 19,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Running the test(s) above gives:\\n\",\n       \"assert triangle_area(3, 4, 5) == 6.00\\n\",\n       \"Assertion failed.\\n\",\n       \"Expected: 6.00\\n\",\n       \"Actual: 36.0\\n\",\n       \"---\\n\",\n       \"assert triangle_area(1, 2, 10) == -1\\n\",\n       \"Assertion passed.\\n\",\n       \"---\\n\",\n       \"assert triangle_area(3, 4, 7) == -1\\n\",\n       \"Assertion passed.\\n\",\n       \"---\\n\",\n       \"assert triangle_area(3, 3, 3) == 0.00\\n\",\n       \"Assertion failed.\\n\",\n       \"Expected: 0.00\\n\",\n       \"Actual: 15.19\\n\",\n       \"---\\n\",\n       \"assert triangle_area(1, 1, 2) == -1\\n\",\n       \"Assertion passed.\\n\",\n       \"---\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models._llama_cpp.LlamaCpp at 0x7fb18eae7a30>\"\n      ]\n     },\n     \"execution_count\": 19,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"mistral + run_tests(lm['name'], lm['program'], lm['args'], lm['expected'])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now, we can put this all together into a function that gets the LM to rewrite the program when the tests don't work:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 20,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def run_tests_and_fix(lm, prompt):\\n\",\n    \"    lm2 = lm + baseline_and_tests(prompt)\\n\",\n    \"    name, program, args, expected = lm2['name'], lm2['program'], lm2['args'], lm2['expected']\\n\",\n    \"    i = 0\\n\",\n    \"    # Try this at most 3 times\\n\",\n    \"    while i != 3:\\n\",\n    \"        i += 1\\n\",\n    \"        lm2 += run_tests(name, program, args, expected)\\n\",\n    \"        # Passing the tests, I can stop.\\n\",\n    \"        if lm2['all_pass']:\\n\",\n    \"            break\\n\",\n    \"        lm2 += f'\\\\n'\\n\",\n    \"        # Get the model to think about what's wrong\\n\",\n    \"        lm2 += f'My implementation of {name} is wrong, because''' + gen(stop='\\\\n') + '\\\\n'\\n\",\n    \"        lm2 += f'In order to fix it, I need to''' + gen(stop='\\\\n') + '\\\\n'\\n\",\n    \"        lm2 += f'Here is a fixed implementation:\\\\n'\\n\",\n    \"        # Write a new program\\n\",\n    \"        lm2 += '```python\\\\n' + prompt + gen(max_tokens=800, stop_regex='\\\\n[^\\\\s]', name='program')\\n\",\n    \"        lm2 += '```\\\\n'\\n\",\n    \"        # Reset the slate, start over with new program\\n\",\n    \"        program = prompt + lm2['program']\\n\",\n    \"        lm2 = lm + add_program_and_tests(name, program, args, expected)\\n\",\n    \"        lm2 = lm2.set('program', program)\\n\",\n    \"        lm + 'ae' + gen(max_tokens=10)\\n\",\n    \"    return lm2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 21,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>...<span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>----------------</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>----------------</span><span style='background-color: rgba(165.0, 0.0, 0, 0.15); border-radius: 3px;' title='0.0'>----------------</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<guidance.models._llama_cpp.LlamaCpp at 0x7fb18d6e33a0>\"\n      ]\n     },\n     \"execution_count\": 21,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"mistral + '...' + gen(max_tokens=3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 22,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Here is an implementation of triangle_area:\\n\",\n       \"```python\\n\",\n       \"\\n\",\n       \"def triangle_area(a, b, c):\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    Given the lengths of the three sides of a triangle. Return the area of\\n\",\n       \"    the triangle rounded to 2 decimal points if the three sides form a valid triangle. \\n\",\n       \"    Otherwise return -1\\n\",\n       \"    Three sides make a valid triangle when the sum of any two sides is greater \\n\",\n       \"    than the third side.\\n\",\n       \"    Example:\\n\",\n       \"    triangle_area(3, 4, 5) == 6.00\\n\",\n       \"    triangle_area(1, 2, 10) == -1\\n\",\n       \"    &#x27;&#x27;&#x27;\\n\",\n       \"    # Check if the sides form a valid triangle\\n\",\n       \"    if a + b &gt; c and a + c &gt; b and b + c &gt; a:\\n\",\n       \"        # Calculate the semi-perimeter\\n\",\n       \"        s = (a + b + c) / 2\\n\",\n       \"        # Check if the triangle is right-angled\\n\",\n       \"        if a**2 + b**2 == c**2:\\n\",\n       \"            # Use Gauss&#x27;s formula for the area of a right-angled triangle\\n\",\n       \"            area = ((s * (s - a) * (s - b) * (s - c)) ** 0.5)\\n\",\n       \"        else:\\n\",\n       \"            # Use Heron&#x27;s formula for the area of a general triangle\\n\",\n       \"            area = ((s * (s - a) * (s - b) * (s - c)) ** 0.5)\\n\",\n       \"        return round(area, 2)\\n\",\n       \"    else:\\n\",\n       \"        return -1\\n\",\n       \"\\n\",\n       \"def test_triangle_area():\\n\",\n       \"   assert triangle_area(3, 4, 5) == 6.00\\n\",\n       \"   assert triangle_area(1, 2, 10) == -1\\n\",\n       \"   assert triangle_area(3, 4, 7) == -1\\n\",\n       \"   assert triangle_area(1, 1, 2) == -1\\n\",\n       \"   assert triangle_area(12, 5, 13) == 17.71\\n\",\n       \"```\\n\",\n       \"</pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = mistral + run_tests_and_fix(prompt)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 23,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"6.0\\n\",\n      \"-1\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"program = lm['program']\\n\",\n    \"exec(program)\\n\",\n    \"print(triangle_area(3, 4, 5))\\n\",\n    \"print(triangle_area(1, 2, 10))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"In this particular case, having more rounds allows the model to fix its program on the unit tests. Does it also result in a program that passes the evaluation tests?\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 24,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"True\"\n      ]\n     },\n     \"execution_count\": 24,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"eval_program(program, idx)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Yes. Indeed, this simple prompt modification raises accuracy from 54.9% to 57.3% for this model (we've seen bigger gains with larger models)\\n\",\n    \"\\n\",\n    \"Anyway, the point of this notebook is just to illustrate how easy it is to guide generation depending on what previous generations are (e.g. the test results depend on the current version of the code.)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"guidance_env\",\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.12\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "notebooks/tutorials/guidance_acceleration.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Guidance acceleration\\n\",\n    \"\\n\",\n    \"When multiple generation or LLM-directed control flow statements are used in a single Guidance program then we can significantly improve inference performance by maintaining a session state with the LLM inferencer and so reusing the Key/Value caches as we progress through the program. This is much faster than letting the model generate all of the structural tokens itself (for example if the structure was demonstrated using a one-shot example), and also faster that simply recalling the model without any state at each point in the Guidance program.\\n\",\n    \"\\n\",\n    \"We call this \\\"guidance acceleration\\\" and it is supported currently by local models such as `guidance.models.LlamaCpp` or `guidance.models.Transformers` as demonstrated below.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import time\\n\",\n    \"import torch\\n\",\n    \"import guidance\\n\",\n    \"from guidance import models, gen\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this.\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# Define a trivial string we can extend with small models easily\\n\",\n    \"prefix = \\\"Repeat this. Repeat this. \\\"*5 + \\\"Repeat this. Repeat this.\\\"\\n\",\n    \"print(prefix)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Load the model we will test\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"560ce990c6484163aa19a2f37788dfeb\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"model = 'mistralai/Mistral-7B-v0.1'\\n\",\n    \"device = 'cuda'\\n\",\n    \"llm_gpt2_large_gpu = guidance.models.Transformers(model, device=device) # run on an A100 for the numbers below\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Run with normal token acceleration\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> </span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"With guidance acceleration and token healing: 3.9129340648651123\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def with_acceleration(lm, n_reps) -> float:\\n\",\n    \"    for _ in range(n_reps):\\n\",\n    \"        lm += prefix + gen(name='story', max_tokens=4) + \\\" \\\"\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"start = time.time()\\n\",\n    \"llm_gpt2_large_gpu + with_acceleration(10)\\n\",\n    \"print(f\\\"With guidance acceleration and token healing:\\\", time.time() - start)\\n\",\n    \"\\n\",\n    \"torch.cuda.empty_cache()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Run without token acceleration\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this.<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Without guidance acceleration: 4.819199085235596\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def without_acceleration(lm, n_reps) -> float:\\n\",\n    \"    prompt = \\\"\\\"\\n\",\n    \"    for _ in range(n_reps):\\n\",\n    \"\\n\",\n    \"        # disable KV cache reuse (using non-public member variables since there is not normal reason to do this)\\n\",\n    \"        lm._cache_state[\\\"past_key_values\\\"] = None\\n\",\n    \"        lm._cache_state[\\\"logits\\\"] = None\\n\",\n    \"        lm._cache_state[\\\"cache_token_ids\\\"] = []\\n\",\n    \"\\n\",\n    \"        # generate a chunk\\n\",\n    \"        lm_new = lm + prompt + prefix + gen(name='story', max_tokens=4)\\n\",\n    \"\\n\",\n    \"        prompt += prefix + \\\" Repeat this. \\\" # update the prompt\\n\",\n    \"    return lm_new\\n\",\n    \"\\n\",\n    \"start = time.time()\\n\",\n    \"llm_gpt2_large_gpu + without_acceleration(10)\\n\",\n    \"print(f\\\"Without guidance acceleration:\\\", time.time() - start)\\n\",\n    \"\\n\",\n    \"torch.cuda.empty_cache()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Run as a single generation call\\n\",\n    \"\\n\",\n    \"This is how you have to run most remote endpoints that don't support guidance.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<pre style='margin: 0px; padding: 0px; padding-left: 8px; margin-left: -8px; border-radius: 0px; border-left: 1px solid rgba(127, 127, 127, 0.2); white-space: pre-wrap; font-family: ColfaxAI, Arial; font-size: 15px; line-height: 23px;'>Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this. Repeat this<span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> Re</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>peat</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'> this</span><span style='background-color: rgba(0.0, 165.0, 0, 0.15); border-radius: 3px;' title='1.0'>.</span></pre>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Single generation call of same length: 20.686521768569946\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"@guidance\\n\",\n    \"def single_gen_call(lm, n_reps) -> float:\\n\",\n    \"    lm += prefix + gen(name='story', max_tokens=(13*4) * n_reps)\\n\",\n    \"    return lm\\n\",\n    \"\\n\",\n    \"start = time.time()\\n\",\n    \"llm_gpt2_large_gpu + single_gen_call(10)\\n\",\n    \"print(f\\\"Single generation call of same length:\\\", time.time() - start)\\n\",\n    \"\\n\",\n    \"torch.cuda.empty_cache()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/tutorials/litellm_models.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"9881451c\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Example: Using LiteLLM model to access VLLM server\\n\",\n    \"\\n\",\n    \"Requirements:\\n\",\n    \"- Installed VLLM instance: Follow this [instruction](https://docs.vllm.ai/en/latest/getting_started/installation/gpu.html#nvidia-cuda)\\n\",\n    \"\\n\",\n    \"Launch an VLLM instance:\\n\",\n    \"```\\n\",\n    \"vllm serve Qwen/Qwen3-1.7B --host 0.0.0.0 \\\\\\n\",\n    \"--port 8000 \\\\\\n\",\n    \"--reasoning-parser deepseek_r1 \\\\\\n\",\n    \"--enable-prefix-caching \\\\\\n\",\n    \"--guided-decoding-backend guidance \\\\\\n\",\n    \"--max-model-len 16384\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c21a05fd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"from pydantic import BaseModel\\n\",\n    \"import guidance\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9d708d02\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"litellm_desc = {\\n\",\n    \"    \\\"model_name\\\": \\\"Qwen/Qwen3-1.7B\\\",\\n\",\n    \"    \\\"litellm_params\\\": {  # params for litellm completion/embedding call\\n\",\n    \"        \\\"model\\\": \\\"hosted_vllm/Qwen/Qwen3-1.7B\\\",\\n\",\n    \"        \\\"api_key\\\": os.environ.get(\\\"VLLM_API_KEY\\\", \\\"NO_KEY\\\"), # set your vLLM API key if needed\\n\",\n    \"        \\\"api_base\\\": \\\"http://localhost:8000/v1\\\", # change to your vLLM API base URL\\n\",\n    \"    },\\n\",\n    \"}\\n\",\n    \"base_lm = guidance.models.experimental.LiteLLM(model_description=litellm_desc, echo=False)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d74c4da5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_gen_test(lm):\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"        lm += \\\"Format your answer as follows: Capital: <capital>, Population: <population>\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.gen(max_tokens=1024, temperature=0.7, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_gen_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"62d7022e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_gen_stop_test(lm):\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"        lm += \\\"Format your answer as follows: Capital: <capital>, Population: <population>\\\"\\n\",\n    \"        lm += \\\"Say 'STOP RIGHT THERE' when you are done.\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.gen(max_tokens=1024, temperature=0.7, name=\\\"answer\\\", stop=[\\\"STOP\\\"])\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_gen_stop_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"cb6de96e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_json_test(lm):\\n\",\n    \"    class CityInfo(BaseModel):\\n\",\n    \"        capital: str\\n\",\n    \"        population: int\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population? Output as JSON.\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.json(schema=CityInfo, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_json_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ac9b0afc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_json_object_test(lm):\\n\",\n    \"    class CityInfo(BaseModel):\\n\",\n    \"        capital: str\\n\",\n    \"        population: int\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population? output json\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.json(schema=None, name=\\\"answer\\\")  # No schema, just output JSON\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_json_object_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0a789fc3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_lark_grammar(lm):\\n\",\n    \"    lark_grammar = \\\"\\\"\\\"\\n\",\n    \"start: \\\"Capital: \\\" CAPITAL \\\", Population: \\\" INT\\n\",\n    \"CAPITAL: /[A-Z][a-z]+/\\n\",\n    \"INT: /[0-9]+/\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.lark(lark_grammar=lark_grammar, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_lark_grammar(base_lm)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"guidance\",\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.13\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "notebooks/tutorials/onnxruntime_models.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"1eed4a21\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Example: Using OnnxRuntime-GenAI model\\n\",\n    \"\\n\",\n    \"Requirements:\\n\",\n    \"```\\n\",\n    \"pip install -e .[onnxruntime_genai]\\n\",\n    \"pip install huggingface_hub\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0b7f7a7c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"\\n\",\n    \"from huggingface_hub import snapshot_download\\n\",\n    \"from pydantic import BaseModel\\n\",\n    \"from transformers import AutoTokenizer\\n\",\n    \"\\n\",\n    \"import guidance\\n\",\n    \"from guidance.chat import Phi4MiniChatTemplate\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f3f99a3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Download Phi4 model\\n\",\n    \"model_sub_dir = \\\"gpu/gpu-int4-rtn-block-32\\\"\\n\",\n    \"base_model_path = snapshot_download(\\n\",\n    \"    repo_id=\\\"microsoft/Phi-4-mini-instruct-onnx\\\",\\n\",\n    \"    allow_patterns=f\\\"{model_sub_dir}/*\\\",\\n\",\n    \")\\n\",\n    \"model_path = os.path.join(base_model_path, model_sub_dir)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d1870f40\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"base_lm = guidance.models.OnnxRuntimeGenAI(\\n\",\n    \"    model=model_path,\\n\",\n    \"    # transformers_tokenizer=AutoTokenizer.from_pretrained(\\\"microsoft/Phi-4-mini-instruct\\\"), # you can specify tokenizer explicitly if needed\\n\",\n    \"    chat_template=Phi4MiniChatTemplate(),\\n\",\n    \"    # execution_provider=\\\"cuda\\\", # Uncomment to use GPU\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"fac0f5dc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_gen_test(lm):\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"        lm += \\\"Format your answer as follows: Capital: <capital>, Population: <population>\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.gen(max_tokens=1024, temperature=0.7, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_gen_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"7364284d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_gen_stop_test(lm):\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"        lm += \\\"Format your answer as follows: Capital: <capital>, Population: <population>\\\"\\n\",\n    \"        lm += \\\"Say 'STOP RIGHT THERE' when you are done.\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.gen(max_tokens=1024, temperature=0.7, name=\\\"answer\\\", stop=[\\\"STOP\\\"])\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_gen_stop_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"57b8a30d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_json_test(lm):\\n\",\n    \"    class CityInfo(BaseModel):\\n\",\n    \"        capital: str\\n\",\n    \"        population: int\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population? Output as JSON.\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.json(schema=CityInfo, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_json_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f5fc08f1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_json_object_test(lm):\\n\",\n    \"    class CityInfo(BaseModel):\\n\",\n    \"        capital: str\\n\",\n    \"        population: int\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population? output json\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.json(schema=None, name=\\\"answer\\\")  # No schema, just output JSON\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_json_object_test(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b5c2792d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def run_lark_grammar(lm):\\n\",\n    \"    lark_grammar = \\\"\\\"\\\"\\n\",\n    \"start: \\\"Capital: \\\" CAPITAL \\\", Population: \\\" INT\\n\",\n    \"CAPITAL: /[A-Z][a-z]+/\\n\",\n    \"INT: /[0-9]+/\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.user():\\n\",\n    \"        lm += \\\"What is the capital of France? and its population?\\\"\\n\",\n    \"\\n\",\n    \"    with guidance.assistant():\\n\",\n    \"        lm += guidance.lark(lark_grammar=lark_grammar, name=\\\"answer\\\")\\n\",\n    \"        print(lm[\\\"answer\\\"])\\n\",\n    \"\\n\",\n    \"run_lark_grammar(base_lm)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c5cc1a68\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"guidance\",\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.12.11\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "notebooks/tutorials/regex_constraints.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Regular expression constraints\\n\",\n    \"\\n\",\n    \"While you can specify any constraint you want with raw guidance functions/grammars, it is often useful to enforce very simple patterns on our `gen()` calls. To do this you can specify regular expression formats to which generated text must adhere. Internally these expressions are converted to native guidance grammars (set of guidance functions).\\n\",\n    \"\\n\",\n    \"## Example\\n\",\n    \"In the following example we know that we want to get number for the generated `chapter` variable, but GPT2 does not know that, and instead makes up something else.\\n\",\n    \"\\n\",\n    \"### Invalid output without a regex guide\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"gpustat is not installed, run `pip install gpustat` to collect GPU stats.\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"3aec0964796543eda8105c6019797e94\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<guidance.models._transformers.Transformers at 0x108f401f320>\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import models, gen\\n\",\n    \"\\n\",\n    \"gpt2 = models.Transformers(\\\"gpt2\\\")\\n\",\n    \"\\n\",\n    \"gpt2 + f\\\"\\\"\\\"\\\\\\n\",\n    \"Rewrite this proverb to apply to model instructions instead.\\n\",\n    \"\\n\",\n    \"Where there is no guidance, a people falls,\\n\",\n    \"but in an abundance of counselors there is safety.\\n\",\n    \"== Proverbs 11:14\\n\",\n    \"\\n\",\n    \"UPDATED\\n\",\n    \"Where there is no guidance{gen('rewrite', stop=\\\"==\\\")}\\n\",\n    \"== GPT {gen('chapter', max_tokens=10)}:{gen('verse', max_tokens=10)}\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Valid output with a regex guide\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"823daf931936471784a9eb9f18fa59b7\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"ename\": \"ValueError\",\n     \"evalue\": \"panic: lexer_stack=[LexerState { row_idx: 0, lexer_state: StateID(19,0), byte: None }, LexerState { row_idx: 0, lexer_state: StateID(20,0), byte: Some(84) }, LexerState { row_idx: 0, lexer_state: StateID(21,0), byte: Some(119) }, LexerState { row_idx: 0, lexer_state: StateID(22,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(23,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(24,0), byte: Some(107) }, LexerState { row_idx: 0, lexer_state: StateID(25,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(26,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(27,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(28,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(29,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(30,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(31,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(32,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(33,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(34,0), byte: Some(118) }, LexerState { row_idx: 0, lexer_state: StateID(35,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(36,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(37,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(38,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(39,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(40,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(41,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(42,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(43,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(44,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(45,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(46,0), byte: Some(121) }, LexerState { row_idx: 0, lexer_state: StateID(47,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(48,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(49,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(50,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(51,0), byte: Some(109) }, LexerState { row_idx: 0, lexer_state: StateID(52,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(53,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(54,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(55,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(56,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(57,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(58,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(59,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(60,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(61,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(62,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(63,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(64,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(65,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(66,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(67,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(68,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(69,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(70,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(71,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(72,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(73,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(74,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(75,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(76,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(77,0), byte: Some(46) }, LexerState { row_idx: 0, lexer_state: StateID(78,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(79,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(80,0), byte: Some(87) }, LexerState { row_idx: 0, lexer_state: StateID(81,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(82,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(83,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(84,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(85,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(86,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(87,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(88,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(89,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(90,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(91,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(92,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(93,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(94,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(95,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(96,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(97,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(98,0), byte: Some(103) }, LexerState { row_idx: 0, lexer_state: StateID(99,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(100,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(101,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(102,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(103,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(104,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(105,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(106,0), byte: Some(44) }, LexerState { row_idx: 0, lexer_state: StateID(107,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(108,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(109,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(110,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(111,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(112,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(113,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(114,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(115,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(116,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(117,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(118,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(119,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(120,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(121,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(122,0), byte: Some(44) }, LexerState { row_idx: 0, lexer_state: StateID(123,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(124,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(125,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(126,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(127,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(128,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(129,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(130,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(131,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(132,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(133,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(134,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(135,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(136,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(137,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(138,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(139,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(140,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(141,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(142,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(143,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(144,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(145,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(146,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(147,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(148,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(149,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(150,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(151,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(152,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(153,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(154,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(155,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(156,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(157,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(158,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(159,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(160,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(161,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(162,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(163,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(164,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(165,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(166,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(167,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(168,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(169,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(170,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(171,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(172,0), byte: Some(121) }, LexerState { row_idx: 0, lexer_state: StateID(173,0), byte: Some(46) }, LexerState { row_idx: 0, lexer_state: StateID(174,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(175,0), byte: Some(61) }, LexerState { row_idx: 0, lexer_state: StateID(176,0), byte: Some(61) }, LexerState { row_idx: 0, lexer_state: StateID(177,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(178,0), byte: Some(80) }, LexerState { row_idx: 0, lexer_state: StateID(179,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(180,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(181,0), byte: Some(118) }, LexerState { row_idx: 0, lexer_state: StateID(182,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(183,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(184,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(185,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(186,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(187,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(188,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(189,0), byte: Some(58) }, LexerState { row_idx: 0, lexer_state: StateID(190,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(191,0), byte: Some(52) }, LexerState { row_idx: 0, lexer_state: StateID(192,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(193,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(194,0), byte: Some(85) }, LexerState { row_idx: 0, lexer_state: StateID(195,0), byte: Some(80) }, LexerState { row_idx: 0, lexer_state: StateID(196,0), byte: Some(68) }, LexerState { row_idx: 0, lexer_state: StateID(197,0), byte: Some(65) }, LexerState { row_idx: 0, lexer_state: StateID(198,0), byte: Some(84) }, LexerState { row_idx: 0, lexer_state: StateID(199,0), byte: Some(69) }, LexerState { row_idx: 0, lexer_state: StateID(200,0), byte: Some(68) }, LexerState { row_idx: 0, lexer_state: StateID(201,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(202,0), byte: Some(87) }, LexerState { row_idx: 0, lexer_state: StateID(203,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(204,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(205,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(206,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(207,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(208,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(209,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(210,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(211,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(212,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(213,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(214,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(215,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(216,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(217,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(218,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(219,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(220,0), byte: Some(103) }, LexerState { row_idx: 0, lexer_state: StateID(221,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(222,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(223,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(224,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(225,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(226,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: None }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(44) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(112) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(112) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(44) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(98) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(105) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(98) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(100) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(114) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(104) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(114) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(105) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(121) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(46) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(10) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(10) }, LexerState { row_idx: 1, lexer_state: StateID(229,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(232,0), byte: None }, LexerState { row_idx: 2, lexer_state: StateID(238,0), byte: Some(10) }, LexerState { row_idx: 2, lexer_state: StateID(239,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(240,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(241,0), byte: Some(32) }, LexerState { row_idx: 2, lexer_state: StateID(242,0), byte: Some(71) }, LexerState { row_idx: 2, lexer_state: StateID(243,0), byte: Some(80) }, LexerState { row_idx: 2, lexer_state: StateID(244,0), byte: Some(84) }, LexerState { row_idx: 3, lexer_state: StateID(246,0), byte: None }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(49) }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(48) }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(49) }, LexerState { row_idx: 5, lexer_state: StateID(246,0), byte: None }, LexerState { row_idx: 5, lexer_state: StateID(247,0), byte: Some(49) }] bytes=\\\"Tweak this proverb to apply to model instructions instead.\\\\n\\\\nWhere there is no guidance, a people falls,\\\\nbut in an abundance of counselors there is safety.\\\\n== Proverbs 11:14\\\\n\\\\nUPDATED\\\\nWhere there is no guidance, a people falls,but in an abundance of counselors there is safety.\\\\n\\\\n\\\\n== GPT 101:1\\\" 293!=290+1\\n   0: llg_clone_matcher\\n   1: llg_clone_matcher\\n   2: llg_clone_matcher\\n   3: llg_clone_matcher\\n   4: llg_clone_matcher\\n   5: llg_clone_matcher\\n   6: llg_clone_matcher\\n   7: llg_clone_matcher\\n   8: llg_clone_matcher\\n   9: llg_clone_matcher\\n  10: llg_clone_matcher\\n  11: llg_clone_matcher\\n  12: llg_clone_matcher\\n  13: llg_clone_matcher\\n  14: llg_clone_matcher\\n  15: <unknown>\\n  16: <unknown>\\n  17: <unknown>\\n  18: method_vectorcall_VARARGS_KEYWORDS\\n             at \\\\Objects\\\\descrobject.c:365\\n  19: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  20: PyObject_Vectorcall\\n             at \\\\Objects\\\\call.c:325\\n  21: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2715\\n  22: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  23: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  24: gen_send_ex\\n             at \\\\Objects\\\\genobject.c:274\\n  25: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3094\\n  26: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  27: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  28: gen_iternext\\n             at \\\\Objects\\\\genobject.c:603\\n  29: enum_next\\n             at \\\\Objects\\\\enumobject.c:231\\n  30: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2324\\n  31: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  32: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  33: vectorcall_unbound\\n             at \\\\Objects\\\\typeobject.c:2236\\n  34: vectorcall_maybe\\n             at \\\\Objects\\\\typeobject.c:2288\\n  35: slot_nb_add\\n             at \\\\Objects\\\\typeobject.c:8588\\n  36: binary_op1\\n             at \\\\Objects\\\\abstract.c:882\\n  37: PyNumber_Add\\n             at \\\\Objects\\\\abstract.c:1062\\n  38: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3391\\n  39: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  40: _PyEval_Vector\\n             at \\\\Python\\\\ceval.c:1685\\n  41: PyEval_EvalCode\\n             at \\\\Python\\\\ceval.c:580\\n  42: builtin_exec_impl\\n             at \\\\Python\\\\bltinmodule.c:1096\\n  43: builtin_exec\\n             at \\\\Python\\\\clinic\\\\bltinmodule.c.h:586\\n  44: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2975\\n  45: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  46: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  47: gen_send_ex\\n             at \\\\Objects\\\\genobject.c:274\\n  48: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3094\\n  49: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  50: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  51: method_vectorcall\\n             at \\\\Objects\\\\classobject.c:61\\n  52: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:283\\n  53: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  54: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3263\\n  55: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  56: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  57: PyGen_am_send\\n             at \\\\Objects\\\\genobject.c:267\\n  58: <unknown>\\n  59: <unknown>\\n  60: cfunction_vectorcall_O\\n             at \\\\Objects\\\\methodobject.c:509\\n  61: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  62: context_run\\n             at \\\\Python\\\\context.c:668\\n  63: cfunction_vectorcall_FASTCALL_KEYWORDS\\n             at \\\\Objects\\\\methodobject.c:438\\n  64: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:271\\n  65: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  66: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3263\\n  67: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  68: _PyEval_Vector\\n             at \\\\Python\\\\ceval.c:1685\\n  69: PyEval_EvalCode\\n             at \\\\Python\\\\ceval.c:580\\n  70: builtin_exec_impl\\n             at \\\\Python\\\\bltinmodule.c:1096\\n  71: builtin_exec\\n             at \\\\Python\\\\clinic\\\\bltinmodule.c.h:586\\n  72: cfunction_vectorcall_FASTCALL_KEYWORDS\\n             at \\\\Objects\\\\methodobject.c:438\\n  73: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  74: PyObject_Vectorcall\\n             at \\\\Objects\\\\call.c:325\\n  75: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2715\\n  76: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  77: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:271\\n  78: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  79: PyObject_Call\\n             at \\\\Objects\\\\call.c:379\\n  80: pymain_run_module\\n             at \\\\Modules\\\\main.c:300\\n  81: pymain_run_python\\n             at \\\\Modules\\\\main.c:628\\n  82: Py_RunMain\\n             at \\\\Modules\\\\main.c:714\\n  83: pymain_main\\n             at \\\\Modules\\\\main.c:744\\n  84: Py_Main\\n             at \\\\Modules\\\\main.c:756\\n  85: invoke_main\\n             at D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\vctools\\\\crt\\\\vcstartup\\\\src\\\\startup\\\\exe_common.inl:90\\n  86: __scrt_common_main_seh\\n             at D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\vctools\\\\crt\\\\vcstartup\\\\src\\\\startup\\\\exe_common.inl:288\\n  87: BaseThreadInitThunk\\n  88: RtlUserThreadStart\\n\\n<state>\\nTokens: ⟦Twe‧ak‧ this‧ proverb‧ to‧ apply‧ to‧ model‧ instructions‧ instead‧.‧\\\\n‧\\\\n‧Where‧ there‧ is‧ no‧ guidance‧,‧ a‧ people‧ falls‧,‧\\\\n‧but‧ in‧ an‧ abundance‧ of‧ counselors‧ there‧ is‧ safety‧.‧\\\\n‧==‧ Pro‧verbs‧ 11‧:‧14‧\\\\n‧\\\\n‧U‧PDATED‧\\\\n‧Where‧ there‧ is‧ no‧ guidance‧,‧ a‧ people‧ falls‧,‧but‧ in‧ an‧ abundance‧ of‧ counselors‧ there‧ is‧ safety‧.‧\\\\n‧\\\\n‧\\\\n‧==‧ G‧PT‧ 101‧:‧1⟧\\n75 tokens, 290 bytes; grm_prefix: \\\"\\\"\\nFlags: had_backtrack\\nParser: {\\n  \\\"compute_time_us\\\": 23165,\\n  \\\"rows\\\": 34,\\n  \\\"cached_rows\\\": 354,\\n  \\\"all_items\\\": 47,\\n  \\\"lexer_cost\\\": 6420,\\n  \\\"slices_applied\\\": 0,\\n  \\\"trie_nodes_walked\\\": 1766059,\\n  \\\"definitive_bytes\\\": 292,\\n  \\\"lexer_ops\\\": 0,\\n  \\\"num_lex_errors\\\": 0,\\n  \\\"num_lexemes\\\": 0\\n}\\nStop: NotStopped\\nError: None\\n</state>\",\n     \"output_type\": \"error\",\n     \"traceback\": [\n      \"\\u001b[31m---------------------------------------------------------------------------\\u001b[39m\",\n      \"\\u001b[31mValueError\\u001b[39m                                Traceback (most recent call last)\",\n      \"\\u001b[36mCell\\u001b[39m\\u001b[36m \\u001b[39m\\u001b[32mIn[2]\\u001b[39m\\u001b[32m, line 1\\u001b[39m\\n\\u001b[32m----> \\u001b[39m\\u001b[32m1\\u001b[39m \\u001b[43mgpt2\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m+\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[33;43mf\\u001b[39;49m\\u001b[33;43m\\\"\\\"\\\"\\u001b[39;49m\\u001b[38;5;130;43;01m\\\\\\u001b[39;49;00m\\n\\u001b[32m      2\\u001b[39m \\u001b[33;43mTweak this proverb to apply to model instructions instead.\\u001b[39;49m\\n\\u001b[32m      3\\u001b[39m \\n\\u001b[32m      4\\u001b[39m \\u001b[33;43mWhere there is no guidance, a people falls,\\u001b[39;49m\\n\\u001b[32m      5\\u001b[39m \\u001b[33;43mbut in an abundance of counselors there is safety.\\u001b[39;49m\\n\\u001b[32m      6\\u001b[39m \\u001b[33;43m== Proverbs 11:14\\u001b[39;49m\\n\\u001b[32m      7\\u001b[39m \\n\\u001b[32m      8\\u001b[39m \\u001b[33;43mUPDATED\\u001b[39;49m\\n\\u001b[32m      9\\u001b[39m \\u001b[33;43mWhere there is no guidance\\u001b[39;49m\\u001b[38;5;132;43;01m{\\u001b[39;49;00m\\u001b[43mgen\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[33;43m'\\u001b[39;49m\\u001b[33;43mrewrite\\u001b[39;49m\\u001b[33;43m'\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[38;5;250;43m \\u001b[39;49m\\u001b[43mstop\\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[33;43m==\\u001b[39;49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[43m)\\u001b[49m\\u001b[38;5;132;43;01m}\\u001b[39;49;00m\\n\\u001b[32m     10\\u001b[39m \\u001b[33;43m== GPT \\u001b[39;49m\\u001b[38;5;132;43;01m{\\u001b[39;49;00m\\u001b[43mgen\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[33;43m'\\u001b[39;49m\\u001b[33;43mchapter\\u001b[39;49m\\u001b[33;43m'\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[38;5;250;43m \\u001b[39;49m\\u001b[43mregex\\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[33;43m[0-9]+\\u001b[39;49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[43m)\\u001b[49m\\u001b[38;5;132;43;01m}\\u001b[39;49;00m\\u001b[33;43m:\\u001b[39;49m\\u001b[38;5;132;43;01m{\\u001b[39;49;00m\\u001b[43mgen\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[33;43m'\\u001b[39;49m\\u001b[33;43mverse\\u001b[39;49m\\u001b[33;43m'\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[38;5;250;43m \\u001b[39;49m\\u001b[43mregex\\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[33;43m[0-9]+\\u001b[39;49m\\u001b[33;43m\\\"\\u001b[39;49m\\u001b[43m)\\u001b[49m\\u001b[38;5;132;43;01m}\\u001b[39;49;00m\\u001b[33;43m\\\"\\\"\\\"\\u001b[39;49m\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_base\\\\_model.py:104\\u001b[39m, in \\u001b[36mModel.__add__\\u001b[39m\\u001b[34m(self, other)\\u001b[39m\\n\\u001b[32m    102\\u001b[39m     \\u001b[38;5;28;01mreturn\\u001b[39;00m other(\\u001b[38;5;28mself\\u001b[39m)\\n\\u001b[32m    103\\u001b[39m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28misinstance\\u001b[39m(other, ASTNode):\\n\\u001b[32m--> \\u001b[39m\\u001b[32m104\\u001b[39m     \\u001b[38;5;28mself\\u001b[39m = \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m.\\u001b[49m\\u001b[43m_apply_node\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mother\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[32m    105\\u001b[39m     \\u001b[38;5;28mself\\u001b[39m = \\u001b[38;5;28mself\\u001b[39m._update_open_block_captures()\\n\\u001b[32m    106\\u001b[39m     \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[38;5;28mself\\u001b[39m\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_base\\\\_model.py:132\\u001b[39m, in \\u001b[36mModel._apply_node\\u001b[39m\\u001b[34m(self, node)\\u001b[39m\\n\\u001b[32m    129\\u001b[39m \\u001b[38;5;28;01melse\\u001b[39;00m:\\n\\u001b[32m    130\\u001b[39m     \\u001b[38;5;28mself\\u001b[39m._update_trace_node(\\u001b[38;5;28mself\\u001b[39m._id, \\u001b[38;5;28mself\\u001b[39m._parent_id, StatelessGuidanceInput(value=node))\\n\\u001b[32m--> \\u001b[39m\\u001b[32m132\\u001b[39m \\u001b[43m\\u001b[49m\\u001b[38;5;28;43;01mfor\\u001b[39;49;00m\\u001b[43m \\u001b[49m\\u001b[43mi\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43moutput_attr\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;129;43;01min\\u001b[39;49;00m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43menumerate\\u001b[39;49m\\u001b[43m(\\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m.\\u001b[49m\\u001b[43m_interpreter\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43mrun\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mnode\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m:\\u001b[49m\\n\\u001b[32m    133\\u001b[39m \\u001b[43m    \\u001b[49m\\u001b[38;5;28;43;01mif\\u001b[39;49;00m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43misinstance\\u001b[39;49m\\u001b[43m(\\u001b[49m\\u001b[43moutput_attr\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mTextOutput\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m:\\u001b[49m\\n\\u001b[32m    134\\u001b[39m \\u001b[43m        \\u001b[49m\\u001b[38;5;66;43;03m# TODO: put this elsewhere (inside state?)\\u001b[39;49;00m\\n\\u001b[32m    135\\u001b[39m \\u001b[43m        \\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m.\\u001b[49m\\u001b[43mtoken_count\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m+\\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43moutput_attr\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43mtoken_count\\u001b[49m\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_base\\\\_interpreter.py:36\\u001b[39m, in \\u001b[36mInterpreter.run\\u001b[39m\\u001b[34m(self, node, **kwargs)\\u001b[39m\\n\\u001b[32m     35\\u001b[39m \\u001b[38;5;28;01mdef\\u001b[39;00m\\u001b[38;5;250m \\u001b[39m\\u001b[34mrun\\u001b[39m(\\u001b[38;5;28mself\\u001b[39m, node: ASTNode, **kwargs) -> Iterator[OutputAttr]:\\n\\u001b[32m---> \\u001b[39m\\u001b[32m36\\u001b[39m     \\u001b[38;5;28;01myield from\\u001b[39;00m node.simplify()._run(\\u001b[38;5;28mself\\u001b[39m, **kwargs)\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_engine\\\\_interpreter.py:65\\u001b[39m, in \\u001b[36mEngineInterpreter.grammar\\u001b[39m\\u001b[34m(self, node, **kwargs)\\u001b[39m\\n\\u001b[32m     57\\u001b[39m engine_gen = \\u001b[38;5;28mself\\u001b[39m.engine(\\n\\u001b[32m     58\\u001b[39m     state=\\u001b[38;5;28mself\\u001b[39m.state,\\n\\u001b[32m     59\\u001b[39m     grammar=node.ll_grammar(),\\n\\u001b[32m     60\\u001b[39m     ensure_bos_token=\\u001b[38;5;28;01mTrue\\u001b[39;00m,\\n\\u001b[32m     61\\u001b[39m     echo=\\u001b[38;5;28;01mFalse\\u001b[39;00m,\\n\\u001b[32m     62\\u001b[39m )\\n\\u001b[32m     64\\u001b[39m delayed_bytes = \\u001b[33mb\\u001b[39m\\u001b[33m\\\"\\u001b[39m\\u001b[33m\\\"\\u001b[39m\\n\\u001b[32m---> \\u001b[39m\\u001b[32m65\\u001b[39m \\u001b[43m\\u001b[49m\\u001b[38;5;28;43;01mfor\\u001b[39;49;00m\\u001b[43m \\u001b[49m\\u001b[43mchunk\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;129;43;01min\\u001b[39;49;00m\\u001b[43m \\u001b[49m\\u001b[43mengine_gen\\u001b[49m\\u001b[43m:\\u001b[49m\\n\\u001b[32m     66\\u001b[39m \\u001b[43m    \\u001b[49m\\u001b[43mnew_bytes\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mchunk\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43mnew_bytes\\u001b[49m\\n\\u001b[32m     67\\u001b[39m \\u001b[43m    \\u001b[49m\\u001b[43mnew_text\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mdelayed_bytes\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m=\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpartial_decode\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mnew_bytes\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\models\\\\_engine\\\\_engine.py:175\\u001b[39m, in \\u001b[36mEngine.__call__\\u001b[39m\\u001b[34m(self, state, grammar, ensure_bos_token, echo)\\u001b[39m\\n\\u001b[32m    172\\u001b[39m \\u001b[38;5;28;01mwhile\\u001b[39;00m \\u001b[38;5;129;01mnot\\u001b[39;00m parser.done():\\n\\u001b[32m    173\\u001b[39m     t0 = time.time()\\n\\u001b[32m--> \\u001b[39m\\u001b[32m175\\u001b[39m     tokens, mask_fut, backtrack = \\u001b[43mparser\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43madvance\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mengine_output\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[32m    177\\u001b[39m     \\u001b[38;5;66;03m# Note that has_pending_stop implies that the response is a stop response,\\u001b[39;00m\\n\\u001b[32m    178\\u001b[39m     \\u001b[38;5;66;03m# but the converse is not true. We can therefore avoid some (but not all)\\u001b[39;00m\\n\\u001b[32m    179\\u001b[39m     \\u001b[38;5;66;03m# unnecessary calls to get_logits on the final iteration.\\u001b[39;00m\\n\\u001b[32m    180\\u001b[39m     has_pending_stop = parser.has_pending_stop()\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\_parser.py:70\\u001b[39m, in \\u001b[36mTokenParser.advance\\u001b[39m\\u001b[34m(self, engine_output)\\u001b[39m\\n\\u001b[32m     67\\u001b[39m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28mself\\u001b[39m.done():\\n\\u001b[32m     68\\u001b[39m     \\u001b[38;5;28;01mraise\\u001b[39;00m TokenParserException(\\u001b[33m\\\"\\u001b[39m\\u001b[33mCannot advance on a done parser\\u001b[39m\\u001b[33m\\\"\\u001b[39m)\\n\\u001b[32m---> \\u001b[39m\\u001b[32m70\\u001b[39m \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m.\\u001b[49m\\u001b[43m_generator\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43msend\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mengine_output\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n      \"\\u001b[36mFile \\u001b[39m\\u001b[32m~\\\\source\\\\repos\\\\guidance\\\\guidance\\\\_parser.py:145\\u001b[39m, in \\u001b[36mTokenParser._parse\\u001b[39m\\u001b[34m(self, prompt, ensure_bos_token)\\u001b[39m\\n\\u001b[32m    136\\u001b[39m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;129;01mnot\\u001b[39;00m mask[engine_output.issued_token.token_id]:\\n\\u001b[32m    137\\u001b[39m     \\u001b[38;5;66;03m# Note: we could punt this probem to ll_interpreter.post_process,\\u001b[39;00m\\n\\u001b[32m    138\\u001b[39m     \\u001b[38;5;66;03m# but it's a bit clearer to handle it here\\u001b[39;00m\\n\\u001b[32m    139\\u001b[39m     \\u001b[38;5;28;01mraise\\u001b[39;00m InvalidTokenException(\\n\\u001b[32m    140\\u001b[39m         token=engine_output.issued_token.token_id,\\n\\u001b[32m    141\\u001b[39m         valid_tokens=[i \\u001b[38;5;28;01mfor\\u001b[39;00m i \\u001b[38;5;129;01min\\u001b[39;00m \\u001b[38;5;28mrange\\u001b[39m(\\u001b[38;5;28mlen\\u001b[39m(mask)) \\u001b[38;5;28;01mif\\u001b[39;00m mask[i]],\\n\\u001b[32m    142\\u001b[39m         prompt_tokens=tokens\\n\\u001b[32m    143\\u001b[39m     )            \\n\\u001b[32m--> \\u001b[39m\\u001b[32m145\\u001b[39m backtrack, ff_tokens = \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m.\\u001b[49m\\u001b[43mll_interpreter\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43mcommit_token\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[32m    146\\u001b[39m \\u001b[43m    \\u001b[49m\\u001b[43mengine_output\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43missued_token\\u001b[49m\\u001b[43m.\\u001b[49m\\u001b[43mtoken_id\\u001b[49m\\n\\u001b[32m    147\\u001b[39m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[32m    148\\u001b[39m \\u001b[38;5;28;01mif\\u001b[39;00m backtrack:\\n\\u001b[32m    149\\u001b[39m     tokens = tokens[:-backtrack]\\n\",\n      \"\\u001b[31mValueError\\u001b[39m: panic: lexer_stack=[LexerState { row_idx: 0, lexer_state: StateID(19,0), byte: None }, LexerState { row_idx: 0, lexer_state: StateID(20,0), byte: Some(84) }, LexerState { row_idx: 0, lexer_state: StateID(21,0), byte: Some(119) }, LexerState { row_idx: 0, lexer_state: StateID(22,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(23,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(24,0), byte: Some(107) }, LexerState { row_idx: 0, lexer_state: StateID(25,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(26,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(27,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(28,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(29,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(30,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(31,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(32,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(33,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(34,0), byte: Some(118) }, LexerState { row_idx: 0, lexer_state: StateID(35,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(36,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(37,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(38,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(39,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(40,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(41,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(42,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(43,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(44,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(45,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(46,0), byte: Some(121) }, LexerState { row_idx: 0, lexer_state: StateID(47,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(48,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(49,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(50,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(51,0), byte: Some(109) }, LexerState { row_idx: 0, lexer_state: StateID(52,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(53,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(54,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(55,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(56,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(57,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(58,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(59,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(60,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(61,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(62,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(63,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(64,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(65,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(66,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(67,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(68,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(69,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(70,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(71,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(72,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(73,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(74,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(75,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(76,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(77,0), byte: Some(46) }, LexerState { row_idx: 0, lexer_state: StateID(78,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(79,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(80,0), byte: Some(87) }, LexerState { row_idx: 0, lexer_state: StateID(81,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(82,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(83,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(84,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(85,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(86,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(87,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(88,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(89,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(90,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(91,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(92,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(93,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(94,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(95,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(96,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(97,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(98,0), byte: Some(103) }, LexerState { row_idx: 0, lexer_state: StateID(99,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(100,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(101,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(102,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(103,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(104,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(105,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(106,0), byte: Some(44) }, LexerState { row_idx: 0, lexer_state: StateID(107,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(108,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(109,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(110,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(111,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(112,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(113,0), byte: Some(112) }, LexerState { row_idx: 0, lexer_state: StateID(114,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(115,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(116,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(117,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(118,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(119,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(120,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(121,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(122,0), byte: Some(44) }, LexerState { row_idx: 0, lexer_state: StateID(123,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(124,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(125,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(126,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(127,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(128,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(129,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(130,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(131,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(132,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(133,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(134,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(135,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(136,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(137,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(138,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(139,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(140,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(141,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(142,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(143,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(144,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(145,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(146,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(147,0), byte: Some(99) }, LexerState { row_idx: 0, lexer_state: StateID(148,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(149,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(150,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(151,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(152,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(153,0), byte: Some(108) }, LexerState { row_idx: 0, lexer_state: StateID(154,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(155,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(156,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(157,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(158,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(159,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(160,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(161,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(162,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(163,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(164,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(165,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(166,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(167,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(168,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(169,0), byte: Some(102) }, LexerState { row_idx: 0, lexer_state: StateID(170,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(171,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(172,0), byte: Some(121) }, LexerState { row_idx: 0, lexer_state: StateID(173,0), byte: Some(46) }, LexerState { row_idx: 0, lexer_state: StateID(174,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(175,0), byte: Some(61) }, LexerState { row_idx: 0, lexer_state: StateID(176,0), byte: Some(61) }, LexerState { row_idx: 0, lexer_state: StateID(177,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(178,0), byte: Some(80) }, LexerState { row_idx: 0, lexer_state: StateID(179,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(180,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(181,0), byte: Some(118) }, LexerState { row_idx: 0, lexer_state: StateID(182,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(183,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(184,0), byte: Some(98) }, LexerState { row_idx: 0, lexer_state: StateID(185,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(186,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(187,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(188,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(189,0), byte: Some(58) }, LexerState { row_idx: 0, lexer_state: StateID(190,0), byte: Some(49) }, LexerState { row_idx: 0, lexer_state: StateID(191,0), byte: Some(52) }, LexerState { row_idx: 0, lexer_state: StateID(192,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(193,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(194,0), byte: Some(85) }, LexerState { row_idx: 0, lexer_state: StateID(195,0), byte: Some(80) }, LexerState { row_idx: 0, lexer_state: StateID(196,0), byte: Some(68) }, LexerState { row_idx: 0, lexer_state: StateID(197,0), byte: Some(65) }, LexerState { row_idx: 0, lexer_state: StateID(198,0), byte: Some(84) }, LexerState { row_idx: 0, lexer_state: StateID(199,0), byte: Some(69) }, LexerState { row_idx: 0, lexer_state: StateID(200,0), byte: Some(68) }, LexerState { row_idx: 0, lexer_state: StateID(201,0), byte: Some(10) }, LexerState { row_idx: 0, lexer_state: StateID(202,0), byte: Some(87) }, LexerState { row_idx: 0, lexer_state: StateID(203,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(204,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(205,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(206,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(207,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(208,0), byte: Some(116) }, LexerState { row_idx: 0, lexer_state: StateID(209,0), byte: Some(104) }, LexerState { row_idx: 0, lexer_state: StateID(210,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(211,0), byte: Some(114) }, LexerState { row_idx: 0, lexer_state: StateID(212,0), byte: Some(101) }, LexerState { row_idx: 0, lexer_state: StateID(213,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(214,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(215,0), byte: Some(115) }, LexerState { row_idx: 0, lexer_state: StateID(216,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(217,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(218,0), byte: Some(111) }, LexerState { row_idx: 0, lexer_state: StateID(219,0), byte: Some(32) }, LexerState { row_idx: 0, lexer_state: StateID(220,0), byte: Some(103) }, LexerState { row_idx: 0, lexer_state: StateID(221,0), byte: Some(117) }, LexerState { row_idx: 0, lexer_state: StateID(222,0), byte: Some(105) }, LexerState { row_idx: 0, lexer_state: StateID(223,0), byte: Some(100) }, LexerState { row_idx: 0, lexer_state: StateID(224,0), byte: Some(97) }, LexerState { row_idx: 0, lexer_state: StateID(225,0), byte: Some(110) }, LexerState { row_idx: 0, lexer_state: StateID(226,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: None }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(44) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(112) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(112) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(44) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(98) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(105) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(98) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(100) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(99) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(117) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(110) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(108) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(111) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(114) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(104) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(114) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(105) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(32) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(115) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(97) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(102) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(101) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(116) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(121) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(46) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(10) }, LexerState { row_idx: 1, lexer_state: StateID(3,0), byte: Some(10) }, LexerState { row_idx: 1, lexer_state: StateID(229,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(232,0), byte: None }, LexerState { row_idx: 2, lexer_state: StateID(238,0), byte: Some(10) }, LexerState { row_idx: 2, lexer_state: StateID(239,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(240,0), byte: Some(61) }, LexerState { row_idx: 2, lexer_state: StateID(241,0), byte: Some(32) }, LexerState { row_idx: 2, lexer_state: StateID(242,0), byte: Some(71) }, LexerState { row_idx: 2, lexer_state: StateID(243,0), byte: Some(80) }, LexerState { row_idx: 2, lexer_state: StateID(244,0), byte: Some(84) }, LexerState { row_idx: 3, lexer_state: StateID(246,0), byte: None }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(49) }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(48) }, LexerState { row_idx: 3, lexer_state: StateID(247,0), byte: Some(49) }, LexerState { row_idx: 5, lexer_state: StateID(246,0), byte: None }, LexerState { row_idx: 5, lexer_state: StateID(247,0), byte: Some(49) }] bytes=\\\"Tweak this proverb to apply to model instructions instead.\\\\n\\\\nWhere there is no guidance, a people falls,\\\\nbut in an abundance of counselors there is safety.\\\\n== Proverbs 11:14\\\\n\\\\nUPDATED\\\\nWhere there is no guidance, a people falls,but in an abundance of counselors there is safety.\\\\n\\\\n\\\\n== GPT 101:1\\\" 293!=290+1\\n   0: llg_clone_matcher\\n   1: llg_clone_matcher\\n   2: llg_clone_matcher\\n   3: llg_clone_matcher\\n   4: llg_clone_matcher\\n   5: llg_clone_matcher\\n   6: llg_clone_matcher\\n   7: llg_clone_matcher\\n   8: llg_clone_matcher\\n   9: llg_clone_matcher\\n  10: llg_clone_matcher\\n  11: llg_clone_matcher\\n  12: llg_clone_matcher\\n  13: llg_clone_matcher\\n  14: llg_clone_matcher\\n  15: <unknown>\\n  16: <unknown>\\n  17: <unknown>\\n  18: method_vectorcall_VARARGS_KEYWORDS\\n             at \\\\Objects\\\\descrobject.c:365\\n  19: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  20: PyObject_Vectorcall\\n             at \\\\Objects\\\\call.c:325\\n  21: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2715\\n  22: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  23: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  24: gen_send_ex\\n             at \\\\Objects\\\\genobject.c:274\\n  25: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3094\\n  26: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  27: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  28: gen_iternext\\n             at \\\\Objects\\\\genobject.c:603\\n  29: enum_next\\n             at \\\\Objects\\\\enumobject.c:231\\n  30: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2324\\n  31: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  32: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  33: vectorcall_unbound\\n             at \\\\Objects\\\\typeobject.c:2236\\n  34: vectorcall_maybe\\n             at \\\\Objects\\\\typeobject.c:2288\\n  35: slot_nb_add\\n             at \\\\Objects\\\\typeobject.c:8588\\n  36: binary_op1\\n             at \\\\Objects\\\\abstract.c:882\\n  37: PyNumber_Add\\n             at \\\\Objects\\\\abstract.c:1062\\n  38: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3391\\n  39: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  40: _PyEval_Vector\\n             at \\\\Python\\\\ceval.c:1685\\n  41: PyEval_EvalCode\\n             at \\\\Python\\\\ceval.c:580\\n  42: builtin_exec_impl\\n             at \\\\Python\\\\bltinmodule.c:1096\\n  43: builtin_exec\\n             at \\\\Python\\\\clinic\\\\bltinmodule.c.h:586\\n  44: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2975\\n  45: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  46: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  47: gen_send_ex\\n             at \\\\Objects\\\\genobject.c:274\\n  48: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3094\\n  49: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  50: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  51: method_vectorcall\\n             at \\\\Objects\\\\classobject.c:61\\n  52: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:283\\n  53: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  54: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3263\\n  55: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  56: gen_send_ex2\\n             at \\\\Objects\\\\genobject.c:230\\n  57: PyGen_am_send\\n             at \\\\Objects\\\\genobject.c:267\\n  58: <unknown>\\n  59: <unknown>\\n  60: cfunction_vectorcall_O\\n             at \\\\Objects\\\\methodobject.c:509\\n  61: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  62: context_run\\n             at \\\\Python\\\\context.c:668\\n  63: cfunction_vectorcall_FASTCALL_KEYWORDS\\n             at \\\\Objects\\\\methodobject.c:438\\n  64: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:271\\n  65: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  66: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:3263\\n  67: _PyEval_EvalFrame\\n             at \\\\Include\\\\internal\\\\pycore_ceval.h:89\\n  68: _PyEval_Vector\\n             at \\\\Python\\\\ceval.c:1685\\n  69: PyEval_EvalCode\\n             at \\\\Python\\\\ceval.c:580\\n  70: builtin_exec_impl\\n             at \\\\Python\\\\bltinmodule.c:1096\\n  71: builtin_exec\\n             at \\\\Python\\\\clinic\\\\bltinmodule.c.h:586\\n  72: cfunction_vectorcall_FASTCALL_KEYWORDS\\n             at \\\\Objects\\\\methodobject.c:438\\n  73: _PyObject_VectorcallTstate\\n             at \\\\Include\\\\internal\\\\pycore_call.h:92\\n  74: PyObject_Vectorcall\\n             at \\\\Objects\\\\call.c:325\\n  75: _PyEval_EvalFrameDefault\\n             at \\\\PCbuild\\\\Python\\\\bytecodes.c:2715\\n  76: _PyFunction_Vectorcall\\n             at \\\\Objects\\\\call.c:424\\n  77: _PyVectorcall_Call\\n             at \\\\Objects\\\\call.c:271\\n  78: _PyObject_Call\\n             at \\\\Objects\\\\call.c:354\\n  79: PyObject_Call\\n             at \\\\Objects\\\\call.c:379\\n  80: pymain_run_module\\n             at \\\\Modules\\\\main.c:300\\n  81: pymain_run_python\\n             at \\\\Modules\\\\main.c:628\\n  82: Py_RunMain\\n             at \\\\Modules\\\\main.c:714\\n  83: pymain_main\\n             at \\\\Modules\\\\main.c:744\\n  84: Py_Main\\n             at \\\\Modules\\\\main.c:756\\n  85: invoke_main\\n             at D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\vctools\\\\crt\\\\vcstartup\\\\src\\\\startup\\\\exe_common.inl:90\\n  86: __scrt_common_main_seh\\n             at D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\vctools\\\\crt\\\\vcstartup\\\\src\\\\startup\\\\exe_common.inl:288\\n  87: BaseThreadInitThunk\\n  88: RtlUserThreadStart\\n\\n<state>\\nTokens: ⟦Twe‧ak‧ this‧ proverb‧ to‧ apply‧ to‧ model‧ instructions‧ instead‧.‧\\\\n‧\\\\n‧Where‧ there‧ is‧ no‧ guidance‧,‧ a‧ people‧ falls‧,‧\\\\n‧but‧ in‧ an‧ abundance‧ of‧ counselors‧ there‧ is‧ safety‧.‧\\\\n‧==‧ Pro‧verbs‧ 11‧:‧14‧\\\\n‧\\\\n‧U‧PDATED‧\\\\n‧Where‧ there‧ is‧ no‧ guidance‧,‧ a‧ people‧ falls‧,‧but‧ in‧ an‧ abundance‧ of‧ counselors‧ there‧ is‧ safety‧.‧\\\\n‧\\\\n‧\\\\n‧==‧ G‧PT‧ 101‧:‧1⟧\\n75 tokens, 290 bytes; grm_prefix: \\\"\\\"\\nFlags: had_backtrack\\nParser: {\\n  \\\"compute_time_us\\\": 23165,\\n  \\\"rows\\\": 34,\\n  \\\"cached_rows\\\": 354,\\n  \\\"all_items\\\": 47,\\n  \\\"lexer_cost\\\": 6420,\\n  \\\"slices_applied\\\": 0,\\n  \\\"trie_nodes_walked\\\": 1766059,\\n  \\\"definitive_bytes\\\": 292,\\n  \\\"lexer_ops\\\": 0,\\n  \\\"num_lex_errors\\\": 0,\\n  \\\"num_lexemes\\\": 0\\n}\\nStop: NotStopped\\nError: None\\n</state>\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"gpt2 + f\\\"\\\"\\\"\\\\\\n\",\n    \"Tweak this proverb to apply to model instructions instead.\\n\",\n    \"\\n\",\n    \"Where there is no guidance, a people falls,\\n\",\n    \"but in an abundance of counselors there is safety.\\n\",\n    \"== Proverbs 11:14\\n\",\n    \"\\n\",\n    \"UPDATED\\n\",\n    \"Where there is no guidance{gen('rewrite', stop=\\\"==\\\")}\\n\",\n    \"== GPT {gen('chapter', regex=\\\"[0-9]+\\\")}:{gen('verse', regex=\\\"[0-9]+\\\")}\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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.12.9\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/tutorials/token_healing.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Token healing\\n\",\n    \"\\n\",\n    \"Guidance uses what we call \\\"token healing\\\" to fix tokenization artifacts that normally arise at the boundary between the end of a prompt and the beginning of a set of generated tokens. Note that token healing requires direct endpoint integration to run effciently, so it currently supported only for the `guidance.models.LlamaCpp` and `guidance.models.Transformers` LLM backends.\\n\",\n    \"\\n\",\n    \"## Why token healing is needed\\n\",\n    \"Language models process tokens, which are chunks of text that often are similar to a word. This impacts how language models see text, and also how we can prompt them, since every prompt has to be a set of tokens. Encodings like [BPE](https://en.wikipedia.org/wiki/Byte_pair_encoding) that are used by GPT-style models map all input bytes to token ids in an optimized manner. This works well during training, but can lead to some subtle issues during prompting and inference because the token boundaries often don't line up with the end of the prompt if we consider the generated tokens that will also come next. Of course the end of a prompt will always align with a token boundary because the prompt is tokenized before being extended by the model, but if the first characters of the completion are part of a longer token that would span the prompt boundary, that longer token cannot be used (even though that is what the model would expect based on training data). \\n\",\n    \"\\n\",\n    \"To see why token healing is important consider the prompt \\\"This is a \\\", which is then completed with \\\"fine day.\\\" by the model, so resulting in the final string \\\"This is a fine day.\\\". If we tokenize the prompt \\\"This is a \\\" with GPT2 BPE we get `[1212, 318, 257, 220]`, and the tokenization of the extention \\\"fine day.\\\" is `[38125, 1110, 13]`. This results in a final prompt + generation token sequence of `[1212, 318, 257, 220, 38125, 1110, 13]`. If however we were to tokenize the whole string \\\"This is a fine day.\\\" jointly we instead get `[1212, 318, 257, 3734, 1110, 13]`. Which tokenization is correct? Well, the correct tokenization is the one that best communicates intent to the model. Since the model learned intent based on a optimized tokenization of the training text, that means the joint tokenization that also uses optimized matching will better align with how the model processed the training data, and so it is also likely to better communicate intent to the model. This is the reason why ending your prompt with a space is almost always a bad idea in GPT models since most word-based tokens have the space before the word, not after it.\\n\",\n    \"\\n\",\n    \"Note that another way to see that the \\\"standard\\\" prompt-boundary-based encoding is worse than the joint one we get with token healing is to observe that 38125 (the token id for \\\"fine\\\") is a large number, this means it is uncommon to see that token in the training data (since BPE encodings are built up greedily based on frequency). In contrast 3734 (the token id for \\\" fine\\\") is a much more common token and so more likely to clearly communicate intent to the model (since the model has seen it many times and hence had more opportunity to learn its meaning in many contexts).\\n\",\n    \"\\n\",\n    \"## How token healing works\\n\",\n    \"Guidance avoids the above tokenization artifacts automatically using a method we call \\\"token healing\\\" that backs up the generation process by one or more tokens before the end of the prompt, then constrains the first tokens generated to have a prefix that matches the last token in the prompt. This allows the generated text string to have the token encoding that the model would expect based on its training data, not an unusual alternative encoding forcing by the prompt boundary. Token healing allows you to express your prompts however you wish, without worrying about boundaries (which effect many tokens, not just space characters).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Tokenization of `This is a `: [1212, 318, 257, 220]\\n\",\n      \"Tokenization of `fine day.`: [38125, 1110, 13]\\n\",\n      \"Tokenization of `This is a fine day.`: [1212, 318, 257, 3734, 1110, 13]\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import transformers\\n\",\n    \"\\n\",\n    \"# compute the tokenizations of the example above\\n\",\n    \"tokenizer = transformers.AutoTokenizer.from_pretrained('gpt2')\\n\",\n    \"print(\\\"Tokenization of `This is a `:\\\", tokenizer.encode(\\\"This is a \\\"))\\n\",\n    \"print(\\\"Tokenization of `fine day.`:\\\", tokenizer.encode(\\\"fine day.\\\"))\\n\",\n    \"print(\\\"Tokenization of `This is a fine day.`:\\\", tokenizer.encode(\\\"This is a fine day.\\\"))\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Token healing in action\\n\",\n    \"\\n\",\n    \"Below is a prompt that we run both with and without token healing to see how it can impact generation quality.\\n\",\n    \"\\n\",\n    \"### With token healing\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Non-Nvidia GPU monitoring is not supported in this version. NVML Shared Library Not Found\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"709255fddeab4e82aae0a2b20f41225d\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import guidance\\n\",\n    \"from guidance import gen, models\\n\",\n    \"\\n\",\n    \"gpt2 = models.Transformers(\\\"gpt2\\\", temperature=0.8, do_sample=True)\\n\",\n    \"\\n\",\n    \"gpt2 += \\\"The url of Google is http:\\\" + gen(max_tokens=5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Without token healing\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Device set to use mps:0\\n\",\n      \"Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'The url of Google is http: //www.google.com/search?q=google+'\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"generator = transformers.pipeline('text-generation', model='gpt2')\\n\",\n    \"\\n\",\n    \"generator(\\\"The url of Google is http:\\\", max_length=20, temperature=0.0001, truncation=True)[0][\\\"generated_text\\\"]\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"While it may seem strange to us why GPT2 does not put a \\\"//\\\" after the colon character (instead writing a space), it makes sense if we think about the tokens involved. If a \\\"//\\\" was likely to come after the space, then it would have been included using the token \\\"://\\\". By sending the token id 25 (a colon) by itself to the model we are communicating that what comes next is not something that is in a token that starts with a colon (since otherwise the greedy/optimized tokenization would have used it). So GPT2 picks something that cannot be consumed into a larger token, a space character (since \\\": \\\" is not a GPT2 token).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"([25], [25, 220], [1378])\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"tokenizer.encode(\\\":\\\"), tokenizer.encode(\\\": \\\"), tokenizer.encode(\\\"://\\\")\"\n   ]\n  },\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<hr style=\\\"height: 1px; opacity: 0.5; border: none; background: #cccccc;\\\">\\n\",\n    \"<div style=\\\"text-align: center; opacity: 0.5\\\">Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!</div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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  \"widgets\": {\n   \"application/vnd.jupyter.widget-state+json\": {\n    \"state\": {\n     \"2bad6ae933f449cdb4edd04d83745938\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"709255fddeab4e82aae0a2b20f41225d\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"ClientReadyMessage\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":17,\\\"last_trace_id\\\":11,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_2bad6ae933f449cdb4edd04d83745938\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push((()=>{V.delete(e),s&&(i&&e.d(1),s())})),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F((()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]})),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach((s=>-1===e.indexOf(s)?t.push(s):i.push(s))),i.forEach((e=>e())),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},((e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i})):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((s=s.apply(e,t||[])).next())}))};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,(function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}}))}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D((()=>{_(),S();const e=new ResizeObserver((()=>{v=!1,_()}));return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}}));return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{r=e,i(9,r)}))},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{n=e,i(1,n),i(3,p),i(2,h)}))}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce((function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e}),\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach((function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}}),e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],(function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}}));var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,(function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}}),/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function n(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var r,a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(r=i());)if(\\\"<\\\"!==r[0])l.appendChild(e.document.createTextNode((a=r,gt.innerHTML=a,a=gt.textContent,gt.textContent=\\\"\\\",a)));else{if(\\\"/\\\"===r[1]){c.length&&c[c.length-1]===r.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(r.substr(1,r.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=r.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=n(h[1],h[3])))continue;if(!s(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}})),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,(function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,(function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}}),/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)}),/=/):pt(e,(function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,(function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}}),/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),[\\\"END-ON-NEXT\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger(\\\"data\\\",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})}))}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push((n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const ii=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)})),this.parseStream.on(\\\"data\\\",(function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach((function(e){t.hasOwnProperty(e)||s.push(e)})),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,(function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)})):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach((function(e){var t;e=e.trim(),li.forEach((function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}})),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})})),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map((function(e){return di(e.trim())})),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every((function(e){return oi.mp4.test(e)}))?n=\\\"mp4\\\":i.every((function(e){return oi.webm.test(e)}))?n=\\\"webm\\\":i.every((function(e){return oi.ogg.test(e)}))&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every((function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1}))},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]}),Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,(function(e){return Ss(e)&&e!==t})))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,(function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,(function(i){var s=[];return t.length>0&&fs(i.documentElement,(function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l})),s}))},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,(function(t){var i=[];return fs(t,(function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new os(this,(function(i){var s=[];return fs(i,(function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)})),s}))}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,(function(e){kn.prototype[e]=function(){return null}})),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce(((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]})),e)),{}),Pn=e=>Object.keys(e).map((t=>e[t])),Ln=e=>e.reduce(((e,t)=>e.concat(t)),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}})),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn}));if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=Pn(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce(((e,t,s)=>(t[i]&&e.push(s),e)),[])),e}))},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e}),{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])})),e):e),{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}}))},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter((({tagName:e})=>e===t)),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce(((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map((function(e){return t.map((function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map((e=>Dn({tag:\\\"SegmentURL\\\"},_r(e)))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map((e=>_r(e))),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map((t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map((t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}}));if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach((e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t}))})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce(((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e}),{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map((e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)})))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach(((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie((function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i})),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Mr(e)})):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return qr(e)})):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter((function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e})).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach((function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}}));var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach((i=>t(e[i],i)))}function ga(e,t,i=0){return pa(e).reduce(((i,s)=>t(i,e[s],s)),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach((e=>{e&&ma(e,((e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e}))})),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find((e=>\\\"Microsoft Edge\\\"===e.brand))),Aa=Boolean($a.brands.find((e=>\\\"Chromium\\\"===e.brand))),Ia=!Ca&&Aa,ja=Da=($a.brands.find((e=>\\\"Chromium\\\"===e.brand))||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\\\\s+/))),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach((t=>e.classList.toggle(t,i))),e}function no(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)}))}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0))).filter((e=>e))}function vo(e,t){return yo(t).forEach((t=>e.appendChild(t))),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach((function(i){e(t,i,s)}))}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every((t=>\\\"function\\\"==typeof e[t])),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on(\\\"dispose\\\",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Lo.has(e)&&Lo.delete(e)})),Le.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach((e=>this.addClass(e))),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return\\\"string\\\"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger(\\\"ready\\\")}),1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",(function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)})),this.on(\\\"touchmove\\\",(function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}}));const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",(function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",(()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,(e=>{}))}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jl))},Pl=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,(e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\")))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>da.error(e))),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,(function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],(e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Zl(s,t)})))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one(\\\"dispose\\\",(()=>{this.stopTracking()})),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",(()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})}))}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach((function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`}));const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",(function(){this.hasStarted_=!0})),this.on(\\\"loadstart\\\",(function(){this.hasStarted_=!1})),oc.names.forEach((t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach((e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)}))}))}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",(()=>{e.onload=null,e.onerror=null})),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",(function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}}))}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach((function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach((function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout((()=>vc(t,cc[t.type],i,e)),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)}))}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)})),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on(\\\"modalclose\\\",(()=>{this.refocusComponent()})),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach(((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter((s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e))),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",(e=>this.toggleDisplay(e))),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Xo(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e)))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",(e=>this.handlePlay(e))),this.on(e,\\\"pause\\\",(e=>this.handlePause(e))),t.replay&&this.on(e,\\\"ended\\\",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",(e=>this.handleSeeked(e)))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",(e=>this.updateContent(e)))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",(()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"}))),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",(e=>this.update(e)))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()}))}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+\\\"px\\\"}))}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],(e=>this.handlePictureInPictureChange(e))),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",(e=>this.handleFullscreenChange(e))),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"}))}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",(e=>this.updateLastVolume_(e))),this.on(e,\\\"volumechange\\\",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",(e=>this.handleMouseDown(e))),this.on(\\\"touchstart\\\",(e=>this.handleMouseDown(e))),this.on(\\\"mousemove\\\",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],(()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")})),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],(()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")}))}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",(function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")}))}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`),\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,\\\"keyup\\\",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,\\\"keyup\\\",(e=>this.handleVolumeControlKeyUp(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyPress(e))),this.on(\\\"mouseover\\\",(e=>this.handleMouseOver(e))),this.on(\\\"mouseout\\\",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,\\\"mouseenter\\\",(()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)})),this.on(\\\"mouseleave\\\",(e=>this.handleMouseLeave(e))),this.on(\\\"keydown\\\",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",(function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)}))}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",(function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)})),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],(function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(function(){s.removeEventListener(\\\"change\\\",n)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",(()=>{s.removeEventListener(\\\"change\\\",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",(e=>this.updateVisibility(e))),this.on(e,\\\"ratechange\\\",(e=>this.updateLabel(e))),this.on(e,\\\"playbackrateschange\\\",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i})))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],(()=>{this.setDefaults(),this.updateDisplay()})),ma(Hd,(e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ma(Hd,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){ma(Hd,(e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",(e=>this.handleDurationchange(e))),this.on(this.player_,\\\"canplay\\\",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],(e=>{this.removeClass(\\\"force-display\\\")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass(\\\"force-display\\\")}),this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",(()=>e.removeEventListener(\\\"change\\\",i)));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)})),this.on(\\\"webkitendfullscreen\\\",(()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach((e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",(s=>i.removeEventListener(e,t)))})),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",(e=>this.off(\\\"loadstart\\\",r)))}proxyNativeTracks_(){rc.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready((function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")}))}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",(()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)}))}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",(function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e})),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout((()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)})),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach((function([e,t]){_a(eu.prototype,e,(()=>eu[t]()),!0)})),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]}})),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach((function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}})),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach((function(e){eu.prototype[e]=function(){return this.el_[e]()}})),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach((e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`}));const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",(e=>this.listenForUserActivity_(e))),this.on(\\\"keydown\\\",(e=>this.handleKeyDown(e))),this.on(\\\"languagechange\\\",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach((e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter((e=>Va[e])).map((e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\")));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach((e=>{const t=oc[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${pl(e)}_`](t)))})),Object.keys(iu).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)}))})),this.on(this.tech_,\\\"loadstart\\\",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,\\\"sourceset\\\",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,\\\"waiting\\\",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,\\\"ended\\\",(e=>this.handleTechEnded_(e))),this.on(this.tech_,\\\"seeking\\\",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,\\\"play\\\",(e=>this.handleTechPlay_(e))),this.on(this.tech_,\\\"pause\\\",(e=>this.handleTechPause_(e))),this.on(this.tech_,\\\"durationchange\\\",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,\\\"fullscreenchange\\\",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,\\\"fullscreenerror\\\",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,\\\"enterpictureinpicture\\\",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,\\\"leavepictureinpicture\\\",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,\\\"error\\\",(e=>this.handleTechError_(e))),this.on(this.tech_,\\\"posterchange\\\",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,\\\"textdata\\\",(e=>this.handleTechTextData_(e))),this.on(this.tech_,\\\"ratechange\\\",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach((e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)}))};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then((()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})})).catch((()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})})):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter((e=>e.src&&e.src===t)),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],(e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",(()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",(t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")})),t)))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map((e=>[e,lc.getTech(e)])).filter((([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],((e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach((t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",(function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)}))}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on(\\\"mousemove\\\",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on(\\\"mouseleave\\\",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>\\\"number\\\"==typeof e))&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach((function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach((function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}})),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach((e=>{const i=hu(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach((e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")}));const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach((e=>e(s))),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map((t=>{const i=(...s)=>(na(e,i),t(...s));return i})))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map((e=>au.players[e])).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach((e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}})),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,(function(e,i){return e-ju<=t&&i+ju>=t}))},Lu=function(e,t){return Du(e,(function(e){return e-Iu>=t}))},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)})),i},Bu=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+(\\\"PART\\\"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i)).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every((e=>hi(e))))continue;if(!Zu(e,(e=>Ju(i,e))))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,((t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,(t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))}))})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}))},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach((e=>{vh(e,r.resolvedUri)}));for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,((e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})})),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}}))}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)}))}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=bh(e),e.segments.forEach((t=>{vh(t,e.resolvedUri)}))})),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach(((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)}))}}}))}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((s=>{t[s]&&(i[s]=e)})),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),xh(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",(()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one(\\\"seeked\\\",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e})),t.length<=1)return Ti(t[0]);var s=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),n=new Uint8Array(s),r=0;return t.forEach((function(e){e=Ti(e),n.set(e,r),r+=e.byteLength})),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,(()=>o(e,t,\\\"\\\",r)));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,(()=>o(e,t,\\\"\\\",r))):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",(function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)}))}},d=t(c,(function(e,t){return xh(d,e,t,l)}));return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{rh(e,((i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",(()=>{this.refreshXml_()})),this.on(\\\"mediaupdatetimeout\\\",(()=>{this.refreshMedia_(this.media().id)})),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>i(!1)),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)}),\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Le.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},((i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_((()=>e(s,n)))):e(s,n)}))}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},((i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach((e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout((()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()}),Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh((function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",(function(t){e.push(t)})),this.on(\\\"done\\\",(function(t){e.flush(t)})),this.on(\\\"partialdone\\\",(function(t){e.partialFlush(t)})),this.on(\\\"endedtimeline\\\",(function(t){e.endTimeline(t)})),this.on(\\\"reset\\\",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))}),this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map((e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2))).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+\\\"<\\\"+t+\\\">\\\"}),\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+\\\"</\\\"+t+\\\">\\\"}),\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)})),o.on(\\\"done\\\",(function(){e.trigger(\\\"done\\\")})),o.on(\\\"partialdone\\\",(function(){e.trigger(\\\"partialdone\\\")})),o.on(\\\"reset\\\",(function(){e.trigger(\\\"reset\\\")})),o.on(\\\"endedtimeline\\\",(function(){e.trigger(\\\"endedtimeline\\\")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){var r=unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(s,0,n));if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===r){var a=s.subarray(n+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},Tt=_t;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var St,wt,kt,xt,Et=$,Ct=ee,At=ie,It=de,jt=he,Dt=nt,Pt=oe,Lt=lt,Ot=gt.H264Stream,Nt=mt,Mt=_t.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Ut=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Bt=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],Ft=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},qt=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",Ft.bind(e,n))}},$t=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},zt=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};wt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),this.push=function(t){jt.collectDtsInfo(e,t),e&&Ut.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=It.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=It.prefixWithSilence(e,o,r,a),e.samples=It.generateSampleTable(o),c=Ct.mdat(It.concatenateFrameData(o)),s=[],l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),jt.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",zt(Pt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){jt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},wt.prototype=new Et,St=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){jt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Bt.forEach((function(t){e[t]=s[t]}),this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=At.groupNalsIntoFrames(r),(o=At.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=At.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");jt.clearDtsInfo(e),o=m}jt.collectDtsInfo(e,o),e.samples=At.generateSampleTable(o),c=Ct.mdat(At.concatenateNalData(o)),e.baseMediaDecodeTime=jt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",zt(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=Ct.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){jt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&$t(e.pps[0],r.pps[0])&&e.sps&&$t(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},St.prototype=new Et,xt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},xt.prototype=new Et,xt.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Bt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=Ct.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Pt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Pt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Pt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},xt.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,i,s=this,n=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Dt.MetadataStream,n.aacStream=new Nt,n.audioTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Lt,n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on(\\\"data\\\",(function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Dt.MetadataStream,n.packetStream=new Dt.TransportPacketStream,n.parseStream=new Dt.TransportParseStream,n.elementaryStream=new Dt.ElementaryStream,n.timestampRolloverStream=new Dt.TimestampRolloverStream,n.adtsStream=new Lt,n.h264Stream=new Ot,n.captionStream=new Dt.CaptionStream(e),n.coalesceStream=new xt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",(function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new St(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new wt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)})),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),qt(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,jt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,jt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Mt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Ht,Vt,Wt,Gt,Xt,Yt,Kt,Qt={Transmuxer:kt},Jt=function(e){return e>>>0},Zt=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ei=Jt,ti=Zt,ii=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ei(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ti(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ii(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ii,ni=Jt,ri=H.getUint64,ai=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ri(e.subarray(4)):t.baseMediaDecodeTime=ni(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},oi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},li=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ci=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:li(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=li(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},di={tfdt:ai,trun:ci},ui={parseTfdt:di.tfdt,parseTrun:di.trun},hi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},pi=H.getUint64,mi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&gi(t.presentation_time_delta)&&i,n=1===e&&gi(t.presentation_time)&&i;return!(e>1)&&s||n},gi=function(e){return void 0!==e||null!==e},fi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=pi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=hi(e.subarray(l))).length,l+=(i=hi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return mi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},yi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},vi=Jt,bi=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},_i=si,Ti=Zt,Si=fi,wi=oi,ki=ci,xi=ai,Ei=H.getUint64,Ci=yi,Ai=ze.parseId3Frames;Ht=function(e){return _i(e,[\\\"moov\\\",\\\"trak\\\"]).reduce((function(e,t){var i,s,n,r,a;return(i=_i(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=vi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=_i(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=vi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),{})},Vt=function(e,t){var i=_i(t,[\\\"moof\\\",\\\"traf\\\"]).reduce((function(t,i){var s,n=_i(i,[\\\"tfhd\\\"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ei(o.subarray(4,12)):l.getUint32(4))?c=s/Ci.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t}),1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Wt=function(e,t){var i,s=_i(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=_i(s[0],[\\\"tfhd\\\"])[0],o=_i(s[0],[\\\"trun\\\"])[0],l=_i(s[0],[\\\"tfdt\\\"])[0];if(a)i=wi(a).trackId;if(l)n=xi(l).baseMediaDecodeTime;if(o){var c=ki(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ci.BigInt(r),d=Ci.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Gt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=_i(e,[\\\"tkhd\\\"]);t.forEach((function(e,t){var n,r,a=Ti(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))}))})),i},Yt=function(e){var t=0===e[0]?12:20;return vi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Xt=function(e){var t=_i(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach((function(e){var t,s,n={},r=_i(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=_i(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Ti(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=_i(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Ti(c.subarray(4,8));var d,u=_i(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Ti(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+bi(d[19]),n.codec+=\\\".\\\"+bi(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=_i(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Yt(h)),i.push(n)})),i},Kt=function(e,t=0){return _i(e,[\\\"emsg\\\"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ai(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))};var Ii={findBox:_i,parseType:Ti,timescale:Ht,startTime:Vt,compositionStartTime:Wt,videoTrackIds:Gt,tracks:Xt,getTimescaleFromMediaHeader:Yt,getEmsgID3:Kt};const{parseTrun:ji}=ui,{findBox:Di}=Ii;var Pi=yi,Li={getMdatTrafPairs:function(e){var t=Di(e,[\\\"moof\\\",\\\"traf\\\"]),i=Di(e,[\\\"mdat\\\"]),s=[];return i.forEach((function(e,i){var n=t[i];s.push({mdat:e,traf:n})})),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ji(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Pi.BigInt(e.compositionTimeOffset),s+=Pi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}},Oi=pe.discardEmulationPreventionBytes,Ni=Ce.CaptionStream,Mi=si,Ri=ai,Ui=oi,{getMdatTrafPairs:Bi,parseSamples:Fi}=Li,qi=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},$i=function(e,t){var i={};return Bi(e).forEach((function(e){var s,n=e.mdat,r=e.traf,a=Mi(r,[\\\"tfhd\\\"]),o=Ui(a[0]),l=o.trackId,c=Mi(r,[\\\"tfdt\\\"]),d=c.length>0?Ri(c[0]).baseMediaDecodeTime:0,u=Mi(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=qi(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Oi(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,Fi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))})),i},zi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ni,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on(\\\"log\\\",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=$i(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Hi}=ui,Vi=si,{getTimescaleFromMediaHeader:Wi}=Ii,{parseSamples:Gi,getMdatTrafPairs:Xi}=Li;var Yi=function(){let e=9e4;this.init=function(t){const i=Vi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Wi(i))},this.parseSegment=function(t){const i=[],s=Xi(t);let n=0;return s.forEach((function(t){const s=t.mdat,r=t.traf,a=Vi(r,[\\\"tfdt\\\"])[0],o=Vi(r,[\\\"tfhd\\\"])[0],l=Vi(r,[\\\"trun\\\"]);if(a){const e=Hi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Gi(l,n,o);let r=0;t.forEach((function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Vi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Vi(a,[\\\"vttc\\\"]).forEach((function(s){const r=Vi(s,[\\\"payl\\\"])[0],a=Vi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})})),r+=t.size}))}})),i}},Ki=Ae,Qi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ji=function(e){return!!(64&e[1])},Zi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},es=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},ts={parseType:function(e,t){var i=Qi(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Ji(e),i=4+Zi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ji(e),s=4+Zi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ji,parsePesType:function(e,t){switch(t[Qi(e)]){case Ki.H264_STREAM_TYPE:return\\\"video\\\";case Ki.ADTS_STREAM_TYPE:return\\\"audio\\\";case Ki.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Ji(e))return null;var t=4+Zi(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Zi(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===es(31&i[n+3])&&(r=!0),r}},is=Ae,ss=Oe.handleRollover,ns={};ns.ts=ts,ns.aac=_t;var rs=oe.ONE_SECOND_IN_TS,as=188,os=71,ls=function(e,t,i){for(var s,n,r,a,o=0,l=as,c=!1;l<=e.byteLength;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=as,l+=as}for(o=(l=e.byteLength)-as,c=!1;o>=0;)if(e[o]!==os||e[l]!==os&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=as,l-=as}},cs=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=as,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==os||e[u]!==os)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))if(n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(ns.ts.videoPacketContainsKeyFrame(o)){var m=ns.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=as,u+=as}for(d=(u=e.byteLength)-as,h=!1;d>=0;)if(e[d]!==os||e[u]!==os)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===ns.ts.parseType(s,t.pid))n=ns.ts.parsePesType(s,t.table),r=ns.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=ns.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=as,u-=as}},ds=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=as;n<e.byteLength;)if(e[s]!==os||e[n]!==os)s++,n++;else{switch(i=e.subarray(s,n),ns.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=ns.ts.parsePat(i);break;case\\\"pmt\\\":var r=ns.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}s+=as,n+=as}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case is.H264_STREAM_TYPE:i.video=[],cs(e,t,i),0===i.video.length&&delete i.video;break;case is.ADTS_STREAM_TYPE:i.audio=[],ls(e,t,i),0===i.audio.length&&delete i.audio}}return i},us=function(e,t){var i;return i=ns.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(ns.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=ns.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=ns.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=ns.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=ns.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=rs/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):ds(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ss(e.dts,i),e.pts=ss(e.pts,i),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs}))}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=ss(e.dts,s),e.pts=ss(e.pts,s),e.dtsTime=e.dts/rs,e.ptsTime=e.pts/rs})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ss(n.dts,s),n.pts=ss(n.pts,s),n.dtsTime=n.dts/rs,n.ptsTime=n.pts/rs}}}(i,t),i):null};class hs{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Qt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on(\\\"done\\\",(function(t){e.postMessage({action:\\\"done\\\"})})),t.on(\\\"gopInfo\\\",(function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})})),t.on(\\\"videoSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})})),t.on(\\\"audioSegmentTimingInfo\\\",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})})),t.on(\\\"id3Frame\\\",(function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})})),t.on(\\\"caption\\\",(function(t){e.postMessage({action:\\\"caption\\\",caption:t})})),t.on(\\\"trackinfo\\\",(function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})})),t.on(\\\"audioTimingInfo\\\",(function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"videoTimingInfo\\\",(function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on(\\\"log\\\",(function(t){e.postMessage({action:\\\"log\\\",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Ii.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Ii.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Ii.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=us(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new hs(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new hs(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach((e=>{e.abort()}))},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))})),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach((function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},(t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,(t=>{if(t)return hp(e),u(t,y);m()}))}));m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach((e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))})),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Ep(d,((e,t)=>e.bandwidth-t.bandwidth)),d=d.filter((e=>!th.isIncompatible(e.playlist)));let u=d.filter((e=>th.isEnabled(e.playlist)));u.length||(u=d.filter((e=>!th.isDisabled(e.playlist))));const h=u.filter((e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i));let p=h[h.length-1];const m=h.filter((e=>e.bandwidth===p.bandwidth))[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter((e=>e.width&&e.height));Ep(g,((e,t)=>e.width-t.width));const f=g.filter((e=>e.width===s&&e.height===n));p=f[f.length-1];const y=f.filter((e=>e.bandwidth===p.bandwidth))[0];let v,b,_,T;if(y||(v=g.filter((e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),p=b[b.length-1],_=b.filter((e=>e.bandwidth===p.bandwidth))[0]),o.leastPixelDiffSelector){const e=g.map((e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e)));Ep(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),this.sourceUpdater_.on(\\\"codecschange\\\",(e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))})),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",(e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter((e=>!th.isIncompatible(e)));let d=c.filter(th.isEnabled);d.length||(d=c.filter((e=>!th.isDisabled(e))));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ep(h,((e,t)=>Cp(t.playlist,e.playlist))),h.length?h[0]:(Ep(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout((()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push((()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>Qp(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map((e=>e.charCodeAt(0))));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:\\\"Error loading vtt.js\\\"})));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach((e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)})),e.cues.push(r)}))}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map(((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c}));s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l})),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find((({name:e})=>\\\"VOD\\\"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",(function(t){e.push(t)}))},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push((function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,(function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])}))}})));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()})),t.on(\\\"loadedplaylist\\\",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{Dm[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanged()))})),i.on(\\\"mediachanging\\\",(()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",(()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)})),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,s)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}})),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()}))}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",(()=>this.startABRTimer_())),this.tech_.on(\\\"pause\\\",(()=>this.stopABRTimer_())),this.tech_.on(\\\"play\\\",(()=>this.startABRTimer_()))),Um.forEach((e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)})),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,(()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",(()=>{this.trigger(\\\"selectedinitialmedia\\\")}))})),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on(\\\"error\\\",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on(\\\"mediachange\\\",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})})),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",(()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))})),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})})),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})}));[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",(()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")})),this.mainSegmentLoader_.on(\\\"timeout\\\",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",(()=>{this.trigger(\\\"progress\\\")})),this.mainSegmentLoader_.on(\\\"error\\\",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",(()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})})),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on(\\\"appenderror\\\",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")})),this.mainSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()})),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",(()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on(\\\"earlyabort\\\",(e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"fmp4\\\",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on(\\\"ended\\\",(()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()}));[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,(e=>{}))}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach((t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`)),\\\"\\\")+\\\".\\\";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(Vt({},e))}))})),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(i)this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s));else{e.filter((e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(n,e)})),this.contentSteeringController_.addAvailablePathway(s)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach((s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,\\\"0\\\"))).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}));const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach((t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready((()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,((e,t)=>Cp(e,t)));return e.filter((e=>!!gh(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach((e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})}));const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce(((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e}),{});return Object.keys(s).length&&e.push(s),e}),[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],(e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,\\\"seeking\\\",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,\\\"error\\\",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",(()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Xu(e))).map(((t,i)=>new qm(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",(()=>{this.setupEme_()})),this.on(this.playlistController_,\\\"progress\\\",(function(){this.tech_.trigger(\\\"progress\\\")})),this.on(this.playlistController_,\\\"firstplay\\\",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})}))}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),Km(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on(\\\"mediachange\\\",(()=>{Km(this.qualityLevels_,this.playlists)})))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(Vt({},e))}))})),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(Vt({},e))}))}))}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D((()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout((()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}}),0):console.error(\\\"Video element not found during mount\\\")})),P((()=>{n&&n.dispose()})),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{s=e,i(1,s)}))}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout((function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))}),t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,(e=>{e.call(i,t,s,Ce)}))}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],(e=>{t=Ug(t,e,\\\" \\\")})),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")}));const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],(e=>{u=Ug(u,e,\\\" \\\")})),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,(function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)}),Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,(()=>{r=null})),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,(()=>{a=null})),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,(()=>{s=null})),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,(()=>{D[e]=null}));let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,(()=>{N[e]=null}));return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,(()=>{C[a]=null})),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,(()=>{I=null})),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map((e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0}))):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame((()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)}))}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"]((()=>{v=e,i(8,v)}))}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D((()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",(()=>{i=setInterval((()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}}),20)}))})),P((()=>{clearInterval(i)})),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D((()=>{t=fe.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})),i=ye.subscribe((e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}))})),P((()=>{t&&t(),i&&i()})),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv((function(e){return null===e?NaN:+e})).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F((()=>t[9].call(i)))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",(e=>{e.source===i.contentWindow&&t()}))):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map(((e,t)=>({x:n(t),y:r(e)}))))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,(()=>{l[u]=null})),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,(()=>{I[e]=null}));return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,(e=>i(4,s=e))),l(e,ye,(e=>i(5,n=e)));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D((()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}}));return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"value\\\":\\\"The\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\"The\\\",\\\"bytes\\\":\\\"VGhl\\\",\\\"prob\\\":0.0376996248960495,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" url\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\" url\\\",\\\"bytes\\\":\\\"IHVybA==\\\",\\\"prob\\\":0.0000027294499886920676,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\" of\\\",\\\"bytes\\\":\\\"IG9m\\\",\\\"prob\\\":0.14253970980644226,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" Google\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\" Google\\\",\\\"bytes\\\":\\\"IEdvb2dsZQ==\\\",\\\"prob\\\":0.0017601191066205502,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\" is\\\",\\\"bytes\\\":\\\"IGlz\\\",\\\"prob\\\":0.012635422870516777,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\" http\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6942351659138998,\\\"token\\\":{\\\"token\\\":\\\" http\\\",\\\"bytes\\\":\\\"IGh0dHA=\\\",\\\"prob\\\":0.1784876435995102,\\\"masked\\\":false},\\\"top_k\\\":null,\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"://\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":48.39777946472168,\\\"token\\\":{\\\"token\\\":\\\"://\\\",\\\"bytes\\\":\\\"Oi8v\\\",\\\"prob\\\":0.9978060126304626,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"://\\\",\\\"bytes\\\":\\\"Oi8v\\\",\\\"prob\\\":0.9978060126304626,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\",\\\"bytes\\\":\\\"Og==\\\",\\\"prob\\\":0.0002530237252358347,\\\"masked\\\":false},{\\\"token\\\":\\\":/\\\",\\\"bytes\\\":\\\"Oi8=\\\",\\\"prob\\\":0.00019553051970433444,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\\\\\\\\",\\\"bytes\\\":\\\"Olw=\\\",\\\"prob\\\":0.000015667799743823707,\\\"masked\\\":false},{\\\"token\\\":\\\":\\\\\\\"\\\",\\\"bytes\\\":\\\"OiI=\\\",\\\"prob\\\":0.0000012365954944471014,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"www\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.429828643798828,\\\"token\\\":{\\\"token\\\":\\\"www\\\",\\\"bytes\\\":\\\"d3d3\\\",\\\"prob\\\":0.5417596101760864,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"www\\\",\\\"bytes\\\":\\\"d3d3\\\",\\\"prob\\\":0.5417596101760864,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.824991226196289,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9974707365036011,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9974707365036011,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\"google\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.681940078735352,\\\"token\\\":{\\\"token\\\":\\\"google\\\",\\\"bytes\\\":\\\"Z29vZ2xl\\\",\\\"prob\\\":0.7219675779342651,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\"google\\\",\\\"bytes\\\":\\\"Z29vZ2xl\\\",\\\"prob\\\":0.7219675779342651,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.374856948852539,\\\"token\\\":{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9520958662033081,\\\"masked\\\":false},\\\"top_k\\\":[{\\\"token\\\":\\\".\\\",\\\"bytes\\\":\\\"Lg==\\\",\\\"prob\\\":0.9520958662033081,\\\"masked\\\":false}],\\\"class_name\\\":\\\"TokenOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":5,\\\"token reduction\\\":0,\\\"avg latency\\\":20.552778244018555,\\\"cpu\\\":[0,0,0,0,0],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":0,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":17,\\\"backtrackCount\\\":0,\\\"resetCount\\\":1}\"\n      }\n     }\n    },\n    \"version_major\": 2,\n    \"version_minor\": 0\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "notebooks/tutorials/tool_calling.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"213de727\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Defining Tools\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"c3f35cc5\",\n   \"metadata\": {},\n   \"source\": [\n    \"A `Tool` consists of:\\n\",\n    \"1. A name that is used to uniquely identify the tool so the LM can specify which tool it intends to call\\n\",\n    \"2. A description that is used to help indicate to the LM when it is appropriate to call the tool\\n\",\n    \"3. A callable that is executed when the tool is actually called\\n\",\n    \"4. A constraint that ensures that the LM's *output* is a valid *input* to the callable\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a124195a\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Functions\\n\",\n    \"The most common type of tool is defined by a function.\\n\",\n    \"\\n\",\n    \"The constraint on the LM's output can be specified by a JSON schema, where the JSON schema should have type `object` and have `properties` matching the names of the function's arguments.\\n\",\n    \"\\n\",\n    \"Note: positional-only and variadic arguments are not yet supported.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"b9cc9c1a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import random\\n\",\n    \"from typing import Literal\\n\",\n    \"\\n\",\n    \"def get_weather_func(city: str, unit: Literal[\\\"celsius\\\", \\\"fahrenheit\\\"] = \\\"celsius\\\") -> str:\\n\",\n    \"    \\\"\\\"\\\"\\n\",\n    \"    Get the current weather for a given city.\\n\",\n    \"    \\\"\\\"\\\"\\n\",\n    \"    temp = random.randint(-10, 35)\\n\",\n    \"    if temp <= 0:\\n\",\n    \"        weather = \\\"snowy\\\"\\n\",\n    \"    elif temp <= 20:\\n\",\n    \"        weather = \\\"cloudy\\\"\\n\",\n    \"    else:\\n\",\n    \"        weather = \\\"sunny\\\"\\n\",\n    \"    if unit == \\\"fahrenheit\\\":\\n\",\n    \"        temp = temp * 9/5 + 32\\n\",\n    \"    return f\\\"The current temperature in {city} is {temp} degrees {unit} and it is {weather}.\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8d0669f5\",\n   \"metadata\": {},\n   \"source\": [\n    \"`Tool.from_callable` takes a function and creates a `Tool` object.\\n\",\n    \"\\n\",\n    \"- The name of the tool will be inferred from the function's name\\n\",\n    \"- The description of the tool will be inferred from the function's docstring\\n\",\n    \"- The JSON schema of the parameters will be inferred from any type annotations\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"6219b79a\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{'name': 'get_weather_func',\\n\",\n       \" 'description': 'Get the current weather for a given city.',\\n\",\n       \" 'tool': {'type': 'function',\\n\",\n       \"  'parameters': {'additionalProperties': False,\\n\",\n       \"   'properties': {'city': {'title': 'City', 'type': 'string'},\\n\",\n       \"    'unit': {'enum': ['celsius', 'fahrenheit'],\\n\",\n       \"     'title': 'Unit',\\n\",\n       \"     'type': 'string'}},\\n\",\n       \"   'required': ['city', 'unit'],\\n\",\n       \"   'title': 'get_weather_func',\\n\",\n       \"   'type': 'object'}},\\n\",\n       \" 'callable': <function __main__.get_weather_func(city: str, unit: Literal['celsius', 'fahrenheit'] = 'celsius') -> str>,\\n\",\n       \" 'exc_formatter': None}\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from guidance import Tool\\n\",\n    \"\\n\",\n    \"Tool.from_callable(\\n\",\n    \"    callable=get_weather_func\\n\",\n    \").model_dump()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"e3d8d745\",\n   \"metadata\": {},\n   \"source\": [\n    \"The name, description, and parameters (may be a JSON schema or a pydantic.BaseModel class) can optionally be specified directly: \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"b044ab9f\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{'name': 'get_weather',\\n\",\n       \" 'description': 'Get the current weather for a given city.',\\n\",\n       \" 'tool': {'type': 'function',\\n\",\n       \"  'parameters': {'additionalProperties': False,\\n\",\n       \"   'properties': {'city': {'description': 'The name of the city to get the weather for.',\\n\",\n       \"     'title': 'City',\\n\",\n       \"     'type': 'string'},\\n\",\n       \"    'unit': {'description': 'The unit of temperature to return.',\\n\",\n       \"     'enum': ['celsius', 'fahrenheit'],\\n\",\n       \"     'title': 'Unit',\\n\",\n       \"     'type': 'string'}},\\n\",\n       \"   'required': ['city', 'unit'],\\n\",\n       \"   'title': 'GetWeatherArgs',\\n\",\n       \"   'type': 'object'}},\\n\",\n       \" 'callable': <function __main__.get_weather_func(city: str, unit: Literal['celsius', 'fahrenheit'] = 'celsius') -> str>,\\n\",\n       \" 'exc_formatter': None}\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from pydantic import BaseModel, Field, ConfigDict\\n\",\n    \"\\n\",\n    \"class GetWeatherArgs(BaseModel):\\n\",\n    \"    city: str = Field(description=\\\"The name of the city to get the weather for.\\\")\\n\",\n    \"    unit: Literal[\\\"celsius\\\", \\\"fahrenheit\\\"] = Field(description=\\\"The unit of temperature to return.\\\")\\n\",\n    \"\\n\",\n    \"    model_config = ConfigDict(\\n\",\n    \"        extra=\\\"forbid\\\", # Disallow extra fields -- required for OpenAI\\n\",\n    \"    )\\n\",\n    \"\\n\",\n    \"get_weather_tool = Tool.from_callable(\\n\",\n    \"    callable=get_weather_func,\\n\",\n    \"    name=\\\"get_weather\\\",\\n\",\n    \"    description=\\\"Get the current weather for a given city.\\\",\\n\",\n    \"    parameters=GetWeatherArgs,\\n\",\n    \")\\n\",\n    \"get_weather_tool.model_dump()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f96d4e0b\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Custom Tools\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f1b96a80\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Regex tools\\n\",\n    \"We can use a regex to define the type of structured input that our tool expects. In this example, our tool is a `whois` lookup that expects a well-formatted url.\\n\",\n    \"\\n\",\n    \"Note that unlike `Tool.from_callable`, the callable passed to `Tool.from_regex` must take exactly one argument, which will be passed as a *string matching the given regex*.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"3efdd015\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{'name': 'whois_lookup',\\n\",\n       \" 'description': 'A tool that performs a WHOIS lookup on a domain.',\\n\",\n       \" 'tool': {'type': 'custom',\\n\",\n       \"  'format': {'type': 'grammar',\\n\",\n       \"   'syntax': 'regex',\\n\",\n       \"   'definition': 'https?:\\\\\\\\/\\\\\\\\/[^\\\\\\\\s]+'}},\\n\",\n       \" 'callable': <function __main__.whois_lookup(url: str) -> str>,\\n\",\n       \" 'exc_formatter': None}\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"import subprocess\\n\",\n    \"from urllib.parse import urlparse\\n\",\n    \"\\n\",\n    \"def whois_lookup(url: str) -> str:\\n\",\n    \"    domain = urlparse(url).netloc\\n\",\n    \"    result = subprocess.run([\\\"whois\\\", domain], capture_output=True, text=True, timeout=30)\\n\",\n    \"    return result.stdout\\n\",\n    \"\\n\",\n    \"whois_tool = Tool.from_regex(\\n\",\n    \"    pattern=r\\\"https?:\\\\/\\\\/[^\\\\s]+\\\",\\n\",\n    \"    callable=whois_lookup,\\n\",\n    \"    name=\\\"whois_lookup\\\",\\n\",\n    \"    description=\\\"A tool that performs a WHOIS lookup on a domain.\\\",\\n\",\n    \")\\n\",\n    \"whois_tool.model_dump()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"b3619d85\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Guidance grammar tools\\n\",\n    \"In addition to regex tools, we can define guidance grammars that constrain the model's output to match our tool's expected input format.\\n\",\n    \"\\n\",\n    \"Below, we define a grammar that describes simple arithmetic expressions, and our tool will evaluate these expressions as python numbers.\\n\",\n    \"\\n\",\n    \"Again, note that the callable passed to `Tool.from_grammar` must take exactly one argument, which will be passed as a *string matching the given grammar*.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"id\": \"9b7a11f2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from guidance import guidance, select, regex\\n\",\n    \"\\n\",\n    \"@guidance(stateless=True)\\n\",\n    \"def expression(lm):\\n\",\n    \"    return lm + select([\\n\",\n    \"        term(),\\n\",\n    \"        expression() + \\\"+\\\" + term(),\\n\",\n    \"        expression() + \\\"-\\\" + term(),\\n\",\n    \"    ])\\n\",\n    \"\\n\",\n    \"@guidance(stateless=True)\\n\",\n    \"def term(lm):\\n\",\n    \"    return lm + select([\\n\",\n    \"        factor(),\\n\",\n    \"        term() + \\\"*\\\" + factor(),\\n\",\n    \"        term() + \\\"/\\\" + factor(),\\n\",\n    \"    ])\\n\",\n    \"\\n\",\n    \"@guidance(stateless=True)\\n\",\n    \"def factor(lm):\\n\",\n    \"    return lm + select([number(), \\\"(\\\" + expression() + \\\")\\\"])\\n\",\n    \"\\n\",\n    \"@guidance(stateless=True)\\n\",\n    \"def number(lm):\\n\",\n    \"    return lm + regex(r'\\\\d+(\\\\.\\\\d+)?')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"id\": \"01edab91\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{'name': 'calculator',\\n\",\n       \" 'description': 'A calculator that can evaluate mathematical expressions.',\\n\",\n       \" 'tool': {'type': 'custom',\\n\",\n       \"  'format': {'type': 'grammar',\\n\",\n       \"   'syntax': 'lark',\\n\",\n       \"   'definition': '%llguidance {}\\\\n\\\\nstart: expression\\\\n\\\\nexpression: term\\\\n     | expression \\\"+\\\" term\\\\n     | expression \\\"-\\\" term\\\\n\\\\nterm: factor\\\\n     | term \\\"*\\\" factor\\\\n     | term \\\"/\\\" factor\\\\n\\\\nfactor: NUMBER\\\\n     | \\\"(\\\" expression \\\")\\\"\\\\n\\\\nNUMBER: /\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?/\\\\n'}},\\n\",\n       \" 'callable': <function __main__.evaluate_expression(expr: str) -> Union[int, float]>,\\n\",\n       \" 'exc_formatter': None}\"\n      ]\n     },\n     \"execution_count\": 6,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"from sympy import sympify\\n\",\n    \"from ast import literal_eval\\n\",\n    \"from typing import Union\\n\",\n    \"\\n\",\n    \"def evaluate_expression(expr: str) -> Union[int, float]:\\n\",\n    \"    sympy_expr = sympify(expr)\\n\",\n    \"    if not sympy_expr.is_number:\\n\",\n    \"        raise ValueError(f\\\"Invalid expression: {expr}\\\")\\n\",\n    \"    return literal_eval(str(sympy_expr))\\n\",\n    \"\\n\",\n    \"calculator = Tool.from_grammar(\\n\",\n    \"    grammar=expression(),\\n\",\n    \"    callable=evaluate_expression,\\n\",\n    \"    name=\\\"calculator\\\",\\n\",\n    \"    description=\\\"A calculator that can evaluate mathematical expressions.\\\",\\n\",\n    \")\\n\",\n    \"calculator.model_dump()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f08d0caf\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Lark tools\\n\",\n    \"Under the hood, guidance grammars just compile down to a [lark-like syntax for describing context free grammars](https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md).\\n\",\n    \"\\n\",\n    \"We can create a tool using this lark syntax directly. Note that the same caveats about arguments to the callable still apply.\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"id\": \"1be0b540\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{'name': 'calculator',\\n\",\n       \" 'description': 'A calculator that can evaluate mathematical expressions.',\\n\",\n       \" 'tool': {'type': 'custom',\\n\",\n       \"  'format': {'type': 'grammar',\\n\",\n       \"   'syntax': 'lark',\\n\",\n       \"   'definition': '\\\\nstart: expression\\\\n\\\\nexpression: term\\\\n     | expression \\\"+\\\" term\\\\n     | expression \\\"-\\\" term\\\\n\\\\nterm: factor\\\\n     | term \\\"*\\\" factor\\\\n     | term \\\"/\\\" factor\\\\n\\\\nfactor: NUMBER\\\\n     | \\\"(\\\" expression \\\")\\\"\\\\n\\\\nNUMBER: /\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?/\\\\n'}},\\n\",\n       \" 'callable': <function __main__.evaluate_expression(expr: str) -> Union[int, float]>,\\n\",\n       \" 'exc_formatter': None}\"\n      ]\n     },\n     \"execution_count\": 8,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"lark = r\\\"\\\"\\\"\\n\",\n    \"start: expression\\n\",\n    \"\\n\",\n    \"expression: term\\n\",\n    \"     | expression \\\"+\\\" term\\n\",\n    \"     | expression \\\"-\\\" term\\n\",\n    \"\\n\",\n    \"term: factor\\n\",\n    \"     | term \\\"*\\\" factor\\n\",\n    \"     | term \\\"/\\\" factor\\n\",\n    \"\\n\",\n    \"factor: NUMBER\\n\",\n    \"     | \\\"(\\\" expression \\\")\\\"\\n\",\n    \"\\n\",\n    \"NUMBER: /\\\\d+(\\\\.\\\\d+)?/\\n\",\n    \"\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"calculator_tool = Tool.from_lark(\\n\",\n    \"    lark=lark,\\n\",\n    \"    callable=evaluate_expression,\\n\",\n    \"    name=\\\"calculator\\\",\\n\",\n    \"    description=\\\"A calculator that can evaluate mathematical expressions.\\\",\\n\",\n    \")\\n\",\n    \"calculator_tool.model_dump()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"0b78a7e1\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Calling Tools\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"id\": \"25e643e0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tools = [\\n\",\n    \"    get_weather_tool,\\n\",\n    \"    whois_tool,\\n\",\n    \"    calculator_tool,\\n\",\n    \"]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"03c68755\",\n   \"metadata\": {},\n   \"source\": [\n    \"Most remote models have native support for tool-calling with function (JSON-specified) tools.\\n\",\n    \"\\n\",\n    \"With OpenAI's release of GPT-5, [they additionally support tools that are specified by regex or lark-style context free grammars](https://platform.openai.com/docs/guides/function-calling#custom-tools). In these cases, model sampling is constrained using [LLGuidance](https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md)\\n\",\n    \"\\n\",\n    \"To allow our LM to use our tools, we simply pass them in a list as an argument to `gen`. If the LM wants to call one of our tools, `guidance` will handle the callback for us:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"id\": \"bbfeb08a\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"14e7f0b354024b62ab79b2c23d67465f\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from guidance.models import OpenAI\\n\",\n    \"from guidance import user, assistant, gen\\n\",\n    \"lm = OpenAI(\\\"gpt-5-mini\\\")\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"What is the weather like in San Francisco?\\\"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(tools=tools, tool_choice=\\\"required\\\")\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"75554733\",\n   \"metadata\": {},\n   \"source\": [\n    \"You may notice that the tool call is wrapped in `<tool={name}>...</tool>` tags and the result is wrapped in `<tool_result>..</tool_result>` tags. This is purely for visualization purposes, as OpenAI uses a structured representation under the hood which we (somewhat arbitrarily) represent as a string above.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"id\": \"a94270de\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"d913c0a152c34b428e87e1d54f8750cc\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = OpenAI(\\\"gpt-5-mini\\\")\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"If Johnny has 5 apples and gives 2 to Mary, how many apples does he have left?\\\"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(tools=tools, tool_choice=\\\"required\\\")\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"id\": \"387d3cac\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"458442c70d74400a8a57b78d56a680e1\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"lm = OpenAI(\\\"gpt-5-mini\\\")\\n\",\n    \"\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"Who owns the openai website?\\\"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(tools=tools, tool_choice=\\\"required\\\")\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"c4bacc4f\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Exception Handling\\n\",\n    \"If the callable triggers an exception, the full traceback of the exception will be sent to the model in lieu of the callable's return value\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"id\": \"5352d8dc\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.jupyter.widget-view+json\": {\n       \"model_id\": \"4f9bb746405f4afb9e3025a15122dddf\",\n       \"version_major\": 2,\n       \"version_minor\": 0\n      },\n      \"text/plain\": [\n       \"StitchWidget(initial_height='auto', initial_width='100%', srcdoc='<!doctype html>\\\\n<html lang=\\\"en\\\">\\\\n<head>\\\\n …\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"def divide_by_zero():\\n\",\n    \"    \\\"\\\"\\\"Divides by zero to trigger an exception (for demonstration purposes)\\\"\\\"\\\"\\n\",\n    \"    1 / 0\\n\",\n    \"\\n\",\n    \"divide_by_zero_tool = Tool.from_callable(divide_by_zero)\\n\",\n    \"\\n\",\n    \"lm = OpenAI(\\\"gpt-5-mini\\\")\\n\",\n    \"with user():\\n\",\n    \"    lm += \\\"Divide by zero!\\\"\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen(tools=[divide_by_zero_tool], tool_choice=\\\"required\\\")\\n\",\n    \"with assistant():\\n\",\n    \"    lm += gen()\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\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  \"widgets\": {\n   \"application/vnd.jupyter.widget-state+json\": {\n    \"state\": {\n     \"14e7f0b354024b62ab79b2c23d67465f\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"OutputRequestMessage\\\",\\\"identifier\\\":\\\"\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":81,\\\"last_trace_id\\\":63,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_8083e127b62b4daea61b8b69d586c1d2\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"What is the weather like in San Francisco?\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"<tool=get_weather>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"{\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"city\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"San\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Francisco\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\\\\",\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"unit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\\\\":\\\\\\\"\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"fahren\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"heit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\\\\"}\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"</tool>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n<tool_result=get_weather>\\\\\\\"The current temperature in San Francisco is 48.2 degrees fahrenheit and it is cloudy.\\\\\\\"</tool_result>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Right\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.3840198516845703,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" now\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.354953765869141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":102.29992866516113,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" San\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21314620971679688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Francisco\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":412.8139019012451,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6170272827148438,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"’s\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8068084716796875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3261566162109375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"48\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":156.43596649169922,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2751350402832031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":120.73111534118652,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"°F\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3006458282470703,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":247.5581169128418,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"about\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7829666137695312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4901161193847656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"9\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5780925750732422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"°C\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":37.05191612243652,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.431060791015625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":36.740779876708984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" cloudy\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6310939788818359,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":27.235031127929688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" It\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5509853363037109,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"’s\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.504070281982422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" fairly\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.39887428283691406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" cool\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.895221710205078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"—\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2827644348144531,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"bring\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":27.807950973510742,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.28395652770996094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" jacket\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.573232650756836,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" if\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2930164337158203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":41.249990463256836,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"’re\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2589225769042969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" heading\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.086868286132812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" out\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.202178955078125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":46.13494873046875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Would\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4520416259765625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.333963394165039,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" like\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7538795471191406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.77705955505371,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" hourly\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.026153564453125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" forecast\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":27.56786346435547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5621910095214844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":161.41700744628906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" next\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.180887222290039,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" few\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6789436340332031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" days\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5950927734375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"?\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.538846969604492,\\\"class_name\\\":\\\"TextOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":341,\\\"token reduction\\\":0,\\\"avg latency\\\":4.976645243132919,\\\"cpu\\\":[0,0,0,0,0],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":0,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":81,\\\"backtrackCount\\\":0,\\\"resetCount\\\":3}\"\n      }\n     },\n     \"458442c70d74400a8a57b78d56a680e1\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"OutputRequestMessage\\\",\\\"identifier\\\":\\\"\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":312,\\\"last_trace_id\\\":242,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_56df1ce5d773458893321c014ee82ecd\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Who owns the openai website?\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"<tool=whois_lookup>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"https\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"://\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"open\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ai\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".com\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"</tool>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n<tool_result=whois_lookup>\\\\\\\"% IANA WHOIS server\\\\\\\\n% for more information on IANA, visit http://www.iana.org\\\\\\\\n% This query returned 1 object\\\\\\\\n\\\\\\\\nrefer:        whois.verisign-grs.com\\\\\\\\n\\\\\\\\ndomain:       COM\\\\\\\\n\\\\\\\\norganisation: VeriSign Global Registry Services\\\\\\\\naddress:      12061 Bluemont Way\\\\\\\\naddress:      Reston VA 20190\\\\\\\\naddress:      United States of America (the)\\\\\\\\n\\\\\\\\ncontact:      administrative\\\\\\\\nname:         Registry Customer Service\\\\\\\\norganisation: VeriSign Global Registry Services\\\\\\\\naddress:      12061 Bluemont Way\\\\\\\\naddress:      Reston VA 20190\\\\\\\\naddress:      United States of America (the)\\\\\\\\nphone:        +1 703 925-6999\\\\\\\\nfax-no:       +1 703 948 3978\\\\\\\\ne-mail:       info@verisign-grs.com\\\\\\\\n\\\\\\\\ncontact:      technical\\\\\\\\nname:         Registry Customer Service\\\\\\\\norganisation: VeriSign Global Registry Services\\\\\\\\naddress:      12061 Bluemont Way\\\\\\\\naddress:      Reston VA 20190\\\\\\\\naddress:      United States of America (the)\\\\\\\\nphone:        +1 703 925-6999\\\\\\\\nfax-no:       +1 703 948 3978\\\\\\\\ne-mail:       info@verisign-grs.com\\\\\\\\n\\\\\\\\nnserver:      A.GTLD-SERVERS.NET 192.5.6.30 2001:503:a83e:0:0:0:2:30\\\\\\\\nnserver:      B.GTLD-SERVERS.NET 192.33.14.30 2001:503:231d:0:0:0:2:30\\\\\\\\nnserver:      C.GTLD-SERVERS.NET 192.26.92.30 2001:503:83eb:0:0:0:0:30\\\\\\\\nnserver:      D.GTLD-SERVERS.NET 192.31.80.30 2001:500:856e:0:0:0:0:30\\\\\\\\nnserver:      E.GTLD-SERVERS.NET 192.12.94.30 2001:502:1ca1:0:0:0:0:30\\\\\\\\nnserver:      F.GTLD-SERVERS.NET 192.35.51.30 2001:503:d414:0:0:0:0:30\\\\\\\\nnserver:      G.GTLD-SERVERS.NET 192.42.93.30 2001:503:eea3:0:0:0:0:30\\\\\\\\nnserver:      H.GTLD-SERVERS.NET 192.54.112.30 2001:502:8cc:0:0:0:0:30\\\\\\\\nnserver:      I.GTLD-SERVERS.NET 192.43.172.30 2001:503:39c1:0:0:0:0:30\\\\\\\\nnserver:      J.GTLD-SERVERS.NET 192.48.79.30 2001:502:7094:0:0:0:0:30\\\\\\\\nnserver:      K.GTLD-SERVERS.NET 192.52.178.30 2001:503:d2d:0:0:0:0:30\\\\\\\\nnserver:      L.GTLD-SERVERS.NET 192.41.162.30 2001:500:d937:0:0:0:0:30\\\\\\\\nnserver:      M.GTLD-SERVERS.NET 192.55.83.30 2001:501:b1f9:0:0:0:0:30\\\\\\\\nds-rdata:     19718 13 2 8acbb0cd28f41250a80a491389424d341522d946b0da0c0291f2d3d771d7805a\\\\\\\\n\\\\\\\\nwhois:        whois.verisign-grs.com\\\\\\\\n\\\\\\\\nstatus:       ACTIVE\\\\\\\\nremarks:      Registration information: http://www.verisigninc.com\\\\\\\\n\\\\\\\\ncreated:      1985-01-01\\\\\\\\nchanged:      2023-12-07\\\\\\\\nsource:       IANA\\\\\\\\n\\\\\\\\n# whois.verisign-grs.com\\\\\\\\n\\\\\\\\n   Domain Name: OPENAI.COM\\\\\\\\n   Registry Domain ID: 764064142_DOMAIN_COM-VRSN\\\\\\\\n   Registrar WHOIS Server: whois.markmonitor.com\\\\\\\\n   Registrar URL: http://www.markmonitor.com\\\\\\\\n   Updated Date: 2024-10-17T22:20:04Z\\\\\\\\n   Creation Date: 2007-01-19T19:28:24Z\\\\\\\\n   Registry Expiry Date: 2029-01-19T19:28:24Z\\\\\\\\n   Registrar: MarkMonitor Inc.\\\\\\\\n   Registrar IANA ID: 292\\\\\\\\n   Registrar Abuse Contact Email: abusecomplaints@markmonitor.com\\\\\\\\n   Registrar Abuse Contact Phone: +1.2086851750\\\\\\\\n   Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited\\\\\\\\n   Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\\\\\\\\n   Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited\\\\\\\\n   Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited\\\\\\\\n   Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited\\\\\\\\n   Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited\\\\\\\\n   Name Server: NS1-02.AZURE-DNS.COM\\\\\\\\n   Name Server: NS2-02.AZURE-DNS.NET\\\\\\\\n   Name Server: NS3-02.AZURE-DNS.ORG\\\\\\\\n   Name Server: NS4-02.AZURE-DNS.INFO\\\\\\\\n   DNSSEC: unsigned\\\\\\\\n   URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/\\\\\\\\n>>> Last update of whois database: 2025-09-10T00:40:20Z <<<\\\\\\\\n\\\\\\\\n# whois.markmonitor.com\\\\\\\\n\\\\\\\\nDomain Name: openai.com\\\\\\\\nRegistry Domain ID: 764064142_DOMAIN_COM-VRSN\\\\\\\\nRegistrar WHOIS Server: whois.markmonitor.com\\\\\\\\nRegistrar URL: http://www.markmonitor.com\\\\\\\\nUpdated Date: 2024-10-17T22:02:55+0000\\\\\\\\nCreation Date: 2007-01-19T19:28:24+0000\\\\\\\\nRegistrar Registration Expiration Date: 2029-01-19T19:28:24+0000\\\\\\\\nRegistrar: MarkMonitor, Inc.\\\\\\\\nRegistrar IANA ID: 292\\\\\\\\nRegistrar Abuse Contact Email: abusecomplaints@markmonitor.com\\\\\\\\nRegistrar Abuse Contact Phone: +1.2086851750\\\\\\\\nDomain Status: clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)\\\\\\\\nDomain Status: clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)\\\\\\\\nDomain Status: clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)\\\\\\\\nDomain Status: serverUpdateProhibited (https://www.icann.org/epp#serverUpdateProhibited)\\\\\\\\nDomain Status: serverTransferProhibited (https://www.icann.org/epp#serverTransferProhibited)\\\\\\\\nDomain Status: serverDeleteProhibited (https://www.icann.org/epp#serverDeleteProhibited)\\\\\\\\nRegistrant Organization: OpenAI\\\\\\\\nRegistrant Country: US\\\\\\\\nRegistrant Email: Select Request Email Form at https://domains.markmonitor.com/whois/openai.com\\\\\\\\nTech Email: Select Request Email Form at https://domains.markmonitor.com/whois/openai.com\\\\\\\\nName Server: ns4-02.azure-dns.info\\\\\\\\nName Server: ns3-02.azure-dns.org\\\\\\\\nName Server: ns1-02.azure-dns.com\\\\\\\\nName Server: ns2-02.azure-dns.net\\\\\\\\nDNSSEC: unsigned\\\\\\\\nURL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/\\\\\\\\n>>> Last update of WHOIS database: 2025-09-10T00:40:38+0000 <<<\\\\\\\\n\\\\\\\\n\\\\\\\"</tool_result>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"The\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.40602684020996094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" domain\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4868507385253906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" open\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.1099319458007812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ai\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5450248718261719,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".com\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.80108642578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5559196472167969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" registered\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.3282299041748047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0268688201904297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Open\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7030963897705078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"AI\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3788471221923828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7979869842529297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" WHO\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7860660552978516,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"IS\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":40.13490676879883,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" details\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.22411346435546875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":25.28691291809082,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"current\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1862049102783203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" as\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.40176773071289,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" of\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47016143798828125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.908811569213867,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"202\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.21409988403320312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.24698257446289,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.22411346435546875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"09\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":28.491973876953125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5466938018798828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"10\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.443376541137695,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2779960632324219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" show\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":23.90885353088379,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6661415100097656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":156.1720371246338,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Registr\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6318092346191406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ant\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.161813735961914,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" organization\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4882087707519531,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.7521381378173828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Open\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2390613555908203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"AI\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6909370422363281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4598369598388672,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"United\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0709762573242188,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" States\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6549358367919922,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8792877197265625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4627704620361328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8440017700195312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Registrar\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47516822814941406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.6960372924804688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Mark\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1599063873291016,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Monitor\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.459941864013672,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8859634399414062,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Inc\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":24.445056915283203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6361007690429688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":69.57697868347168,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5838871002197266,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Creation\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4639625549316406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" date\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4870891571044922,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.322965621948242,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2770423889160156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"200\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.765178680419922,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"7\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2377033233642578,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.47817611694336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"01\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7560253143310547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.300844192504883,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"19\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6780624389648438,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":105.0879955291748,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3199577331542969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Exp\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.53103256225586,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"iration\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9129047393798828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" date\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.928207397460938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.80108642578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":171.86260223388672,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"202\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2390613555908203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"9\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.044200897216797,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.5229454040527344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"01\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":123.7180233001709,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8299350738525391,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"19\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":94.21491622924805,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"  \\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5230903625488281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.72708511352539,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Name\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5879402160644531,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" servers\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.488977432250977,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.29206275939941406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":37.45388984680176,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2579689025878906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":61.20800971984863,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"02\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6561279296875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".azure\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5068778991699219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-d\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.759124755859375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.039743423461914,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".com\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7643699645996094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":152.73594856262207,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2688636779785156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.3451576232910156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8859634399414062,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"02\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7507801055908203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".azure\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1801719665527344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-d\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7829666137695312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1029243469238281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".net\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9810924530029297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7240772247314453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.084016799926758,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7498264312744141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.7671585083007812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"02\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.38092041015625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".azure\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.313924789428711,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-d\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3509521484375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":87.97216415405273,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".org\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9338855743408203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":19.225120544433594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7078647613525391,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"4\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.72308349609375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7381439208984375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"02\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.859842300415039,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".azure\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6160736083984375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-d\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.204927444458008,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ns\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.7080307006835938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".info\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.55590057373047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.2140274047851562,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"If\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.85003662109375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3829002380371094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" want\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.06816864013672,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9329319000244141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" I\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.013975143432617,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" can\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0237693786621094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" paste\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":29.699087142944336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3032684326171875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" full\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.134883880615234,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" WHO\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3819465637207031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"IS\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":42.01817512512207,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" output\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.423856735229492,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":164.59918022155762,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" check\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1630058288574219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" other\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0979175567626953,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" public\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.804901123046875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" records\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.393007278442383,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1820793151855469,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"business\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.7959346771240234,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" filings\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.055002212524414,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8718967437744141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" company\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1110305786132812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" website\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6791820526123047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5769729614257812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" for\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5209445953369141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" more\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.28896331787109375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ownership\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.060123443603516,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" details\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4050731658935547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3268718719482422,\\\"class_name\\\":\\\"TextOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":561,\\\"token reduction\\\":0,\\\"avg latency\\\":4.82210713486833,\\\"cpu\\\":[0,0,0,0,0],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":0,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":312,\\\"backtrackCount\\\":0,\\\"resetCount\\\":5}\"\n      }\n     },\n     \"4f9bb746405f4afb9e3025a15122dddf\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"OutputRequestMessage\\\",\\\"identifier\\\":\\\"\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":656,\\\"last_trace_id\\\":560,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_f0e363ca0dce44f3bb1ffd9eb9371ad6\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Divide by zero!\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"<tool=divide_by_zero>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"{}\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"</tool>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n<tool_result=divide_by_zero>\\\\\\\"Traceback (most recent call last):\\\\\\\\n  File \\\\\\\\\\\\\\\"/var/folders/0m/msvsxyls757fh94g_fldgk4c0000gn/T/ipykernel_66215/3060982701.py\\\\\\\\\\\\\\\", line 3, in divide_by_zero\\\\\\\\n    1 / 0\\\\\\\\n    ~~^~~\\\\\\\\nZeroDivisionError: division by zero\\\\\\\\n\\\\\\\"</tool_result>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"I\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.763956069946289,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" tried\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.43320655822753906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":200.06179809570312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" compute\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6070137023925781,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8912086486816406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7178783416748047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" /\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9157657623291016,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5371570587158203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.544952392578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2181529998779297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.905826568603516,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" runtime\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.36406517028808594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" raised\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5629062652587891,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.36025047302246094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47278404235839844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Division\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1430511474609375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4429817199707031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.14519691467285156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Division\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3330707550048828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" by\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.16164779663085938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5490779876708984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.20623207092285156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" undefined\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3807544708251953,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3180503845214844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ordinary\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.454023361206055,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" arithmetic\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2319812774658203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.24221420288086,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" so\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.065969467163086,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" most\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":38.53797912597656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" systems\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.23484230041503906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" throw\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.028984069824219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" an\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.17690658569335938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":34.9881649017334,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.49185752868652344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" require\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":41.21112823486328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3809928894042969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" different\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.215873718261719,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" interpretation\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7030963897705078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.528024673461914,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Quick\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8690357208251953,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" points\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":30.818939208984375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.23794174194335938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" options\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.149925231933594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.28228759765625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.0067081451416,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Math\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8933544158935547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":31.926631927490234,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5331039428710938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.660171508789062,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6148815155029297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":23.19192886352539,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8959770202636719,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" undefined\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.710281372070312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7188320159912109,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" As\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":153.57518196105957,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.270843505859375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2899169921875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.19311904907226562,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" lim\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3879070281982422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"_{\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.1819133758544922,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5040168762207031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"->\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2601146697998047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.552022933959961,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"+\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.32520294189453125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"}\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":73.37069511413574,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5431175231933594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":126.46603584289551,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.344919204711914,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":64.7881031036377,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" +\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7317066192626953,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"∞\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5450248718261719,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" and\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5812644958496094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" lim\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.045953750610352,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"_{\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.24080276489257812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.20595359802246,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"->\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1301040649414062,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.306068420410156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2510547637939453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"}\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":32.30690956115723,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.29015541076660156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":166.33868217468262,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8141994476318359,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1630058288574219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" −\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4619827270507812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"∞\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1060237884521484,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8180141448974609,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" so\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1730194091796875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" there\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5690326690673828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" is\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6977787017822266,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" no\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9191036224365234,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" single\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7998943328857422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" finite\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0492801666259766,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" value\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.646074295043945,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.31280517578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":41.00489616394043,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Python\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0900497436523438,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":36.17691993713379,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" integer\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9291172027587891,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.97300910949707,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" float\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0960102081298828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" division\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0571479797363281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" by\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.630878448486328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.34689903259277344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" raises\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":33.202171325683594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.634836196899414,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Division\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.72904396057129,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9279251098632812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":36.89122200012207,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6629695892333984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Example\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":59.964895248413086,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" safe\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8170604705810547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" code\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.52703094482422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0268688201904297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":180.10902404785156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" try\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5612373352050781,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3337860107421875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"     \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.25010108947753906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" result\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.49376487731933594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.24819374084472656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7698535919189453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" /\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2779960632324219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" b\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.41103363037109375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.28204917907714844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6120204925537109,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" except\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2510547637939453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.042957305908203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Division\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.39005279541015625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":21.74210548400879,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6887912750244141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"     \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.824007034301758,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" #\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4019737243652344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" handle\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":23.873090744018555,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" it\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8769035339355469,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.479015350341797,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"e\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.463174819946289,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".g\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.421794891357422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.33402442932128906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" set\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":27.844905853271484,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" result\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.199338912963867,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.888784408569336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" float\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9489059448242188,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"('\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.482912063598633,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"inf\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5753040313720703,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"'),\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.507770538330078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" skip\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3592967987060547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.926671981811523,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6482601165771484,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" raise\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.597789764404297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.432180404663086,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" clearer\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":24.044036865234375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5037784576416016,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.369113922119141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"     \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3719329833984375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" result\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.48516273498535,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9918212890625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" float\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.482114791870117,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"('\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1448860168457031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"inf\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.839078903198242,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"')\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3979206085205078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.118080139160156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" If\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3299713134765625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.94988250732422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" want\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9222030639648438,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" extended\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.2530555725097656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" real\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5497932434082031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/in\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.922266006469727,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"finite\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.41794776916503906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" values\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.862972259521484,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8389949798583984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" use\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.989955902099609,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" float\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3879070281982422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"('\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":152.18710899353027,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"inf\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1188983917236328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"')\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0571479797363281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.271963119506836,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" math\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.7848014831542969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".inf\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5990734100341797,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" explicitly\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.9769668579101562,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6861686706542969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6108283996582031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Num\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3161430358886719,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Py\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6978511810302734,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.29015541076660156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" dividing\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3199577331542969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" floats\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2968311309814453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" by\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.38123130798339844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" zero\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3910064697265625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" typically\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4189014434814453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" yields\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.33283233642578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" inf\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5371570587158203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.30684471130371094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8530616760253906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" runtime\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5769729614257812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" warning\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6310939788818359,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47206878662109375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"IEEE\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4191398620605469,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5059242248535156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"754\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.6810169219970703,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" behavior\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.560760498046875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\").\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":18.95928382873535,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" You\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6189346313476562,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" can\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.6318302154541016,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" control\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7150173187255859,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" warnings\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":13.406991958618164,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4432201385498047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" np\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5888938903808594,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".set\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5238056182861328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"err\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.000280380249023,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6136894226074219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.25316047668457,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Symbol\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5209445953369141,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"ic\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.739139556884766,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limits\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4200935363769531,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.216691970825195,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" with\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4131793975830078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Sym\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.8699169158935547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Py\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4341602325439453,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.789726257324219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" can\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.39315223693847656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" compute\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.305953979492188,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" directional\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5428791046142578,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limits\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.367321014404297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.41294097900390625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":7.637977600097656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" from\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.7407665252685547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" sym\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.416175842285156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"py\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.8809566497802734,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" import\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":6.626129150390625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5850791931152344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6067752838134766,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Symbol\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.39505958557128906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.708953857421875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" oo\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5030632019042969,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":5.06591796875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4661083221435547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.39809799194336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.47278404235839844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" Symbol\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":10.258197784423828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"('\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4169940948486328,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.312702178955078,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"')\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4711151123046875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.078834533691406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1532306671142578,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"(\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":8.728981018066406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.43010711669921875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.035867691040039,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5650520324707031,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":15.282869338989258,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4291534423828125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":4.817962646484375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.45108795166015625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.82085609436035,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" dir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5941390991210938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"='+\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":26.491880416870117,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"')\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.3661384582519531,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.653921127319336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" #\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0428428649902344,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ->\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":12.119054794311523,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" oo\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6481876373291016,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":14.351844787597656,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5741119384765625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":179.57496643066406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"(\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.3729801177978516,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"1\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.817941665649414,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"/x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.193927764892578,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4052391052246094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" x\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9858608245849609,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.3120174407958984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.1701583862304688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"0\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.628875732421875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5249977111816406,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" dir\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5247592926025391,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"='\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3960132598876953,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5292892456054688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"')\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4138946533203125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5910396575927734,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" #\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.45609474182128906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" ->\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9829998016357422,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" -\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.45490264892578125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"oo\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":9.553909301757812,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6482601165771484,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Do\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.03788948059082,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" you\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5049705505371094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" want\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":20.03002166748047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" me\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4868507385253906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" to\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":22.649049758911133,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\":\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.6120204925537109,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.90495491027832,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" fix\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.4431476593017578,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" code\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":31.692028045654297,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" that\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.8998851776123047,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" caused\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":31.703948974609375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.0711421966552734,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" error\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":23.892879486083984,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.773834228515625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":16.405105590820312,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" compute\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.6901493072509766,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" a\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":17.53687858581543,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" limit\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.5750656127929688,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":24.54090118408203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5401840209960938,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" explain\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":24.266958236694336,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" the\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.31988525390625,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" math\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":47.866106033325195,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" more\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":2.0530223846435547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" formally\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":11.505126953125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\",\\\\n\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.0807514190673828,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"or\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":165.2820110321045,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" something\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.7879009246826172,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" else\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":1.5292167663574219,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"?\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":3.865957260131836,\\\"class_name\\\":\\\"TextOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":1236,\\\"token reduction\\\":0,\\\"avg latency\\\":2.7537016035283655,\\\"cpu\\\":[0,0,0,0,0],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":0,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":656,\\\"backtrackCount\\\":0,\\\"resetCount\\\":5}\"\n      }\n     },\n     \"56df1ce5d773458893321c014ee82ecd\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"8083e127b62b4daea61b8b69d586c1d2\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"d913c0a152c34b428e87e1d54f8750cc\": {\n      \"model_module\": \"@guidance-ai/stitch\",\n      \"model_module_version\": \"^0.1.5\",\n      \"model_name\": \"StitchModel\",\n      \"state\": {\n       \"_model_module_version\": \"^0.1.5\",\n       \"_view_module_version\": \"^0.1.5\",\n       \"clientmsg\": \"{\\\"class_name\\\":\\\"OutputRequestMessage\\\",\\\"identifier\\\":\\\"\\\"}\",\n       \"initial_height\": \"auto\",\n       \"initial_width\": \"100%\",\n       \"kernelmsg\": \"{\\\"message_id\\\":132,\\\"last_trace_id\\\":88,\\\"is_err\\\":false,\\\"class_name\\\":\\\"ExecutionCompletedMessage\\\"}\",\n       \"layout\": \"IPY_MODEL_e4b8276a798b4603baf61d793b4916fb\",\n       \"srcdoc\": \"<!doctype html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"utf-8\\\">\\n\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\\\" rel=\\\"stylesheet\\\">\\n</head>\\n<body>\\n<script>\\nvar app=function(){\\\"use strict\\\";function e(){}function t(e){return e()}function i(){return Object.create(null)}function s(e){e.forEach(t)}function n(e){return\\\"function\\\"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&\\\"object\\\"==typeof e||\\\"function\\\"==typeof e}let a;function o(e,t){return e===t||(a||(a=document.createElement(\\\"a\\\")),a.href=t,e===a.href)}function l(t,i,s){t.$$.on_destroy.push(function(t,...i){if(null==t){for(const e of i)e(void 0);return e}const s=t.subscribe(...i);return s.unsubscribe?()=>s.unsubscribe():s}(i,s))}function c(e){return null==e?\\\"\\\":e}function d(t){return t&&n(t.destroy)?t.destroy:e}const u=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof globalThis?globalThis:global;function h(e,t){e.appendChild(t)}function p(e,t,i){e.insertBefore(t,i||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function y(e){return document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",e)}function v(e){return document.createTextNode(e)}function b(){return v(\\\" \\\")}function _(){return v(\\\"\\\")}function T(e,t,i,s){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)}function S(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function w(e,t){t=\\\"\\\"+t,e.data!==t&&(e.data=t)}function k(e,t){e.value=null==t?\\\"\\\":t}function x(e,t,i,s){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,\\\"\\\")}let E,C;function A(){if(void 0===E){E=!1;try{\\\"undefined\\\"!=typeof window&&window.parent&&window.parent.document}catch(e){E=!0}}return E}function I(e){C=e}function j(){if(!C)throw new Error(\\\"Function called outside component initialization\\\");return C}function D(e){j().$$.on_mount.push(e)}function P(e){j().$$.on_destroy.push(e)}function L(){const e=j();return(t,i,{cancelable:s=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=function(e,t,{bubbles:i=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:s})}(t,i,{cancelable:s});return n.slice().forEach(t=>{t.call(e,r)}),!r.defaultPrevented}return!0}}const O=[],N=[];let M=[];const R=[],U=Promise.resolve();let B=!1;function F(e){M.push(e)}const q=new Set;let $=0;function z(){if(0!==$)return;const e=C;do{try{for(;$<O.length;){const e=O[$];$++,I(e),H(e.$$)}}catch(e){throw O.length=0,$=0,e}for(I(null),O.length=0,$=0;N.length;)N.pop()();for(let e=0;e<M.length;e+=1){const t=M[e];q.has(t)||(q.add(t),t())}M.length=0}while(O.length);for(;R.length;)R.pop()();B=!1,q.clear(),I(e)}function H(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const V=new Set;let W;function G(){W={r:0,c:[],p:W}}function X(){W.r||s(W.c),W=W.p}function Y(e,t){e&&e.i&&(V.delete(e),e.i(t))}function K(e,t,i,s){if(e&&e.o){if(V.has(e))return;V.add(e),W.c.push(()=>{V.delete(e),s&&(i&&e.d(1),s())}),e.o(t)}else s&&s()}function Q(e){return void 0!==e?.length?e:Array.from(e)}function J(e){e&&e.c()}function Z(e,i,r){const{fragment:a,after_update:o}=e.$$;a&&a.m(i,r),F(()=>{const i=e.$$.on_mount.map(t).filter(n);e.$$.on_destroy?e.$$.on_destroy.push(...i):s(i),e.$$.on_mount=[]}),o.forEach(F)}function ee(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];M.forEach(s=>-1===e.indexOf(s)?t.push(s):i.push(s)),i.forEach(e=>e()),M=t}(i.after_update),s(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function te(e,t){-1===e.$$.dirty[0]&&(O.push(e),B||(B=!0,U.then(z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(t,n,r,a,o,l,c=null,d=[-1]){const u=C;I(t);const h=t.$$={fragment:null,ctx:[],props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,n.props||{},(e,i,...s)=>{const n=s.length?s[0]:i;return h.ctx&&o(h.ctx[e],h.ctx[e]=n)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](n),p&&te(t,e)),i}):[],h.update(),p=!0,s(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(m)}else h.fragment&&h.fragment.c();n.intro&&Y(t.$$.fragment),Z(t,n.target,n.anchor),z()}I(u)}class se{$$=void 0;$$set=void 0;$destroy(){ee(this,1),this.$destroy=e}$on(t,i){if(!n(i))return e;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(i),()=>{const e=s.indexOf(i);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ne(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&\\\"undefined\\\"!=typeof document){var s=document.head||document.getElementsByTagName(\\\"head\\\")[0],n=document.createElement(\\\"style\\\");n.type=\\\"text/css\\\",\\\"top\\\"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}\\\"undefined\\\"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add(\\\"4\\\");ne('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties;@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace;--color-red-400:oklch(70.4% 0.191 22.216);--color-red-700:oklch(50.5% 0.213 27.518);--color-purple-300:oklch(82.7% 0.119 306.383);--color-purple-800:oklch(43.8% 0.218 303.724);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-100:oklch(96.7% 0.003 264.542);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-gray-900:oklch(21% 0.034 264.665);--color-white:#fff;--spacing:0.25rem;--container-6xl:72rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:0.025em;--tracking-wider:0.05em;--radius-lg:0.5rem;--radius-xl:0.75rem;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-token:\\\"JetBrains Mono\\\",monospace;--animate-cpulse:cpulse 3.5s cubic-bezier(0.4,0,0.6,1) infinite}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\",\\\"Noto Color Emoji\\\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\\\"Liberation Mono\\\",\\\"Courier New\\\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:transparent;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.bottom-\\\\\\\\[-15px\\\\\\\\]{bottom:-15px}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-1{grid-column:1}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.min-h-40{min-height:calc(var(--spacing)*40)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-24{width:calc(var(--spacing)*24)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.flex-grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\\\\\\\\/4{--tw-translate-x:-25%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-cpulse{animation:var(--animate-cpulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-x-scroll{overflow-x:scroll}.rounded-full{border-radius:calc(infinity*1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-white{border-color:var(--color-white)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.fill-white{fill:var(--color-white)}.stroke-gray-700{stroke:var(--color-gray-700)}.p-2{padding:calc(var(--spacing)*2)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-\\\\\\\\[0\\\\\\\\.125rem\\\\\\\\]{padding-right:.125rem}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-token{font-family:var(--font-token)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.whitespace-nowrap{white-space:nowrap}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-700{color:var(--color-red-700)}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.opacity-95{opacity:95%}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,rgba(0,0,0,.1)),0 2px 4px -2px var(--tw-shadow-color,rgba(0,0,0,.1))}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:200ms;transition-duration:.2s}.hover\\\\\\\\:bg-gray-700{&:hover{@media (hover:hover){background-color:var(--color-gray-700)}}}.hover\\\\\\\\:bg-gray-900{&:hover{@media (hover:hover){background-color:var(--color-gray-900)}}}.hover\\\\\\\\:text-gray-700{&:hover{@media (hover:hover){color:var(--color-gray-700)}}}.hover\\\\\\\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.focus\\\\\\\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\\\\\\\:ring-gray-500{&:focus{--tw-ring-color:var(--color-gray-500)}}.focus\\\\\\\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.dark\\\\\\\\:border-gray-500{&:where(.dark,.dark *){border-color:var(--color-gray-500)}}.dark\\\\\\\\:border-gray-600{&:where(.dark,.dark *){border-color:var(--color-gray-600)}}.dark\\\\\\\\:border-gray-700{&:where(.dark,.dark *){border-color:var(--color-gray-700)}}.dark\\\\\\\\:border-gray-900{&:where(.dark,.dark *){border-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-\\\\\\\\[\\\\\\\\#5A5F72\\\\\\\\]{&:where(.dark,.dark *){background-color:#5a5f72}}.dark\\\\\\\\:bg-gray-200{&:where(.dark,.dark *){background-color:var(--color-gray-200)}}.dark\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){background-color:var(--color-gray-300)}}.dark\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){background-color:var(--color-gray-600)}}.dark\\\\\\\\:bg-gray-700{&:where(.dark,.dark *){background-color:var(--color-gray-700)}}.dark\\\\\\\\:bg-gray-800{&:where(.dark,.dark *){background-color:var(--color-gray-800)}}.dark\\\\\\\\:bg-gray-900{&:where(.dark,.dark *){background-color:var(--color-gray-900)}}.dark\\\\\\\\:bg-transparent{&:where(.dark,.dark *){background-color:transparent}}.dark\\\\\\\\:fill-gray-900{&:where(.dark,.dark *){fill:var(--color-gray-900)}}.dark\\\\\\\\:stroke-gray-300{&:where(.dark,.dark *){stroke:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-200{&:where(.dark,.dark *){color:var(--color-gray-200)}}.dark\\\\\\\\:text-gray-300{&:where(.dark,.dark *){color:var(--color-gray-300)}}.dark\\\\\\\\:text-gray-400{&:where(.dark,.dark *){color:var(--color-gray-400)}}.dark\\\\\\\\:text-gray-500{&:where(.dark,.dark *){color:var(--color-gray-500)}}.dark\\\\\\\\:text-purple-300{&:where(.dark,.dark *){color:var(--color-purple-300)}}.dark\\\\\\\\:text-red-400{&:where(.dark,.dark *){color:var(--color-red-400)}}.dark\\\\\\\\:text-white{&:where(.dark,.dark *){color:var(--color-white)}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-gray-600{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:var(--color-gray-600)}}}}.dark\\\\\\\\:hover\\\\\\\\:bg-transparent{&:where(.dark,.dark *){&:hover{@media (hover:hover){background-color:transparent}}}}.dark\\\\\\\\:hover\\\\\\\\:text-gray-300{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-gray-300)}}}}.dark\\\\\\\\:hover\\\\\\\\:text-white{&:where(.dark,.dark *){&:hover{@media (hover:hover){color:var(--color-white)}}}}.dark\\\\\\\\:focus\\\\\\\\:ring-gray-400{&:where(.dark,.dark *){&:focus{--tw-ring-color:var(--color-gray-400)}}}}@keyframes cpulse{50%{opacity:0}}@property --tw-translate-x{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\\\"*\\\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-y{syntax:\\\"*\\\";inherits:false}@property --tw-rotate-z{syntax:\\\"*\\\";inherits:false}@property --tw-skew-x{syntax:\\\"*\\\";inherits:false}@property --tw-skew-y{syntax:\\\"*\\\";inherits:false}@property --tw-border-style{syntax:\\\"*\\\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\\\"*\\\";inherits:false}@property --tw-tracking{syntax:\\\"*\\\";inherits:false}@property --tw-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\\\"<percentage>\\\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\\\"*\\\";inherits:false}@property --tw-inset-ring-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\\\"*\\\";inherits:false}@property --tw-ring-offset-width{syntax:\\\"<length>\\\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\\\"*\\\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\\\"*\\\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\\\"*\\\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}');const re=[];function ae(t,i=e){let s;const n=new Set;function a(e){if(r(t,e)&&(t=e,s)){const e=!re.length;for(const e of n)e[1](),re.push(e,t);if(e){for(let e=0;e<re.length;e+=2)re[e][0](re[e+1]);re.length=0}}}function o(e){a(e(t))}return{set:a,update:o,subscribe:function(r,l=e){const c=[r,l];return n.add(c),1===n.size&&(s=i(a,o)||e),r(t),()=>{n.delete(c),0===n.size&&s&&(s(),s=null)}}}}function oe(e){return null!=e&&\\\"RoleOpenerInput\\\"===e.class_name}function le(e){return null!=e&&\\\"RoleCloserInput\\\"===e.class_name}function ce(e){return null!=e&&(\\\"TextOutput\\\"===e.class_name||\\\"TokenOutput\\\"===e.class_name)}function de(e){return null!=e&&\\\"TokenOutput\\\"===e.class_name}function ue(e){return null!=e&&\\\"ImageOutput\\\"===e.class_name}function he(e){return null!=e&&\\\"AudioOutput\\\"===e.class_name}function pe(e){return null!=e&&\\\"VideoOutput\\\"===e.class_name}var me,ge=ae(void 0),fe=ae(void 0),ye=ae(void 0);function ve(e){let t,i;return{c(){t=y(\\\"svg\\\"),i=y(\\\"path\\\"),S(i,\\\"d\\\",\\\"M8 5.14v14l11-7-11-7z\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,s){p(e,t,s),h(t,i)},d(e){e&&m(t)}}}function be(e){let t,i,s;return{c(){t=y(\\\"svg\\\"),i=y(\\\"rect\\\"),s=y(\\\"rect\\\"),S(i,\\\"x\\\",\\\"7\\\"),S(i,\\\"y\\\",\\\"6\\\"),S(i,\\\"width\\\",\\\"3\\\"),S(i,\\\"height\\\",\\\"12\\\"),S(i,\\\"rx\\\",\\\"1\\\"),S(s,\\\"x\\\",\\\"14\\\"),S(s,\\\"y\\\",\\\"6\\\"),S(s,\\\"width\\\",\\\"3\\\"),S(s,\\\"height\\\",\\\"12\\\"),S(s,\\\"rx\\\",\\\"1\\\"),S(t,\\\"class\\\",\\\"fill-white dark:fill-gray-900 w-5 h-5\\\"),S(t,\\\"viewBox\\\",\\\"0 0 24 24\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s)},d(e){e&&m(t)}}}function _e(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.07c1.48-.74 2.5-2.26 2.5-4.04z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Te(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M7 9v6h4l5 5V4l-5 5H7z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Se(e){let t;return{c(){t=y(\\\"path\\\"),S(t,\\\"d\\\",\\\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function we(e){let t,i,n,r,a,o,l,c,d,u;return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),n=f(\\\"input\\\"),r=b(),a=f(\\\"div\\\"),o=b(),l=f(\\\"div\\\"),S(n,\\\"type\\\",\\\"range\\\"),S(n,\\\"min\\\",\\\"0\\\"),S(n,\\\"max\\\",\\\"1\\\"),S(n,\\\"step\\\",\\\"0.01\\\"),S(n,\\\"class\\\",\\\"absolute inset-0 opacity-0 cursor-pointer z-10 w-full\\\"),S(n,\\\"aria-label\\\",\\\"Volume\\\"),S(a,\\\"class\\\",\\\"absolute inset-y-0 left-0 rounded-full bg-gray-600 dark:bg-gray-300\\\"),x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),S(l,\\\"class\\\",\\\"absolute h-2 w-2 bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-500 rounded-full shadow-sm\\\"),x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),x(l,\\\"top\\\",\\\"-2px\\\"),S(i,\\\"class\\\",\\\"w-24 relative h-1 rounded-full bg-gray-200 dark:bg-gray-600\\\"),S(t,\\\"class\\\",\\\"absolute left-0 bottom-[-15px] bg-white dark:bg-gray-800 shadow-md rounded-lg p-2 transform -translate-x-1/4 transition-opacity duration-200 z-20\\\"),S(t,\\\"role\\\",\\\"slider\\\"),S(t,\\\"aria-label\\\",\\\"Volume\\\"),S(t,\\\"aria-valuemin\\\",\\\"0\\\"),S(t,\\\"aria-valuemax\\\",\\\"100\\\"),S(t,\\\"aria-valuenow\\\",c=100*e[2])},m(s,c){p(s,t,c),h(t,i),h(i,n),k(n,e[2]),h(i,r),h(i,a),h(i,o),h(i,l),d||(u=[T(n,\\\"change\\\",e[18]),T(n,\\\"input\\\",e[18]),T(n,\\\"input\\\",e[12])],d=!0)},p(e,i){4&i[0]&&k(n,e[2]),4&i[0]&&x(a,\\\"width\\\",100*e[2]+\\\"%\\\"),4&i[0]&&x(l,\\\"left\\\",\\\"calc(\\\"+100*e[2]+\\\"% - 6px)\\\"),4&i[0]&&c!==(c=100*e[2])&&S(t,\\\"aria-valuenow\\\",c)},d(e){e&&m(t),d=!1,s(u)}}}function ke(t){let i,n,r,a,l,c,d,u,g,_,k,x,E,C,A,I,j,D,P,L,O,N,M,R=xe(t[7])+\\\"\\\",U=xe(t[6])+\\\"\\\";function B(e,t){return e[4]?be:ve}let F=B(t),q=F(t);function $(e,t){return e[3]||0===e[2]?Se:e[2]<.5?Te:_e}let z=$(t),H=z(t),V=t[8]&&we(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"div\\\"),r=f(\\\"div\\\"),a=f(\\\"button\\\"),q.c(),l=b(),c=f(\\\"div\\\"),d=f(\\\"button\\\"),u=y(\\\"svg\\\"),H.c(),_=b(),V&&V.c(),k=b(),x=f(\\\"div\\\"),E=f(\\\"canvas\\\"),C=b(),A=f(\\\"div\\\"),I=v(R),j=v(\\\" / \\\"),D=v(U),P=b(),L=f(\\\"audio\\\"),S(a,\\\"class\\\",\\\"w-6 h-6 rounded-full bg-gray-800 dark:bg-gray-200 flex items-center justify-center cursor-pointer transition-all hover:bg-gray-900 dark:hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 dark:focus:ring-gray-400\\\"),S(a,\\\"aria-label\\\",\\\"Toggle playback\\\"),S(u,\\\"class\\\",\\\"w-5 h-5\\\"),S(u,\\\"viewBox\\\",\\\"0 0 24 24\\\"),S(u,\\\"fill\\\",\\\"currentColor\\\"),S(d,\\\"class\\\",\\\"text-gray-500 dark:text-gray-400 pl-1 py-1 hover:text-gray-700 dark:hover:text-gray-300 relative z-10\\\"),S(d,\\\"aria-label\\\",g=t[3]?\\\"Unmute\\\":\\\"Mute\\\"),S(d,\\\"aria-pressed\\\",t[3]),S(c,\\\"class\\\",\\\"relative\\\"),S(c,\\\"role\\\",\\\"group\\\"),S(c,\\\"aria-label\\\",\\\"Volume controls\\\"),S(E,\\\"class\\\",\\\"w-full h-12\\\"),S(x,\\\"class\\\",\\\"flex-grow relative cursor-pointer\\\"),S(x,\\\"role\\\",\\\"slider\\\"),S(x,\\\"tabindex\\\",\\\"0\\\"),S(x,\\\"aria-label\\\",\\\"Audio timeline\\\"),S(x,\\\"aria-valuemin\\\",\\\"0\\\"),S(x,\\\"aria-valuemax\\\",\\\"100\\\"),S(x,\\\"aria-valuenow\\\",t[5]),S(A,\\\"class\\\",\\\"text-gray-700 dark:text-gray-300 whitespace-nowrap text-sm\\\"),S(r,\\\"class\\\",\\\"flex items-center gap-1\\\"),S(n,\\\"class\\\",\\\"flex flex-col gap-2\\\"),o(L.src,O=`data:audio/${t[0].format};base64,`+t[0].value)||S(L,\\\"src\\\",O),S(L,\\\"class\\\",\\\"hidden\\\"),S(i,\\\"class\\\",\\\"bg-white dark:bg-gray-800 px-2 py-1 w-full max-w-6xl rounded-xl shadow-sm border border-gray-100 dark:border-gray-700\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),q.m(a,null),h(r,l),h(r,c),h(c,d),h(d,u),H.m(u,null),h(c,_),V&&V.m(c,null),h(r,k),h(r,x),h(x,E),t[21](E),h(r,C),h(r,A),h(A,I),h(A,j),h(A,D),h(i,P),h(i,L),t[23](L),N||(M=[T(a,\\\"click\\\",t[10]),T(d,\\\"click\\\",t[17]),T(c,\\\"mouseenter\\\",t[19]),T(c,\\\"mouseleave\\\",t[20]),T(x,\\\"click\\\",t[11]),T(x,\\\"mousemove\\\",t[13]),T(x,\\\"mouseleave\\\",t[14]),T(x,\\\"keydown\\\",t[22]),T(L,\\\"timeupdate\\\",t[15]),T(L,\\\"ended\\\",t[16])],N=!0)},p(e,t){F!==(F=B(e))&&(q.d(1),q=F(e),q&&(q.c(),q.m(a,null))),z!==(z=$(e))&&(H.d(1),H=z(e),H&&(H.c(),H.m(u,null))),8&t[0]&&g!==(g=e[3]?\\\"Unmute\\\":\\\"Mute\\\")&&S(d,\\\"aria-label\\\",g),8&t[0]&&S(d,\\\"aria-pressed\\\",e[3]),e[8]?V?V.p(e,t):(V=we(e),V.c(),V.m(c,null)):V&&(V.d(1),V=null),32&t[0]&&S(x,\\\"aria-valuenow\\\",e[5]),128&t[0]&&R!==(R=xe(e[7])+\\\"\\\")&&w(I,R),64&t[0]&&U!==(U=xe(e[6])+\\\"\\\")&&w(D,U),1&t[0]&&!o(L.src,O=`data:audio/${e[0].format};base64,`+e[0].value)&&S(L,\\\"src\\\",O)},i:e,o:e,d(e){e&&m(i),q.d(),H.d(),V&&V.d(),t[21](null),t[23](null),N=!1,s(M)}}}function xe(e){const t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i<10?\\\"0\\\":\\\"\\\"}${i}`}function Ee(e,t,i){var s=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))(function(n,r){function a(e){try{l(s.next(e))}catch(e){r(e)}}function o(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};let n,r,a,{audioData:o}=t,l=!1,c=0,d=0,u=0,h=1,p=!1,m=!1,g=[],f=0,y=-1;let v=!1,b=null;function _(){return s(this,void 0,void 0,function*(){if(!o||!r)return;const e=r;e.width=e.clientWidth,e.height=e.clientHeight;const t=e.width,i=e.height,s=e.getContext(\\\"2d\\\");if(null==s)return;if(0===g.length){const e=new AudioContext,i=function(e){const t=atob(e),i=t.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=t.charCodeAt(e);return s.buffer}(o.value);try{const s=(yield e.decodeAudioData(i)).getChannelData(0),n=t,r=Math.floor(s.length/n);g=new Array(n);for(let e=0;e<n;e++){let t=0;for(let i=0;i<r;i++)t+=Math.abs(s[e*r+i]);g[e]=t/r}f=Math.max(...g),0===f&&(f=1)}catch(e){return void console.error(\\\"Error decoding audio for waveform:\\\",e)}}if(!v){a=document.createElement(\\\"canvas\\\"),a.width=t,a.height=i;const e=a.getContext(\\\"2d\\\");if(e){const s=1.5,n=1,r=Math.floor(t/(s+n));for(let t=0;t<r;t++){const a=Math.floor(t/r*g.length),o=g[a]/f*i*.8,l=(i-o)/2,c=t*(s+n);e.fillStyle=\\\"#E5E5E5\\\",e.beginPath(),e.roundRect(c,l,s,o,1),e.fill()}v=!0}}s.clearRect(0,0,t,i),v&&s.drawImage(a,0,0);const n=Math.floor(c/100*t),l=Math.floor(t/3);if(c>0){const e=Math.ceil(n/3);for(let t=0;t<e;t++){const e=Math.floor(t/l*g.length),n=g[e]/f*i*.8,r=(i-n)/2,a=3*t;s.fillStyle=\\\"#717171\\\",s.beginPath(),s.roundRect(a,r,2,n,1),s.fill()}}if(c>0&&(s.beginPath(),s.moveTo(n,0),s.lineTo(n,i),s.strokeStyle=\\\"rgba(80, 80, 80, 0.7)\\\",s.lineWidth=2,s.stroke()),y>=0){const e=Math.floor(y/100*t);s.beginPath(),s.moveTo(e,0),s.lineTo(e,i),s.strokeStyle=\\\"rgba(0, 0, 0, 0.3)\\\",s.lineWidth=1,s.stroke()}})}function T(){n&&(i(5,c=n.currentTime/n.duration*100),i(7,u=n.currentTime),i(6,d=n.duration||0))}function S(){l&&T(),_(),b=requestAnimationFrame(S)}D(()=>{_(),S();const e=new ResizeObserver(()=>{v=!1,_()});return r&&e.observe(r),()=>{r&&e.disconnect(),b&&cancelAnimationFrame(b)}});return e.$$set=e=>{\\\"audioData\\\"in e&&i(0,o=e.audioData)},e.$$.update=()=>{14&e.$$.dirty[0]&&n&&i(1,n.volume=p?0:h,n)},[o,n,h,p,l,c,d,u,m,r,function(){n.paused?(n.play(),i(4,l=!0)):(n.pause(),i(4,l=!1))},function(e){const t=e.currentTarget;if(null==t)return void console.error(\\\"Null seek event target\\\");const s=e.offsetX/t.offsetWidth*n.duration;i(1,n.currentTime=s,n)},function(e){const t=e.target;null!=t?(i(2,h=parseFloat(t.value)),p&&h>0&&i(3,p=!1),i(1,n.volume=p?0:h,n)):console.error(\\\"Null change volume event target\\\")},function(e){const t=e.currentTarget;null!=t?y=e.offsetX/t.offsetWidth*100:console.error(\\\"Null hover event target\\\")},function(){y=-1},T,function(){i(4,l=!1),i(5,c=0),i(7,u=0),v=!1,_()},()=>i(3,p=!p),function(){var e;e=this.value,h=\\\"\\\"===e?null:+e,i(2,h)},()=>i(8,m=!0),()=>i(8,m=!1),function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{r=e,i(9,r)})},e=>{\\\"ArrowRight\\\"===e.key?i(1,n.currentTime=Math.min(n.duration,n.currentTime+5),n):\\\"ArrowLeft\\\"===e.key&&i(1,n.currentTime=Math.max(0,n.currentTime-5),n)},function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{n=e,i(1,n),i(3,p),i(2,h)})}]}!function(e){e.Running=\\\"Running\\\",e.Error=\\\"Error\\\",e.Done=\\\"Done\\\"}(me||(me={}));class Ce extends se{constructor(e){super(),ie(this,e,Ee,ke,r,{audioData:0},null,[-1,-1])}}ne('.vjs-svg-icon{background-position:50%;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{height:100%;left:0;position:absolute;top:0;width:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;font-style:normal;font-weight:400;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format(\\\"woff\\\")}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\\\"\\\\\\\\f101\\\"}.vjs-icon-play-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-play-circle:before{content:\\\"\\\\\\\\f102\\\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\\\"\\\\\\\\f103\\\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\\\"\\\\\\\\f104\\\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\\\"\\\\\\\\f105\\\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\\\"\\\\\\\\f106\\\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\\\"\\\\\\\\f107\\\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\\\"\\\\\\\\f108\\\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\\\"\\\\\\\\f109\\\"}.vjs-icon-spinner{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-spinner:before{content:\\\"\\\\\\\\f10a\\\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\\\"\\\\\\\\f10b\\\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\\\"\\\\\\\\f10c\\\"}.vjs-icon-hd{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-hd:before{content:\\\"\\\\\\\\f10d\\\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\\\"\\\\\\\\f10e\\\"}.vjs-icon-downloading{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-downloading:before{content:\\\"\\\\\\\\f10f\\\"}.vjs-icon-file-download{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download:before{content:\\\"\\\\\\\\f110\\\"}.vjs-icon-file-download-done{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-done:before{content:\\\"\\\\\\\\f111\\\"}.vjs-icon-file-download-off{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-file-download-off:before{content:\\\"\\\\\\\\f112\\\"}.vjs-icon-share{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-share:before{content:\\\"\\\\\\\\f113\\\"}.vjs-icon-cog{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cog:before{content:\\\"\\\\\\\\f114\\\"}.vjs-icon-square{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-square:before{content:\\\"\\\\\\\\f115\\\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f116\\\"}.vjs-icon-circle-outline{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-outline:before{content:\\\"\\\\\\\\f117\\\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-circle-inner-circle:before{content:\\\"\\\\\\\\f118\\\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\\\"\\\\\\\\f119\\\"}.vjs-icon-repeat{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-repeat:before{content:\\\"\\\\\\\\f11a\\\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\\\"\\\\\\\\f11b\\\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\\\"\\\\\\\\f11c\\\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\\\"\\\\\\\\f11d\\\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\\\"\\\\\\\\f11e\\\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\\\"\\\\\\\\f11f\\\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\\\"\\\\\\\\f120\\\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\\\"\\\\\\\\f121\\\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\\\"\\\\\\\\f122\\\"}.vjs-icon-next-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-next-item:before{content:\\\"\\\\\\\\f123\\\"}.vjs-icon-previous-item{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-previous-item:before{content:\\\"\\\\\\\\f124\\\"}.vjs-icon-shuffle{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-shuffle:before{content:\\\"\\\\\\\\f125\\\"}.vjs-icon-cast{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-cast:before{content:\\\"\\\\\\\\f126\\\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\\\"\\\\\\\\f127\\\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-style:normal;font-weight:400}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\\\"\\\\\\\\f128\\\"}.vjs-icon-facebook{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-facebook:before{content:\\\"\\\\\\\\f129\\\"}.vjs-icon-linkedin{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-linkedin:before{content:\\\"\\\\\\\\f12a\\\"}.vjs-icon-twitter{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-twitter:before{content:\\\"\\\\\\\\f12b\\\"}.vjs-icon-tumblr{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-tumblr:before{content:\\\"\\\\\\\\f12c\\\"}.vjs-icon-pinterest{font-family:VideoJS;font-style:normal;font-weight:400}.vjs-icon-pinterest:before{content:\\\"\\\\\\\\f12d\\\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-style:normal;font-weight:400}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\\\"\\\\\\\\f12e\\\"}.video-js{background-color:#000;box-sizing:border-box;color:#fff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:1;padding:0;position:relative;vertical-align:top;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{height:100%!important;width:100%!important}.video-js[tabindex=\\\"-1\\\"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{max-width:100%;width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js .vjs-tech,.video-js.vjs-fill:not(.vjs-audio-only-mode){height:100%;width:100%}.video-js .vjs-tech{left:0;position:absolute;top:0}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{height:100%;margin:0;padding:0}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{display:block;height:100%!important;padding-top:0!important;width:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{background-color:rgba(0,0,0,.7);bottom:10%;font-size:2em;padding:.5em;position:absolute;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{cursor:default;opacity:.5}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{background-color:#000;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:18px;height:150px;margin:0 auto;padding:20px;text-align:center;width:300px}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{background-color:#2b333f;background-color:rgba(43,51,63,.7);border:.06666em solid #fff;border-radius:.3em;cursor:pointer;display:block;font-size:3em;height:1.63332em;left:50%;line-height:1.5em;margin-left:-1.5em;margin-top:-.81666em;opacity:1;padding:0;position:absolute;top:50%;transition:all .4s;width:3em}.vjs-big-play-button .vjs-svg-icon{height:1em;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%);width:1em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{background-color:#73859f;background-color:rgba(115,133,159,.5);border-color:#fff;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-decoration:none;text-transform:none;transition:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{box-shadow:none;outline:.0625em solid #fff}.vjs-control .vjs-button{height:100%;width:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;font-family:Arial,Helvetica,sans-serif;margin:0;overflow:auto;padding:0}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;font-size:1.2em;justify-content:center;line-height:1.4em;list-style:none;margin:0;padding:.2em 0;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:none}.vjs-menu li.vjs-menu-title{cursor:default;font-size:1em;font-weight:700;line-height:2em;margin:0 0 .3em;padding:0;text-align:center;text-transform:uppercase}.vjs-menu-button-popup .vjs-menu{border-top-color:rgba(43,51,63,.7);bottom:0;display:none;height:0;left:-3em;margin-bottom:1.5em;position:absolute;width:10em}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:1.5em;max-height:15em;position:absolute;width:100%}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{overflow:hidden;transition:all .4s}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{height:100%;left:4em;margin:0;opacity:0;padding:0;position:absolute;top:0;transition:all .4s;width:auto}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{height:100%;margin:0;overflow:hidden;width:auto}.video-js .vjs-control-bar{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:0;display:none;height:3em;left:0;position:absolute;right:0;width:100%}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;opacity:1;transition:visibility .1s,opacity .1s;visibility:visible}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s;visibility:visible}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;pointer-events:auto;visibility:visible}.video-js .vjs-control{flex:none;height:100%;margin:0;padding:0;position:relative;text-align:center;width:4em}.video-js .vjs-control.vjs-visible-text{padding-left:1em;padding-right:1em;width:auto}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{align-items:center;cursor:pointer;display:flex;flex:auto;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{align-items:center;display:flex}.video-js .vjs-progress-holder{flex:auto;height:.3em;transition:all .2s}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{display:block;height:100%;margin:0;padding:0;position:absolute;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;line-height:.35em;position:absolute;right:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{height:.9em;line-height:.15em;pointer-events:none;position:absolute;right:-.4em;top:-.35em;width:.9em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{background-color:#000;display:none;height:100%;position:absolute;width:1px;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-time-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.video-js .vjs-slider{cursor:pointer;margin:0 .45em;padding:0;position:relative;-webkit-touch-callout:none;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{box-shadow:0 0 1em #fff;text-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;display:flex;margin-right:1em}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{height:1px;margin-left:-1px;opacity:0;visibility:visible;width:1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s;visibility:visible}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{height:3em;margin-right:0;width:5em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{transition:width .1s;width:10em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;width:3em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{height:.3em;width:5em}.vjs-volume-bar.vjs-slider-vertical{height:5em;margin:1.35em auto;width:.3em}.video-js .vjs-volume-level{background-color:#fff;bottom:0;left:0;position:absolute}.video-js .vjs-volume-level:before{font-size:.9em;position:absolute;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{left:-.3em;top:-.5em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{height:.9em;pointer-events:none;position:absolute;width:.9em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{background-color:#2b333f;background-color:rgba(43,51,63,.7);bottom:8em;height:8em;width:3em}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{background-color:#000;display:none;height:1px;position:absolute;width:100%;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{height:100%;width:1px}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{opacity:0;transition:visibility 1s,opacity 1s;visibility:hidden}.vjs-mouse-display .vjs-volume-tooltip{background-color:#000;background-color:rgba(0,0,0,.8);color:#fff}.vjs-poster{bottom:0;cursor:pointer;display:inline-block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;vertical-align:middle}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.video-js .vjs-live-control{align-items:flex-start;display:flex;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;display:inline-flex;flex:none;font-size:1em;height:100%;line-height:3em;min-width:4em;padding-left:.5em;padding-right:.5em;width:auto}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{color:#888;margin-right:.5em}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{height:1em;pointer-events:none;width:1em;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;padding-left:1em;padding-right:1em;width:auto}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{bottom:3em;left:0;pointer-events:none;position:absolute;right:0;top:0}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;margin-bottom:.1em;text-align:center}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{bottom:0;left:0;right:0;top:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{height:100%;left:0;position:absolute;top:0;width:100%}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;pointer-events:none;text-align:center}.vjs-playback-rate .vjs-menu{left:0;width:4em}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{background-clip:padding-box;border:.6em solid rgba(43,51,63,.7);border-radius:50%;box-sizing:border-box;display:none;height:5em;left:50%;opacity:.85;position:absolute;text-align:left;top:50%;transform:translate(-50%,-50%);visibility:hidden;width:5em}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{align-items:center;animation:vjs-spinner-show 0s linear .3s forwards;display:flex;justify-content:center}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{border:inherit;border-color:#fff transparent transparent;border-radius:inherit;box-sizing:inherit;content:\\\"\\\";height:inherit;opacity:1;position:absolute;width:inherit}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{animation-delay:.44s;border-top-color:#fff}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{height:1.5em;width:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\"\\\\\\\\f10c\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{display:inline-block;margin-bottom:-.1em;vertical-align:middle}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{content:\\\" \\\\\\\\f12e\\\";font-family:VideoJS;font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{display:block;flex:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-bottom:.5em;margin-right:1em}.vjs-text-track-settings fieldset{border:none;margin:10px}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-size:1.2em;font-weight:700}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{background-image:linear-gradient(0deg,#fff 88%,#73859f);outline-style:solid;outline-width:medium}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);border-radius:2px;color:#2b333f;cursor:pointer}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;transition:opacity .1s;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-transient-button{align-items:center;background-color:rgba(50,50,50,.5);cursor:pointer;display:flex;height:3em;justify-content:center;opacity:1;position:absolute;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:rgba(50,50,50,.9)}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{border:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:none}.video-js :focus:not(:focus-visible){outline:none}');var Ae=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\\\"default\\\")?e.default:e}function je(e){if(e.__esModule)return e;var t=e.default;if(\\\"function\\\"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,\\\"__esModule\\\",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),i}var De,Pe=\\\"undefined\\\"!=typeof window?window:void 0!==Ae?Ae:\\\"undefined\\\"!=typeof self?self:{},Le=Ie(Pe),Oe=void 0!==Ae?Ae:\\\"undefined\\\"!=typeof window?window:{},Ne=je(Object.freeze({__proto__:null,default:{}}));\\\"undefined\\\"!=typeof document?De=document:(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"])||(De=Oe[\\\"__GLOBAL_DOCUMENT_CACHE@4\\\"]=Ne);var Me=De,Re=Ie(Me),Ue={exports:{}},Be={exports:{}};!function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Be);var Fe=Be.exports,qe=function(e){if(!e)return!1;var t=$e.call(e);return\\\"[object Function]\\\"===t||\\\"function\\\"==typeof e&&\\\"[object RegExp]\\\"!==t||\\\"undefined\\\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},$e=Object.prototype.toString;function ze(e,t){var i=\\\"undefined\\\"!=typeof Symbol&&e[Symbol.iterator]||e[\\\"@@iterator\\\"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if(\\\"string\\\"==typeof e)return He(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);\\\"Object\\\"===i&&e.constructor&&(i=e.constructor.name);if(\\\"Map\\\"===i||\\\"Set\\\"===i)return Array.from(e);if(\\\"Arguments\\\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return He(e,t)}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\")}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var Ve=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,s=ze(this.getForType(e));!(i=s()).done;){var n=i.value;try{t=n(t)}catch(e){}}return t},e}(),We=Ve,Ge=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,s=t.delayFactor,n=t.fuzzFactor,r=t.initialDelay;return new Xe({maxAttempts:i||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:n||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),Xe=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),Ye=Pe;var Ke=function(e,t){return void 0===t&&(t=!1),function(i,s,n){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var r=n;if(t)if(Ye.TextDecoder){var a=function(e){void 0===e&&(e=\\\"\\\");return e.toLowerCase().split(\\\";\\\").reduce(function(e,t){var i=t.split(\\\"=\\\"),s=i[0],n=i[1];return\\\"charset\\\"===s.trim()?n.trim():e},\\\"utf-8\\\")}(s.headers&&s.headers[\\\"content-type\\\"]);try{r=new TextDecoder(a).decode(n)}catch(e){}}else r=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:r})}else e(null,n)}},Qe=Pe,Je=Fe,Ze=qe,et=We,tt=Ge;nt.httpHandler=Ke,nt.requestInterceptorsStorage=new et,nt.responseInterceptorsStorage=new et,nt.retryManager=new tt;\\n/**\\n\\t * @license\\n\\t * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n\\t * Copyright (c) 2014 David Björklund\\n\\t * Available under the MIT license\\n\\t * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n\\t */\\nvar it=function(e){var t={};return e?(e.trim().split(\\\"\\\\n\\\").forEach(function(e){var i=e.indexOf(\\\":\\\"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]}),t):t};function st(e,t,i){var s=e;return Ze(t)?(i=t,\\\"string\\\"==typeof e&&(s={uri:e})):s=Je({},t,{uri:e}),s.callback=i,s}function nt(e,t,i){return rt(t=st(e,t,i))}function rt(e){if(void 0===e.callback)throw new Error(\\\"callback argument missing\\\");if(e.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=nt.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var s=!1,n=function(t,i,n){s||(s=!0,e.callback(t,i,n))};function r(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if(\\\"document\\\"===e.responseType)return e.responseXML;var t=e.responseXML&&\\\"parsererror\\\"===e.responseXML.documentElement.nodeName;if(\\\"\\\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(\\\"\\\"+(t||\\\"Unknown XMLHttpRequest Error\\\"))),t.statusCode=0,c||!nt.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var i={headers:v.headers||{},body:v.body,responseUrl:d.responseURL,responseType:d.responseType},s=nt.responseInterceptorsStorage.execute(e.requestType,i);v.body=s.body,v.headers=s.headers}return n(t,v)}e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=d,rt(e)},e.retry.getCurrentFuzzedDelay())}function o(){if(!c){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var i=v,s=null;if(0!==t?(i={body:r(),statusCode:t,method:p,headers:{},url:h,rawRequest:d},d.getAllResponseHeaders&&(i.headers=it(d.getAllResponseHeaders()))):s=new Error(\\\"Internal XMLHttpRequest Error\\\"),e.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:d.responseURL,responseType:d.responseType},o=nt.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return n(s,i,i.body)}}var l,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new nt.XDomainRequest:new nt.XMLHttpRequest);var u,h=d.url=e.uri||e.url,p=d.method=e.method||\\\"GET\\\",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:d};if(\\\"json\\\"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept=\\\"application/json\\\"),\\\"GET\\\"!==p&&\\\"HEAD\\\"!==p&&(g[\\\"content-type\\\"]||g[\\\"Content-Type\\\"]||(g[\\\"Content-Type\\\"]=\\\"application/json\\\"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4!==d.readyState||nt.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},d.onload=o,d.onerror=a,d.onprogress=function(){},d.onabort=function(){c=!0,clearTimeout(e.retryTimeout)},d.ontimeout=a,d.open(p,h,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,d.abort(\\\"timeout\\\");var e=new Error(\\\"XMLHttpRequest timeout\\\");e.code=\\\"ETIMEDOUT\\\",a(e)}},e.timeout)),d.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&d.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\");return\\\"responseType\\\"in e&&(d.responseType=e.responseType),\\\"beforeSend\\\"in e&&\\\"function\\\"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}Ue.exports=nt,Ue.exports.default=nt,nt.XMLHttpRequest=Qe.XMLHttpRequest||function(){},nt.XDomainRequest=\\\"withCredentials\\\"in new nt.XMLHttpRequest?nt.XMLHttpRequest:Qe.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\\\"get\\\",\\\"put\\\",\\\"post\\\",\\\"patch\\\",\\\"head\\\",\\\"delete\\\"],function(e){nt[\\\"delete\\\"===e?\\\"del\\\":e]=function(t,i,s){return(i=st(t,i,s)).method=e.toUpperCase(),rt(i)}});var at=Ie(Ue.exports),ot={exports:{}},lt=Me,ct=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error(\\\"Object.create shim only accepts one parameter.\\\");return e.prototype=t,new e}}();function dt(e,t){this.name=\\\"ParsingError\\\",this.code=e.code,this.message=t||e.message}function ut(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\\\":\\\",\\\"\\\"),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function ht(){this.values=ct(null)}function pt(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if(\\\"string\\\"==typeof n[r]){var a=n[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function mt(e,t,i){var s=e;function n(){var t=ut(e);if(null===t)throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed timestamp: \\\"+s);return e=e.replace(/^[^\\\\sa-zA-Z-]+/,\\\"\\\"),t}function r(){e=e.replace(/^\\\\s+/,\\\"\\\")}if(r(),t.startTime=n(),r(),\\\"--\\\\x3e\\\"!==e.substr(0,3))throw new dt(dt.Errors.BadTimeStamp,\\\"Malformed time stamp (time stamps must be separated by '--\\\\x3e'): \\\"+s);e=e.substr(3),r(),t.endTime=n(),r(),function(e,t){var s=new ht;pt(e,function(e,t){switch(e){case\\\"region\\\":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case\\\"vertical\\\":s.alt(e,t,[\\\"rl\\\",\\\"lr\\\"]);break;case\\\"line\\\":var r=t.split(\\\",\\\"),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set(\\\"snapToLines\\\",!1),s.alt(e,a,[\\\"auto\\\"]),2===r.length&&s.alt(\\\"lineAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"position\\\":r=t.split(\\\",\\\"),s.percent(e,r[0]),2===r.length&&s.alt(\\\"positionAlign\\\",r[1],[\\\"start\\\",\\\"center\\\",\\\"end\\\"]);break;case\\\"size\\\":s.percent(e,t);break;case\\\"align\\\":s.alt(e,t,[\\\"start\\\",\\\"center\\\",\\\"end\\\",\\\"left\\\",\\\"right\\\"])}},/:/,/\\\\s/),t.region=s.get(\\\"region\\\",null),t.vertical=s.get(\\\"vertical\\\",\\\"\\\");try{t.line=s.get(\\\"line\\\",\\\"auto\\\")}catch(e){}t.lineAlign=s.get(\\\"lineAlign\\\",\\\"start\\\"),t.snapToLines=s.get(\\\"snapToLines\\\",!0),t.size=s.get(\\\"size\\\",100);try{t.align=s.get(\\\"align\\\",\\\"center\\\")}catch(e){t.align=s.get(\\\"align\\\",\\\"middle\\\")}try{t.position=s.get(\\\"position\\\",\\\"auto\\\")}catch(e){t.position=s.get(\\\"position\\\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get(\\\"positionAlign\\\",{start:\\\"start\\\",left:\\\"start\\\",center:\\\"center\\\",middle:\\\"center\\\",end:\\\"end\\\",right:\\\"end\\\"},t.align)}(e,t)}dt.prototype=ct(Error.prototype),dt.prototype.constructor=dt,dt.Errors={BadSignature:{code:0,message:\\\"Malformed WebVTT signature.\\\"},BadTimeStamp:{code:1,message:\\\"Malformed time stamp.\\\"}},ht.prototype={set:function(e,t){this.get(e)||\\\"\\\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},integer:function(e,t){/^-?\\\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var gt=lt.createElement&&lt.createElement(\\\"textarea\\\"),ft={c:\\\"span\\\",i:\\\"i\\\",b:\\\"b\\\",u:\\\"u\\\",ruby:\\\"ruby\\\",rt:\\\"rt\\\",v:\\\"span\\\",lang:\\\"span\\\"},yt={white:\\\"rgba(255,255,255,1)\\\",lime:\\\"rgba(0,255,0,1)\\\",cyan:\\\"rgba(0,255,255,1)\\\",red:\\\"rgba(255,0,0,1)\\\",yellow:\\\"rgba(255,255,0,1)\\\",magenta:\\\"rgba(255,0,255,1)\\\",blue:\\\"rgba(0,0,255,1)\\\",black:\\\"rgba(0,0,0,1)\\\"},vt={v:\\\"title\\\",lang:\\\"lang\\\"},bt={rt:\\\"ruby\\\"};function _t(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return gt.innerHTML=e,e=gt.textContent,gt.textContent=\\\"\\\",e}function n(e,t){return!bt[t.localName]||bt[t.localName]===e.localName}function r(t,i){var s=ft[t];if(!s)return null;var n=e.document.createElement(s),r=vt[t];return r&&i&&(n[r]=i.trim()),n}for(var a,o=e.document.createElement(\\\"div\\\"),l=o,c=[];null!==(a=i());)if(\\\"<\\\"!==a[0])l.appendChild(e.document.createTextNode(s(a)));else{if(\\\"/\\\"===a[1]){c.length&&c[c.length-1]===a.substr(2).replace(\\\">\\\",\\\"\\\")&&(c.pop(),l=l.parentNode);continue}var d,u=ut(a.substr(1,a.length-2));if(u){d=e.document.createProcessingInstruction(\\\"timestamp\\\",u),l.appendChild(d);continue}var h=a.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);if(!h)continue;if(!(d=r(h[1],h[3])))continue;if(!n(l,d))continue;if(h[2]){var p=h[2].split(\\\".\\\");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(yt.hasOwnProperty(i)){var s=t?\\\"background-color\\\":\\\"color\\\",n=yt[i];d.style[s]=n}}),d.className=p.join(\\\" \\\")}c.push(h[1]),l.appendChild(d),l=d}return o}var Tt=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function St(e){for(var t=0;t<Tt.length;t++){var i=Tt[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function wt(e){var t=[],i=\\\"\\\";if(!e||!e.childNodes)return\\\"ltr\\\";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\\\\n|\\\\r)/);return r?(e.length=0,r[0]):i}return\\\"ruby\\\"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r<i.length;r++)if(St(i.charCodeAt(r)))return\\\"rtl\\\";return\\\"ltr\\\"}function kt(){}function xt(e,t,i){kt.call(this),this.cue=t,this.cueDiv=_t(e,t.text);var s={color:\\\"rgba(255, 255, 255, 1)\\\",backgroundColor:\\\"rgba(0, 0, 0, 0.8)\\\",position:\\\"relative\\\",left:0,right:0,top:0,bottom:0,display:\\\"inline\\\",writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\"};this.applyStyles(s,this.cueDiv),this.div=e.document.createElement(\\\"div\\\"),s={direction:wt(this.cueDiv),writingMode:\\\"\\\"===t.vertical?\\\"horizontal-tb\\\":\\\"lr\\\"===t.vertical?\\\"vertical-lr\\\":\\\"vertical-rl\\\",unicodeBidi:\\\"plaintext\\\",textAlign:\\\"middle\\\"===t.align?\\\"center\\\":t.align,font:i.font,whiteSpace:\\\"pre-line\\\",position:\\\"absolute\\\"},this.applyStyles(s),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case\\\"start\\\":case\\\"line-left\\\":n=t.position;break;case\\\"center\\\":n=t.position-t.size/2;break;case\\\"end\\\":case\\\"line-right\\\":n=t.position-t.size}\\\"\\\"===t.vertical?this.applyStyles({left:this.formatStyle(n,\\\"%\\\"),width:this.formatStyle(t.size,\\\"%\\\")}):this.applyStyles({top:this.formatStyle(n,\\\"%\\\"),height:this.formatStyle(t.size,\\\"%\\\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\\\"px\\\"),bottom:this.formatStyle(e.bottom,\\\"px\\\"),left:this.formatStyle(e.left,\\\"px\\\"),right:this.formatStyle(e.right,\\\"px\\\"),height:this.formatStyle(e.height,\\\"px\\\"),width:this.formatStyle(e.width,\\\"px\\\")})}}function Et(e){var t,i,s,n;if(e.div){i=e.div.offsetHeight,s=e.div.offsetWidth,n=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||s,this.lineHeight=void 0!==t?t:e.lineHeight}function Ct(e,t,i,s){var n=new Et(t),r=t.cue,a=function(e){if(\\\"number\\\"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;n<i.length&&i[n]!==t;n++)\\\"showing\\\"===i[n].mode&&s++;return-1*++s}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case\\\"\\\":o=[\\\"+y\\\",\\\"-y\\\"],l=\\\"height\\\";break;case\\\"rl\\\":o=[\\\"+x\\\",\\\"-x\\\"],l=\\\"width\\\";break;case\\\"lr\\\":o=[\\\"-x\\\",\\\"+x\\\"],l=\\\"width\\\"}var c=n.lineHeight,d=c*Math.round(a),u=i[l]+c,h=o[0];Math.abs(d)>u&&(d=d<0?-1:1,d*=Math.ceil(u/c)*c),a<0&&(d+=\\\"\\\"===r.vertical?i.height:i.width,o=o.reverse()),n.move(h,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case\\\"center\\\":a-=p/2;break;case\\\"end\\\":a-=p}switch(r.vertical){case\\\"\\\":t.applyStyles({top:t.formatStyle(a,\\\"%\\\")});break;case\\\"rl\\\":t.applyStyles({left:t.formatStyle(a,\\\"%\\\")});break;case\\\"lr\\\":t.applyStyles({right:t.formatStyle(a,\\\"%\\\")})}o=[\\\"+y\\\",\\\"-x\\\",\\\"+x\\\",\\\"-y\\\"],n=new Et(t)}var m=function(e,t){for(var n,r=new Et(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(n=new Et(e),a=l),e=new Et(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function At(){}kt.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},kt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},xt.prototype=ct(kt.prototype),xt.prototype.constructor=xt,Et.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\\\"+x\\\":this.left+=t,this.right+=t;break;case\\\"-x\\\":this.left-=t,this.right-=t;break;case\\\"+y\\\":this.top+=t,this.bottom+=t;break;case\\\"-y\\\":this.top-=t,this.bottom-=t}},Et.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Et.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Et.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Et.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\\\"+x\\\":return this.left<e.left;case\\\"-x\\\":return this.right>e.right;case\\\"+y\\\":return this.top<e.top;case\\\"-y\\\":return this.bottom>e.bottom}},Et.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Et.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Et.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},At.StringDecoder=function(){return{decode:function(e){if(!e)return\\\"\\\";if(\\\"string\\\"!=typeof e)throw new Error(\\\"Error - expected string data.\\\");return decodeURIComponent(encodeURIComponent(e))}}},At.convertCueToDOMTree=function(e,t){return e&&t?_t(e,t):null};At.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement(\\\"div\\\");if(s.style.position=\\\"absolute\\\",s.style.left=\\\"0\\\",s.style.right=\\\"0\\\",s.style.top=\\\"0\\\",s.style.bottom=\\\"0\\\",s.style.margin=\\\"1.5%\\\",i.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var n=[],r=Et.getSimpleBoxPosition(s),a={font:Math.round(.05*r.height*100)/100+\\\"px sans-serif\\\"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new xt(e,o,a),s.appendChild(i.div),Ct(0,i,r,n),o.displayState=i.div,n.push(Et.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)s.appendChild(t[o].displayState)},At.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state=\\\"INITIAL\\\",this.buffer=\\\"\\\",this.decoder=i||new TextDecoder(\\\"utf8\\\"),this.regionList=[]},At.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof dt))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&\\\"\\\\r\\\"!==e[i]&&\\\"\\\\n\\\"!==e[i];)++i;var s=e.substr(0,i);return\\\"\\\\r\\\"===e[i]&&++i,\\\"\\\\n\\\"===e[i]&&++i,t.buffer=e.substr(i),s}function s(e){e.match(/X-TIMESTAMP-MAP/)?pt(e,function(e,i){if(\\\"X-TIMESTAMP-MAP\\\"===e)!function(e){var i=new ht;pt(e,function(e,t){switch(e){case\\\"MPEGT\\\":i.integer(e+\\\"S\\\",t);break;case\\\"LOCA\\\":i.set(e+\\\"L\\\",ut(t))}},/[^\\\\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get(\\\"MPEGTS\\\"),LOCAL:i.get(\\\"LOCAL\\\")})}(i)},/=/):pt(e,function(e,i){if(\\\"Region\\\"===e)!function(e){var i=new ht;if(pt(e,function(e,t){switch(e){case\\\"id\\\":i.set(e,t);break;case\\\"width\\\":i.percent(e,t);break;case\\\"lines\\\":i.integer(e,t);break;case\\\"regionanchor\\\":case\\\"viewportanchor\\\":var s=t.split(\\\",\\\");if(2!==s.length)break;var n=new ht;if(n.percent(\\\"x\\\",s[0]),n.percent(\\\"y\\\",s[1]),!n.has(\\\"x\\\")||!n.has(\\\"y\\\"))break;i.set(e+\\\"X\\\",n.get(\\\"x\\\")),i.set(e+\\\"Y\\\",n.get(\\\"y\\\"));break;case\\\"scroll\\\":i.alt(e,t,[\\\"up\\\"])}},/=/,/\\\\s/),i.has(\\\"id\\\")){var s=new(t.vttjs.VTTRegion||t.window.VTTRegion);s.width=i.get(\\\"width\\\",100),s.lines=i.get(\\\"lines\\\",3),s.regionAnchorX=i.get(\\\"regionanchorX\\\",0),s.regionAnchorY=i.get(\\\"regionanchorY\\\",100),s.viewportAnchorX=i.get(\\\"viewportanchorX\\\",0),s.viewportAnchorY=i.get(\\\"viewportanchorY\\\",100),s.scroll=i.get(\\\"scroll\\\",\\\"\\\"),t.onregion&&t.onregion(s),t.regionList.push({id:i.get(\\\"id\\\"),region:s})}}(i)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n;if(\\\"INITIAL\\\"===t.state){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;var r=(n=i()).match(/^WEBVTT([ \\\\t].*)?$/);if(!r||!r[0])throw new dt(dt.Errors.BadSignature);t.state=\\\"HEADER\\\"}for(var a=!1;t.buffer;){if(!/\\\\r\\\\n|\\\\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case\\\"HEADER\\\":/:/.test(n)?s(n):n||(t.state=\\\"ID\\\");continue;case\\\"NOTE\\\":n||(t.state=\\\"ID\\\");continue;case\\\"ID\\\":if(/^NOTE($|[ \\\\t])/.test(n)){t.state=\\\"NOTE\\\";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,\\\"\\\");try{t.cue.align=\\\"center\\\"}catch(e){t.cue.align=\\\"middle\\\"}if(t.state=\\\"CUE\\\",-1===n.indexOf(\\\"--\\\\x3e\\\")){t.cue.id=n;continue}case\\\"CUE\\\":try{mt(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state=\\\"BADCUE\\\";continue}t.state=\\\"CUETEXT\\\";continue;case\\\"CUETEXT\\\":var o=-1!==n.indexOf(\\\"--\\\\x3e\\\");if(!n||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"ID\\\";continue}t.cue.text&&(t.cue.text+=\\\"\\\\n\\\"),t.cue.text+=n.replace(/\\\\u2028/g,\\\"\\\\n\\\").replace(/u2029/g,\\\"\\\\n\\\");continue;case\\\"BADCUE\\\":n||(t.state=\\\"ID\\\");continue}}}catch(e){t.reportOrThrowError(e),\\\"CUETEXT\\\"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=\\\"INITIAL\\\"===t.state?\\\"BADWEBVTT\\\":\\\"BADCUE\\\"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||\\\"HEADER\\\"===e.state)&&(e.buffer+=\\\"\\\\n\\\\n\\\",e.parse()),\\\"INITIAL\\\"===e.state)throw new dt(dt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var It=At,jt={\\\"\\\":1,lr:1,rl:1},Dt={start:1,center:1,end:1,left:1,right:1,auto:1,\\\"line-left\\\":1,\\\"line-right\\\":1};function Pt(e){return\\\"string\\\"==typeof e&&(!!Dt[e.toLowerCase()]&&e.toLowerCase())}function Lt(e,t,i){this.hasBeenReset=!1;var s=\\\"\\\",n=!1,r=e,a=t,o=i,l=null,c=\\\"\\\",d=!0,u=\\\"auto\\\",h=\\\"start\\\",p=\\\"auto\\\",m=\\\"auto\\\",g=100,f=\\\"center\\\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=\\\"\\\"+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Start time must be set to a number.\\\");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"End time must be set to a number.\\\");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\\\"\\\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!jt[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if(\\\"number\\\"!=typeof e&&\\\"auto\\\"!==e)throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Pt(e);t?(h=t,this.hasBeenReset=!0):console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error(\\\"Position must be between 0 and 100.\\\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=Pt(e);t?(m=t,this.hasBeenReset=!0):console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error(\\\"Size must be between 0 and 100.\\\");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=Pt(e);if(!t)throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ot=Lt,Nt={\\\"\\\":!0,up:!0};function Mt(e){return\\\"number\\\"==typeof e&&e>=0&&e<=100}var Rt=function(){var e=100,t=3,i=0,s=100,n=0,r=100,a=\\\"\\\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Mt(t))throw new Error(\\\"Width must be between 0 and 100.\\\");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if(\\\"number\\\"!=typeof e)throw new TypeError(\\\"Lines must be set to a number.\\\");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Mt(e))throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Mt(e))throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");n=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return\\\"string\\\"==typeof e&&!!Nt[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t?console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\"):a=t}}})},Ut=Pe,Bt=ot.exports={WebVTT:It,VTTCue:Ot,VTTRegion:Rt};Ut.vttjs=Bt,Ut.WebVTT=Bt.WebVTT;var Ft=Bt.VTTCue,qt=Bt.VTTRegion,$t=Ut.VTTCue,zt=Ut.VTTRegion;Bt.shim=function(){Ut.VTTCue=Ft,Ut.VTTRegion=qt},Bt.restore=function(){Ut.VTTCue=$t,Ut.VTTRegion=zt},Ut.VTTCue||Bt.shim();var Ht=Ie(ot.exports);function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vt.apply(null,arguments)}var Wt=\\\"https://example.com\\\",Gt=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Le.location&&Le.location.href||\\\"\\\");var i=/^\\\\/\\\\//.test(e),s=!Le.location&&!/\\\\/\\\\//i.test(e);e=new Le.URL(e,Le.location||Wt);var n=new URL(t,e);return s?n.href.slice(19):i?n.href.slice(n.protocol.length):n.href},Xt=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();function Yt(e){for(var t,i=(t=e,Le.atob?Le.atob(t):Buffer.from(t,\\\"base64\\\").toString(\\\"binary\\\")),s=new Uint8Array(i.length),n=0;n<i.length;n++)s[n]=i.charCodeAt(n);return s}\\n/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Kt extends Xt{constructor(){super(),this.buffer=\\\"\\\"}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(\\\"\\\\n\\\");t>-1;t=this.buffer.indexOf(\\\"\\\\n\\\"))this.trigger(\\\"data\\\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qt=String.fromCharCode(9),Jt=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||\\\"\\\"),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Zt=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\\\"[^\\\"]*\\\"|[^,]*))'));let s,n=i.length;for(;n--;)\\\"\\\"!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^\\\\s+|\\\\s+$/g,\\\"\\\"),s[1]=s[1].replace(/^['\\\"](.*)['\\\"]$/g,\\\"$1\\\"),t[s[0]]=s[1]);return t},ei=e=>{const t=e.split(\\\"x\\\"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class ti extends Xt{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(0===(e=e.trim()).length)return;if(\\\"#\\\"!==e[0])return void this.trigger(\\\"data\\\",{type:\\\"uri\\\",uri:e});this.tagMappers.reduce((t,i)=>{const s=i(e);return s===e?t:t.concat([s])},[e]).forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf(\\\"#EXT\\\"))if(e=e.replace(\\\"\\\\r\\\",\\\"\\\"),t=/^#EXTM3U/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"m3u\\\"});else{if(t=/^#EXTINF:([0-9\\\\.]*)?,?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"inf\\\"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"targetduration\\\"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"version\\\"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\\\\-?[0-9.]*)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"discontinuity-sequence\\\"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"playlist-type\\\"},t[1]&&(i.playlistType=t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=Vt(Jt(t[1]),{type:\\\"tag\\\",tagType:\\\"byterange\\\"}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"allow-cache\\\"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:\\\"tag\\\",tagType:\\\"map\\\"},t[1]){const e=Zt(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=Jt(e.BYTERANGE))}this.trigger(\\\"data\\\",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"stream-inf\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),i.attributes[\\\"PROGRAM-ID\\\"]&&(i.attributes[\\\"PROGRAM-ID\\\"]=parseInt(i.attributes[\\\"PROGRAM-ID\\\"],10))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"media\\\"},t[1]&&(i.attributes=Zt(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"endlist\\\"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"discontinuity\\\"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"program-date-time\\\"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"key\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes.IV&&(\\\"0x\\\"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"start\\\"},t[1]&&(i.attributes=Zt(t[1]),i.attributes[\\\"TIME-OFFSET\\\"]=parseFloat(i.attributes[\\\"TIME-OFFSET\\\"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out-cont\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-out\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"cue-in\\\"},t[1]?i.data=t[1]:i.data=\\\"\\\",void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"skip\\\"},i.attributes=Zt(t[1]),i.attributes.hasOwnProperty(\\\"SKIPPED-SEGMENTS\\\")&&(i.attributes[\\\"SKIPPED-SEGMENTS\\\"]=parseInt(i.attributes[\\\"SKIPPED-SEGMENTS\\\"],10)),i.attributes.hasOwnProperty(\\\"RECENTLY-REMOVED-DATERANGES\\\")&&(i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"]=i.attributes[\\\"RECENTLY-REMOVED-DATERANGES\\\"].split(Qt)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part\\\"},i.attributes=Zt(t[1]),[\\\"DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"INDEPENDENT\\\",\\\"GAP\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty(\\\"BYTERANGE\\\")&&(i.attributes.byterange=Jt(i.attributes.BYTERANGE)),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"server-control\\\"},i.attributes=Zt(t[1]),[\\\"CAN-SKIP-UNTIL\\\",\\\"PART-HOLD-BACK\\\",\\\"HOLD-BACK\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"CAN-SKIP-DATERANGES\\\",\\\"CAN-BLOCK-RELOAD\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"part-inf\\\"},i.attributes=Zt(t[1]),[\\\"PART-TARGET\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"preload-hint\\\"},i.attributes=Zt(t[1]),[\\\"BYTERANGE-START\\\",\\\"BYTERANGE-LENGTH\\\"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t=\\\"BYTERANGE-LENGTH\\\"===e?\\\"length\\\":\\\"offset\\\";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:\\\"tag\\\",tagType:\\\"rendition-report\\\"},i.attributes=Zt(t[1]),[\\\"LAST-MSN\\\",\\\"LAST-PART\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:\\\"tag\\\",tagType:\\\"daterange\\\"},i.attributes=Zt(t[1]),[\\\"ID\\\",\\\"CLASS\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))}),[\\\"START-DATE\\\",\\\"END-DATE\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))}),[\\\"DURATION\\\",\\\"PLANNED-DURATION\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),[\\\"END-ON-NEXT\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))}),[\\\"SCTE35-CMD\\\",\\\" SCTE35-OUT\\\",\\\"SCTE35-IN\\\"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))});const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const s=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),n=/^\\\\d+(\\\\.\\\\d+)?$/.test(i.attributes[t]);i.attributes[t]=s?i.attributes[t].toString(16):n?parseFloat(i.attributes[t]):String(i.attributes[t])}return void this.trigger(\\\"data\\\",i)}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"independent-segments\\\"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger(\\\"data\\\",{type:\\\"tag\\\",tagType:\\\"i-frames-only\\\"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"content-steering\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"i-frame-playlist\\\"},i.attributes=Zt(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=ei(i.attributes.RESOLUTION)),i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]&&(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"]=parseInt(i.attributes[\\\"AVERAGE-BANDWIDTH\\\"],10)),i.attributes[\\\"FRAME-RATE\\\"]&&(i.attributes[\\\"FRAME-RATE\\\"]=parseFloat(i.attributes[\\\"FRAME-RATE\\\"])),void this.trigger(\\\"data\\\",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:\\\"tag\\\",tagType:\\\"define\\\"},i.attributes=Zt(t[1]),void this.trigger(\\\"data\\\",i);this.trigger(\\\"data\\\",{type:\\\"tag\\\",data:e.slice(4)})}}}}else this.trigger(\\\"data\\\",{type:\\\"comment\\\",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:s}){\\\"function\\\"!=typeof i&&(i=e=>e),this.customParsers.push(n=>{if(e.exec(n))return this.trigger(\\\"data\\\",{type:\\\"custom\\\",data:i(n),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){this.tagMappers.push(i=>e.test(i)?t(i):i)}}const ii=function(e){const t={};return Object.keys(e).forEach(function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\\\\w)/g,e=>e[1].toUpperCase()))]=e[i]}),t},si=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n=\\\"#EXT-X-SERVER-CONTROL\\\",r=\\\"holdBack\\\",a=\\\"partHoldBack\\\",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger(\\\"info\\\",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger(\\\"warn\\\",{message:`${n} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),s&&!t.hasOwnProperty(a)&&(t[a]=3*s,this.trigger(\\\"info\\\",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),s&&t[a]<l&&(this.trigger(\\\"warn\\\",{message:`${n} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class ni extends Xt{constructor(e={}){super(),this.lineStream=new Kt,this.parseStream=new ti,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,\\\"https://a.com\\\").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let s,n,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}};let c=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,u=0;const h={};this.on(\\\"end\\\",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||\\\"number\\\"!=typeof c||(r.timeline=c),this.manifest.preloadSegment=r)}),this.parseStream.on(\\\"data\\\",function(e){let p,m;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const s in e.attributes)\\\"string\\\"==typeof e.attributes[s]&&(e.attributes[s]=e.attributes[s].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},\\\"allow-cache\\\"(){this.manifest.allowCache=e.allowed,\\\"allowed\\\"in e||(this.trigger(\\\"info\\\",{message:\\\"defaulting allowCache to YES\\\"}),this.manifest.allowCache=!0)},byterange(){const t={};\\\"length\\\"in e&&(r.byterange=t,t.length=e.length,\\\"offset\\\"in e||(e.offset=d)),\\\"offset\\\"in e&&(r.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){\\\"mediaSequence\\\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting media sequence to zero\\\"})),\\\"discontinuitySequence\\\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\\\"info\\\",{message:\\\"defaulting discontinuity sequence to zero\\\"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger(\\\"info\\\",{message:\\\"updating zero segment duration to a small value\\\"})),this.manifest.segments=i},key(){if(e.attributes)if(\\\"NONE\\\"!==e.attributes.METHOD)if(e.attributes.URI){if(\\\"com.apple.streamingkeydelivery\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.apple.fps.1_0\\\"]={attributes:e.attributes});if(\\\"com.microsoft.playready\\\"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.microsoft.playready\\\"]={uri:e.attributes.URI});if(\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\"===e.attributes.KEYFORMAT){return-1===[\\\"SAMPLE-AES\\\",\\\"SAMPLE-AES-CTR\\\",\\\"SAMPLE-AES-CENC\\\"].indexOf(e.attributes.METHOD)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key method provided for Widevine\\\"}):(\\\"SAMPLE-AES-CENC\\\"===e.attributes.METHOD&&this.trigger(\\\"warn\\\",{message:\\\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\\\"}),\\\"data:text/plain;base64,\\\"!==e.attributes.URI.substring(0,23)?void this.trigger(\\\"warn\\\",{message:\\\"invalid key URI provided for Widevine\\\"}):e.attributes.KEYID&&\\\"0x\\\"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection[\\\"com.widevine.alpha\\\"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Yt(e.attributes.URI.split(\\\",\\\")[1])})):void this.trigger(\\\"warn\\\",{message:\\\"invalid key ID provided for Widevine\\\"}))}e.attributes.METHOD||this.trigger(\\\"warn\\\",{message:\\\"defaulting key method to AES-128\\\"}),n={method:e.attributes.METHOD||\\\"AES-128\\\",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without URI\\\"});else n=null;else this.trigger(\\\"warn\\\",{message:\\\"ignoring key declaration without attribute list\\\"})},\\\"media-sequence\\\"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid media sequence: \\\"+e.number})},\\\"discontinuity-sequence\\\"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid discontinuity sequence: \\\"+e.number})},\\\"playlist-type\\\"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger(\\\"warn\\\",{message:\\\"ignoring unknown playlist type: \\\"+e.playlist})},map(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange),n&&(s.key=n)},\\\"stream-inf\\\"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),Vt(r.attributes,e.attributes)):this.trigger(\\\"warn\\\",{message:\\\"ignoring empty stream-inf attributes\\\"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes[\\\"GROUP-ID\\\"]&&e.attributes.NAME))return void this.trigger(\\\"warn\\\",{message:\\\"ignoring incomplete or missing media group\\\"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes[\\\"GROUP-ID\\\"]]=t[e.attributes[\\\"GROUP-ID\\\"]]||{},p=t[e.attributes[\\\"GROUP-ID\\\"]],m={default:/yes/i.test(e.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(m.language=e.attributes.LANGUAGE),e.attributes.URI&&(m.uri=e.attributes.URI),e.attributes[\\\"INSTREAM-ID\\\"]&&(m.instreamId=e.attributes[\\\"INSTREAM-ID\\\"]),e.attributes.CHARACTERISTICS&&(m.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(m.forced=/yes/i.test(e.attributes.FORCED)),p[e.attributes.NAME]=m},discontinuity(){c+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},\\\"program-date-time\\\"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger(\\\"warn\\\",{message:\\\"ignoring invalid target duration: \\\"+e.duration}):(this.manifest.targetDuration=e.duration,si.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes[\\\"TIME-OFFSET\\\"])?this.manifest.start={timeOffset:e.attributes[\\\"TIME-OFFSET\\\"],precise:e.attributes.PRECISE}:this.trigger(\\\"warn\\\",{message:\\\"ignoring start declaration without appropriate attribute list\\\"})},\\\"cue-out\\\"(){r.cueOut=e.data},\\\"cue-out-cont\\\"(){r.cueOutCont=e.data},\\\"cue-in\\\"(){r.cueIn=e.data},skip(){this.manifest.skip=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-SKIP\\\",e.attributes,[\\\"SKIPPED-SEGMENTS\\\"])},part(){a=!0;const t=this.manifest.segments.length,i=ii(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,e.attributes,[\\\"URI\\\",\\\"DURATION\\\"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty(\\\"lastPart\\\")||this.trigger(\\\"warn\\\",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},\\\"server-control\\\"(){const t=this.manifest.serverControl=ii(e.attributes);t.hasOwnProperty(\\\"canBlockReload\\\")||(t.canBlockReload=!1,this.trigger(\\\"info\\\",{message:\\\"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false\\\"})),si.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty(\\\"canSkipUntil\\\")&&this.trigger(\\\"warn\\\",{message:\\\"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set\\\"})},\\\"preload-hint\\\"(){const t=this.manifest.segments.length,i=ii(e.attributes),s=i.type&&\\\"PART\\\"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty(\\\"offset\\\")||(i.byterange.offset=s?u:0,s&&(u=i.byterange.offset+i.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,e.attributes,[\\\"TYPE\\\",\\\"URI\\\"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const s=r.preloadHints[e];s.type&&(s.type===i.type&&this.trigger(\\\"warn\\\",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},\\\"rendition-report\\\"(){const t=ii(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,s=[\\\"LAST-MSN\\\",\\\"URI\\\"];a&&s.push(\\\"LAST-PART\\\"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,s)},\\\"part-inf\\\"(){this.manifest.partInf=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-PART-INF\\\",e.attributes,[\\\"PART-TARGET\\\"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),si.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ii(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,[\\\"ID\\\",\\\"START-DATE\\\"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE\\\"}),i.duration&&i.duration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE DURATION must not be negative\\\"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE PLANNED-DURATION must not be negative\\\"});const s=!!i.endOnNext;if(s&&!i.class&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute\\\"}),s&&(i.duration||i.endDate)&&this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes\\\"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const e in h[i.id])if(i[e]&&JSON.stringify(h[i.id][e])!==JSON.stringify(i[e])){this.trigger(\\\"warn\\\",{message:\\\"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values\\\"});break}const e=this.manifest.dateRanges.findIndex(e=>e.id===i.id);this.manifest.dateRanges[e]=Vt(this.manifest.dateRanges[e],i),h[i.id]=Vt(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},\\\"independent-segments\\\"(){this.manifest.independentSegments=!0},\\\"i-frames-only\\\"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},\\\"content-steering\\\"(){this.manifest.contentSteering=ii(e.attributes),this.warnOnMissingAttributes_(\\\"#EXT-X-CONTENT-STEERING\\\",e.attributes,[\\\"SERVER-URI\\\"])},define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if(\\\"QUERYPARAM\\\"in e.attributes){if(\\\"NAME\\\"in e.attributes||\\\"IMPORT\\\"in e.attributes)return void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return\\\"NAME\\\"in e.attributes?\\\"IMPORT\\\"in e.attributes?void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: Invalid attributes\\\"}):\\\"VALUE\\\"in e.attributes&&\\\"string\\\"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):\\\"IMPORT\\\"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger(\\\"error\\\",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger(\\\"error\\\",{message:\\\"EXT-X-DEFINE: No attribute\\\"})},\\\"i-frame-playlist\\\"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:c}),this.warnOnMissingAttributes_(\\\"#EXT-X-I-FRAME-STREAM-INF\\\",e.attributes,[\\\"BANDWIDTH\\\",\\\"URI\\\"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!(\\\"duration\\\"in r)&&(this.trigger(\\\"warn\\\",{message:\\\"defaulting segment duration to the target duration\\\"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=c,s&&(r.map=s),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger(\\\"warn\\\",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const s=[];i.forEach(function(e){t.hasOwnProperty(e)||s.push(e)}),s.length&&this.trigger(\\\"warn\\\",{message:`${e} lacks required attribute(s): ${s.join(\\\", \\\")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(\\\"\\\\n\\\"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger(\\\"warn\\\",{message:\\\"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag\\\"}),this.lastProgramDateTime=null,this.trigger(\\\"end\\\")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var ri,ai,oi={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},li=[\\\"video\\\",\\\"audio\\\",\\\"text\\\"],ci=[\\\"Video\\\",\\\"Audio\\\",\\\"Text\\\"],di=function(e){return e?e.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i,function(e,t,i){return\\\"avc1.\\\"+(\\\"00\\\"+Number(t).toString(16)).slice(-2)+\\\"00\\\"+(\\\"00\\\"+Number(i).toString(16)).slice(-2)}):e},ui=function(e){void 0===e&&(e=\\\"\\\");var t=e.split(\\\",\\\"),i=[];return t.forEach(function(e){var t;e=e.trim(),li.forEach(function(s){var n=oi[s].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=s;var r=e.substring(0,n[1].length),a=e.replace(r,\\\"\\\");i.push({type:r,details:a,mediaType:s})}}),t||i.push({type:e,details:\\\"\\\",mediaType:\\\"unknown\\\"})}),i},hi=function(e){return void 0===e&&(e=\\\"\\\"),oi.audio.test(e.trim().toLowerCase())},pi=function(e){if(e&&\\\"string\\\"==typeof e){var t,i=e.toLowerCase().split(\\\",\\\").map(function(e){return di(e.trim())}),s=\\\"video\\\";1===i.length&&hi(i[0])?s=\\\"audio\\\":1===i.length&&(void 0===(t=i[0])&&(t=\\\"\\\"),oi.text.test(t.trim().toLowerCase()))&&(s=\\\"application\\\");var n=\\\"mp4\\\";return i.every(function(e){return oi.mp4.test(e)})?n=\\\"mp4\\\":i.every(function(e){return oi.webm.test(e)})?n=\\\"webm\\\":i.every(function(e){return oi.ogg.test(e)})&&(n=\\\"ogg\\\"),s+\\\"/\\\"+n+';codecs=\\\"'+e+'\\\"'}},mi=function(e,t){return void 0===e&&(e=\\\"\\\"),void 0===t&&(t=!1),Le.MediaSource&&Le.MediaSource.isTypeSupported&&Le.MediaSource.isTypeSupported(pi(e))||t&&Le.ManagedMediaSource&&Le.ManagedMediaSource.isTypeSupported&&Le.ManagedMediaSource.isTypeSupported(pi(e))||!1},gi=function(e){return void 0===e&&(e=\\\"\\\"),e.toLowerCase().split(\\\",\\\").every(function(e){e=e.trim();for(var t=0;t<ci.length;t++){if(oi[\\\"muxer\\\"+ci[t]].test(e))return!0}return!1})},fi=\\\"mp4a.40.2\\\",yi=/^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i,vi=/^application\\\\/dash\\\\+xml/i,bi=function(e){return yi.test(e)?\\\"hls\\\":vi.test(e)?\\\"dash\\\":\\\"application/vnd.videojs.vhs+json\\\"===e?\\\"vhs-json\\\":null},_i=function(e){return\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ti=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||_i(e)||e instanceof ArrayBuffer||(e=\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Si=Le.BigInt||Number,wi=[Si(\\\"0x1\\\"),Si(\\\"0x100\\\"),Si(\\\"0x10000\\\"),Si(\\\"0x1000000\\\"),Si(\\\"0x100000000\\\"),Si(\\\"0x10000000000\\\"),Si(\\\"0x1000000000000\\\"),Si(\\\"0x100000000000000\\\"),Si(\\\"0x10000000000000000\\\")];ri=new Uint16Array([65484]),255===(ai=new Uint8Array(ri.buffer,ri.byteOffset,ri.byteLength))[0]||ai[0];var ki=function(e,t){var i=void 0===t?{}:t,s=i.signed,n=void 0!==s&&s,r=i.le,a=void 0!==r&&r;e=Ti(e);var o=a?\\\"reduce\\\":\\\"reduceRight\\\",l=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,s){var n=a?s:Math.abs(s+1-e.length);return t+Si(i)*wi[n]},Si(0));if(n){var c=wi[e.length]/Si(2)-Si(1);(l=Si(l))>c&&(l-=c,l-=c,l-=Si(2))}return Number(l)},xi=function(e,t){var i={}.le,s=void 0!==i&&i;(\\\"bigint\\\"!=typeof e&&\\\"number\\\"!=typeof e||\\\"number\\\"==typeof e&&e!=e)&&(e=0),e=Si(e);for(var n,r=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=s?o:Math.abs(o+1-a.length);a[l]=Number(e/wi[o]&Si(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},Ei=function(e,t){if(\\\"string\\\"!=typeof e&&e&&\\\"function\\\"==typeof e.toString&&(e=e.toString()),\\\"string\\\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i},Ci=function(e,t,i){var s=void 0===i?{}:i,n=s.offset,r=void 0===n?0:n,a=s.mask,o=void 0===a?[]:a;e=Ti(e);var l=(t=Ti(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&l.call(t,function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])})},Ai={},Ii={};function ji(e,t){return void 0===t&&(t=Object),t&&\\\"function\\\"==typeof t.freeze?t.freeze(e):e}var Di=ji({HTML:\\\"text/html\\\",isHTML:function(e){return e===Di.HTML},XML_APPLICATION:\\\"application/xml\\\",XML_TEXT:\\\"text/xml\\\",XML_XHTML_APPLICATION:\\\"application/xhtml+xml\\\",XML_SVG_IMAGE:\\\"image/svg+xml\\\"}),Pi=ji({HTML:\\\"http://www.w3.org/1999/xhtml\\\",isHTML:function(e){return e===Pi.HTML},SVG:\\\"http://www.w3.org/2000/svg\\\",XML:\\\"http://www.w3.org/XML/1998/namespace\\\",XMLNS:\\\"http://www.w3.org/2000/xmlns/\\\"});Ii.assign=function(e,t){if(null===e||\\\"object\\\"!=typeof e)throw new TypeError(\\\"target is not an object\\\");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ii.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&\\\"function\\\"==typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}},Ii.freeze=ji,Ii.MIME_TYPE=Di,Ii.NAMESPACE=Pi;var Li=Ii,Oi=Li.find,Ni=Li.NAMESPACE;function Mi(e){return\\\"\\\"!==e}function Ri(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Ui(e){if(!e)return[];var t=function(e){return e?e.split(/[\\\\t\\\\n\\\\f\\\\r ]+/).filter(Mi):[]}(e);return Object.keys(t.reduce(Ri,{}))}function Bi(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Fi(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,Bi(i,s=new s),e.prototype=i=s}i.constructor!=e&&(\\\"function\\\"!=typeof e&&console.error(\\\"unknown Class:\\\"+e),i.constructor=e)}var qi={},$i=qi.ELEMENT_NODE=1,zi=qi.ATTRIBUTE_NODE=2,Hi=qi.TEXT_NODE=3,Vi=qi.CDATA_SECTION_NODE=4,Wi=qi.ENTITY_REFERENCE_NODE=5,Gi=qi.ENTITY_NODE=6,Xi=qi.PROCESSING_INSTRUCTION_NODE=7,Yi=qi.COMMENT_NODE=8,Ki=qi.DOCUMENT_NODE=9,Qi=qi.DOCUMENT_TYPE_NODE=10,Ji=qi.DOCUMENT_FRAGMENT_NODE=11,Zi=qi.NOTATION_NODE=12,es={},ts={};es.INDEX_SIZE_ERR=(ts[1]=\\\"Index size error\\\",1),es.DOMSTRING_SIZE_ERR=(ts[2]=\\\"DOMString size error\\\",2);var is=es.HIERARCHY_REQUEST_ERR=(ts[3]=\\\"Hierarchy request error\\\",3);es.WRONG_DOCUMENT_ERR=(ts[4]=\\\"Wrong document\\\",4),es.INVALID_CHARACTER_ERR=(ts[5]=\\\"Invalid character\\\",5),es.NO_DATA_ALLOWED_ERR=(ts[6]=\\\"No data allowed\\\",6),es.NO_MODIFICATION_ALLOWED_ERR=(ts[7]=\\\"No modification allowed\\\",7);var ss=es.NOT_FOUND_ERR=(ts[8]=\\\"Not found\\\",8);es.NOT_SUPPORTED_ERR=(ts[9]=\\\"Not supported\\\",9);var ns=es.INUSE_ATTRIBUTE_ERR=(ts[10]=\\\"Attribute in use\\\",10);function rs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ts[e]),this.message=ts[e],Error.captureStackTrace&&Error.captureStackTrace(this,rs);return i.code=e,t&&(this.message=this.message+\\\": \\\"+t),i}function as(){}function os(e,t){this._node=e,this._refresh=t,ls(this)}function ls(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ys(e,\\\"length\\\",i.length),!e.$$length||i.length<e.$$length)for(var s=i.length;s in e;s++)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s];Bi(i,e),e._inc=t}}function cs(){}function ds(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function us(e,t,i,s){if(s?t[ds(t,s)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(s&&vs(n,e,s),function(e,t,i){e&&e._inc++;var s=i.namespaceURI;s===Ni.XMLNS&&(t._nsMap[i.prefix?i.localName:\\\"\\\"]=i.value)}(n,e,i))}}function hs(e,t,i){var s=ds(t,i);if(!(s>=0))throw new rs(ss,new Error(e.tagName+\\\"@\\\"+i));for(var n=t.length-1;s<n;)t[s]=t[++s];if(t.length=n,e){var r=e.ownerDocument;r&&(vs(r,e,i),i.ownerElement=null)}}function ps(){}function ms(){}function gs(e){return(\\\"<\\\"==e?\\\"&lt;\\\":\\\">\\\"==e&&\\\"&gt;\\\")||\\\"&\\\"==e&&\\\"&amp;\\\"||'\\\"'==e&&\\\"&quot;\\\"||\\\"&#\\\"+e.charCodeAt()+\\\";\\\"}function fs(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(fs(e,t))return!0}while(e=e.nextSibling)}function ys(){this.ownerDocument=this}function vs(e,t,i,s){e&&e._inc++,i.namespaceURI===Ni.XMLNS&&delete t._nsMap[i.prefix?i.localName:\\\"\\\"]}function bs(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function _s(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,bs(e.ownerDocument,e),t}function Ts(e){return e&&e.nodeType===ms.DOCUMENT_TYPE_NODE}function Ss(e){return e&&e.nodeType===ms.ELEMENT_NODE}function ws(e){return e&&e.nodeType===ms.TEXT_NODE}function ks(e,t){var i=e.childNodes||[];if(Oi(i,Ss)||Ts(t))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function xs(e,t){var i=e.childNodes||[];if(Oi(i,function(e){return Ss(e)&&e!==t}))return!1;var s=Oi(i,Ts);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Es(e,t,i){if(!function(e){return e&&(e.nodeType===ms.DOCUMENT_NODE||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.ELEMENT_NODE)}(e))throw new rs(is,\\\"Unexpected parent node type \\\"+e.nodeType);if(i&&i.parentNode!==e)throw new rs(ss,\\\"child not in parent\\\");if(!function(e){return e&&(Ss(e)||ws(e)||Ts(e)||e.nodeType===ms.DOCUMENT_FRAGMENT_NODE||e.nodeType===ms.COMMENT_NODE||e.nodeType===ms.PROCESSING_INSTRUCTION_NODE)}(t)||Ts(t)&&e.nodeType!==ms.DOCUMENT_NODE)throw new rs(is,\\\"Unexpected node type \\\"+t.nodeType+\\\" for parent node type \\\"+e.nodeType)}function Cs(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!ks(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!ks(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){if(Oi(s,Ts))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\");if(!i&&a)throw new rs(is,\\\"Doctype can not be appended since element is present\\\")}}function As(e,t,i){var s=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===ms.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Ss);if(r.length>1||Oi(n,ws))throw new rs(is,\\\"More than one element or text in fragment\\\");if(1===r.length&&!xs(e,i))throw new rs(is,\\\"Element in fragment can not be inserted before doctype\\\")}if(Ss(t)&&!xs(e,i))throw new rs(is,\\\"Only one element can be added and only after doctype\\\");if(Ts(t)){function o(e){return Ts(e)&&e!==i}if(Oi(s,o))throw new rs(is,\\\"Only one doctype is allowed\\\");var a=Oi(s,Ss);if(i&&s.indexOf(a)<s.indexOf(i))throw new rs(is,\\\"Doctype can only be inserted before an element\\\")}}function Is(e,t,i,s){Es(e,t,i),e.nodeType===ms.DOCUMENT_NODE&&(s||Cs)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Ji){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return bs(e.ownerDocument||e,e),t.nodeType==Ji&&(t.firstChild=t.lastChild=null),t}function js(){this._nsMap={}}function Ds(){}function Ps(){}function Ls(){}function Os(){}function Ns(){}function Ms(){}function Rs(){}function Us(){}function Bs(){}function Fs(){}function qs(){}function $s(){}function zs(e,t){var i=[],s=9==this.nodeType&&this.documentElement||this,n=s.prefix,r=s.namespaceURI;if(r&&null==n&&null==(n=s.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return Ws(this,i,e,t,a),i.join(\\\"\\\")}function Hs(e,t,i){var s=e.prefix||\\\"\\\",n=e.namespaceURI;if(!n)return!1;if(\\\"xml\\\"===s&&n===Ni.XML||n===Ni.XMLNS)return!1;for(var r=i.length;r--;){var a=i[r];if(a.prefix===s)return a.namespace!==n}return!0}function Vs(e,t,i){e.push(\\\" \\\",t,'=\\\"',i.replace(/[<>&\\\"\\\\t\\\\n\\\\r]/g,gs),'\\\"')}function Ws(e,t,i,s,n){if(n||(n=[]),s){if(!(e=s(e)))return;if(\\\"string\\\"==typeof e)return void t.push(e)}switch(e.nodeType){case $i:var r=e.attributes,a=r.length,o=e.firstChild,l=e.tagName,c=l;if(!(i=Ni.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var d,u=0;u<r.length;u++)if(\\\"xmlns\\\"===r.item(u).name){d=r.item(u).value;break}if(!d)for(var h=n.length-1;h>=0;h--){if(\\\"\\\"===(p=n[h]).prefix&&p.namespace===e.namespaceURI){d=p.namespace;break}}if(d!==e.namespaceURI)for(h=n.length-1;h>=0;h--){var p;if((p=n[h]).namespace===e.namespaceURI){p.prefix&&(c=p.prefix+\\\":\\\"+l);break}}}t.push(\\\"<\\\",c);for(var m=0;m<a;m++){\\\"xmlns\\\"==(g=r.item(m)).prefix?n.push({prefix:g.localName,namespace:g.value}):\\\"xmlns\\\"==g.nodeName&&n.push({prefix:\\\"\\\",namespace:g.value})}for(m=0;m<a;m++){var g,f,y;if(Hs(g=r.item(m),0,n))Vs(t,(f=g.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=g.namespaceURI),n.push({prefix:f,namespace:y});Ws(g,t,i,s,n)}if(l===c&&Hs(e,0,n))Vs(t,(f=e.prefix||\\\"\\\")?\\\"xmlns:\\\"+f:\\\"xmlns\\\",y=e.namespaceURI),n.push({prefix:f,namespace:y});if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(\\\">\\\"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Ws(o,t,i,s,n.slice()),o=o.nextSibling;else for(;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;t.push(\\\"</\\\",c,\\\">\\\")}else t.push(\\\"/>\\\");return;case Ki:case Ji:for(o=e.firstChild;o;)Ws(o,t,i,s,n.slice()),o=o.nextSibling;return;case zi:return Vs(t,e.name,e.value);case Hi:return t.push(e.data.replace(/[<&>]/g,gs));case Vi:return t.push(\\\"<![CDATA[\\\",e.data,\\\"]]>\\\");case Yi:return t.push(\\\"\\\\x3c!--\\\",e.data,\\\"--\\\\x3e\\\");case Qi:var v=e.publicId,b=e.systemId;if(t.push(\\\"<!DOCTYPE \\\",e.name),v)t.push(\\\" PUBLIC \\\",v),b&&\\\".\\\"!=b&&t.push(\\\" \\\",b),t.push(\\\">\\\");else if(b&&\\\".\\\"!=b)t.push(\\\" SYSTEM \\\",b,\\\">\\\");else{var _=e.internalSubset;_&&t.push(\\\" [\\\",_,\\\"]\\\"),t.push(\\\">\\\")}return;case Xi:return t.push(\\\"<?\\\",e.target,\\\" \\\",e.data,\\\"?>\\\");case Wi:return t.push(\\\"&\\\",e.nodeName,\\\";\\\");default:t.push(\\\"??\\\",e.nodeName)}}function Gs(e,t,i){var s;switch(t.nodeType){case $i:(s=t.cloneNode(!1)).ownerDocument=e;case Ji:break;case zi:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(Gs(e,n,i)),n=n.nextSibling;return s}function Xs(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];\\\"object\\\"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new as),s.ownerDocument=e,s.nodeType){case $i:var a=t.attributes,o=s.attributes=new cs,l=a.length;o._ownerElement=s;for(var c=0;c<l;c++)s.setAttributeNode(Xs(e,a.item(c),!0));break;case zi:i=!0}if(i)for(var d=t.firstChild;d;)s.appendChild(Xs(e,d,i)),d=d.nextSibling;return s}function Ys(e,t,i){e[t]=i}es.INVALID_STATE_ERR=(ts[11]=\\\"Invalid state\\\",11),es.SYNTAX_ERR=(ts[12]=\\\"Syntax error\\\",12),es.INVALID_MODIFICATION_ERR=(ts[13]=\\\"Invalid modification\\\",13),es.NAMESPACE_ERR=(ts[14]=\\\"Invalid namespace\\\",14),es.INVALID_ACCESS_ERR=(ts[15]=\\\"Invalid access\\\",15),rs.prototype=Error.prototype,Bi(es,rs),as.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],s=0;s<this.length;s++)Ws(this[s],i,e,t);return i.join(\\\"\\\")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},os.prototype.item=function(e){return ls(this),this[e]||null},Fi(os,as),cs.prototype={length:0,item:as.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new rs(ns);var i=this.getNamedItem(e.nodeName);return us(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new rs(ns);return t=this.getNamedItemNS(e.namespaceURI,e.localName),us(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hs(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return hs(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var s=this[i];if(s.localName==t&&s.namespaceURI==e)return s}return null}},ps.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var s=new ys;if(s.implementation=this,s.childNodes=new as,s.doctype=i||null,i&&s.appendChild(i),t){var n=s.createElementNS(e,t);s.appendChild(n)}return s},createDocumentType:function(e,t,i){var s=new Ms;return s.name=e,s.nodeName=e,s.publicId=t||\\\"\\\",s.systemId=i||\\\"\\\",s}},ms.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Is(this,e,t)},replaceChild:function(e,t){Is(this,e,t,As),t&&this.removeChild(t)},removeChild:function(e){return _s(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Xs(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Hi&&e.nodeType==Hi?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==zi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Bi(qi,ms),Bi(qi,ms.prototype),ys.prototype={nodeName:\\\"#document\\\",nodeType:Ki,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Ji){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Is(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===$i&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),_s(this,e)},replaceChild:function(e,t){Is(this,e,t,As),e.ownerDocument=this,t&&this.removeChild(t),Ss(e)&&(this.documentElement=e)},importNode:function(e,t){return Gs(this,e,t)},getElementById:function(e){var t=null;return fs(this.documentElement,function(i){if(i.nodeType==$i&&i.getAttribute(\\\"id\\\")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=Ui(e);return new os(this,function(i){var s=[];return t.length>0&&fs(i.documentElement,function(n){if(n!==i&&n.nodeType===$i){var r=n.getAttribute(\\\"class\\\");if(r){var a=e===r;if(!a){var o=Ui(r);a=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}a&&s.push(n)}}var l}),s})},createElement:function(e){var t=new js;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new as,(t.attributes=new cs)._ownerElement=t,t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new as,e},createTextNode:function(e){var t=new Ls;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Os;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ns;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new qs;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Ds;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new js,s=t.split(\\\":\\\"),n=i.attributes=new cs;return i.childNodes=new as,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new Ds,s=t.split(\\\":\\\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},Fi(ys,ms),js.prototype={nodeType:$i,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\\\"\\\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\\\"\\\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Ji?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,bs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\\\"\\\"},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=\\\"\\\"+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new os(this,function(t){var i=[];return fs(t,function(s){s===t||s.nodeType!=$i||\\\"*\\\"!==e&&s.tagName!=e||i.push(s)}),i})},getElementsByTagNameNS:function(e,t){return new os(this,function(i){var s=[];return fs(i,function(n){n===i||n.nodeType!==$i||\\\"*\\\"!==e&&n.namespaceURI!==e||\\\"*\\\"!==t&&n.localName!=t||s.push(n)}),s})}},ys.prototype.getElementsByTagName=js.prototype.getElementsByTagName,ys.prototype.getElementsByTagNameNS=js.prototype.getElementsByTagNameNS,Fi(js,ms),Ds.prototype.nodeType=zi,Fi(Ds,ms),Ps.prototype={data:\\\"\\\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ts[is])},deleteData:function(e,t){this.replaceData(e,t,\\\"\\\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},Fi(Ps,ms),Ls.prototype={nodeName:\\\"#text\\\",nodeType:Hi,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Fi(Ls,Ps),Os.prototype={nodeName:\\\"#comment\\\",nodeType:Yi},Fi(Os,Ps),Ns.prototype={nodeName:\\\"#cdata-section\\\",nodeType:Vi},Fi(Ns,Ps),Ms.prototype.nodeType=Qi,Fi(Ms,ms),Rs.prototype.nodeType=Zi,Fi(Rs,ms),Us.prototype.nodeType=Gi,Fi(Us,ms),Bs.prototype.nodeType=Wi,Fi(Bs,ms),Fs.prototype.nodeName=\\\"#document-fragment\\\",Fs.prototype.nodeType=Ji,Fi(Fs,ms),qs.prototype.nodeType=Xi,Fi(qs,ms),$s.prototype.serializeToString=function(e,t,i){return zs.call(e,t,i)},ms.prototype.toString=zs;try{if(Object.defineProperty){function lb(e){switch(e.nodeType){case $i:case Ji:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(lb(e)),e=e.nextSibling;return t.join(\\\"\\\");default:return e.nodeValue}}Object.defineProperty(os.prototype,\\\"length\\\",{get:function(){return ls(this),this.$$length}}),Object.defineProperty(ms.prototype,\\\"textContent\\\",{get:function(){return lb(this)},set:function(e){switch(this.nodeType){case $i:case Ji:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ys=function(e,t,i){e[\\\"$$\\\"+t]=i}}}catch(cb){}Ai.DocumentType=Ms,Ai.DOMException=rs,Ai.DOMImplementation=ps,Ai.Element=js,Ai.Node=ms,Ai.NodeList=as,Ai.XMLSerializer=$s;var Ks={},Qs={};!function(e){var t=Ii.freeze;e.XML_ENTITIES=t({amp:\\\"&\\\",apos:\\\"'\\\",gt:\\\">\\\",lt:\\\"<\\\",quot:'\\\"'}),e.HTML_ENTITIES=t({Aacute:\\\"Á\\\",aacute:\\\"á\\\",Abreve:\\\"Ă\\\",abreve:\\\"ă\\\",ac:\\\"∾\\\",acd:\\\"∿\\\",acE:\\\"∾̳\\\",Acirc:\\\"Â\\\",acirc:\\\"â\\\",acute:\\\"´\\\",Acy:\\\"А\\\",acy:\\\"а\\\",AElig:\\\"Æ\\\",aelig:\\\"æ\\\",af:\\\"⁡\\\",Afr:\\\"𝔄\\\",afr:\\\"𝔞\\\",Agrave:\\\"À\\\",agrave:\\\"à\\\",alefsym:\\\"ℵ\\\",aleph:\\\"ℵ\\\",Alpha:\\\"Α\\\",alpha:\\\"α\\\",Amacr:\\\"Ā\\\",amacr:\\\"ā\\\",amalg:\\\"⨿\\\",AMP:\\\"&\\\",amp:\\\"&\\\",And:\\\"⩓\\\",and:\\\"∧\\\",andand:\\\"⩕\\\",andd:\\\"⩜\\\",andslope:\\\"⩘\\\",andv:\\\"⩚\\\",ang:\\\"∠\\\",ange:\\\"⦤\\\",angle:\\\"∠\\\",angmsd:\\\"∡\\\",angmsdaa:\\\"⦨\\\",angmsdab:\\\"⦩\\\",angmsdac:\\\"⦪\\\",angmsdad:\\\"⦫\\\",angmsdae:\\\"⦬\\\",angmsdaf:\\\"⦭\\\",angmsdag:\\\"⦮\\\",angmsdah:\\\"⦯\\\",angrt:\\\"∟\\\",angrtvb:\\\"⊾\\\",angrtvbd:\\\"⦝\\\",angsph:\\\"∢\\\",angst:\\\"Å\\\",angzarr:\\\"⍼\\\",Aogon:\\\"Ą\\\",aogon:\\\"ą\\\",Aopf:\\\"𝔸\\\",aopf:\\\"𝕒\\\",ap:\\\"≈\\\",apacir:\\\"⩯\\\",apE:\\\"⩰\\\",ape:\\\"≊\\\",apid:\\\"≋\\\",apos:\\\"'\\\",ApplyFunction:\\\"⁡\\\",approx:\\\"≈\\\",approxeq:\\\"≊\\\",Aring:\\\"Å\\\",aring:\\\"å\\\",Ascr:\\\"𝒜\\\",ascr:\\\"𝒶\\\",Assign:\\\"≔\\\",ast:\\\"*\\\",asymp:\\\"≈\\\",asympeq:\\\"≍\\\",Atilde:\\\"Ã\\\",atilde:\\\"ã\\\",Auml:\\\"Ä\\\",auml:\\\"ä\\\",awconint:\\\"∳\\\",awint:\\\"⨑\\\",backcong:\\\"≌\\\",backepsilon:\\\"϶\\\",backprime:\\\"‵\\\",backsim:\\\"∽\\\",backsimeq:\\\"⋍\\\",Backslash:\\\"∖\\\",Barv:\\\"⫧\\\",barvee:\\\"⊽\\\",Barwed:\\\"⌆\\\",barwed:\\\"⌅\\\",barwedge:\\\"⌅\\\",bbrk:\\\"⎵\\\",bbrktbrk:\\\"⎶\\\",bcong:\\\"≌\\\",Bcy:\\\"Б\\\",bcy:\\\"б\\\",bdquo:\\\"„\\\",becaus:\\\"∵\\\",Because:\\\"∵\\\",because:\\\"∵\\\",bemptyv:\\\"⦰\\\",bepsi:\\\"϶\\\",bernou:\\\"ℬ\\\",Bernoullis:\\\"ℬ\\\",Beta:\\\"Β\\\",beta:\\\"β\\\",beth:\\\"ℶ\\\",between:\\\"≬\\\",Bfr:\\\"𝔅\\\",bfr:\\\"𝔟\\\",bigcap:\\\"⋂\\\",bigcirc:\\\"◯\\\",bigcup:\\\"⋃\\\",bigodot:\\\"⨀\\\",bigoplus:\\\"⨁\\\",bigotimes:\\\"⨂\\\",bigsqcup:\\\"⨆\\\",bigstar:\\\"★\\\",bigtriangledown:\\\"▽\\\",bigtriangleup:\\\"△\\\",biguplus:\\\"⨄\\\",bigvee:\\\"⋁\\\",bigwedge:\\\"⋀\\\",bkarow:\\\"⤍\\\",blacklozenge:\\\"⧫\\\",blacksquare:\\\"▪\\\",blacktriangle:\\\"▴\\\",blacktriangledown:\\\"▾\\\",blacktriangleleft:\\\"◂\\\",blacktriangleright:\\\"▸\\\",blank:\\\"␣\\\",blk12:\\\"▒\\\",blk14:\\\"░\\\",blk34:\\\"▓\\\",block:\\\"█\\\",bne:\\\"=⃥\\\",bnequiv:\\\"≡⃥\\\",bNot:\\\"⫭\\\",bnot:\\\"⌐\\\",Bopf:\\\"𝔹\\\",bopf:\\\"𝕓\\\",bot:\\\"⊥\\\",bottom:\\\"⊥\\\",bowtie:\\\"⋈\\\",boxbox:\\\"⧉\\\",boxDL:\\\"╗\\\",boxDl:\\\"╖\\\",boxdL:\\\"╕\\\",boxdl:\\\"┐\\\",boxDR:\\\"╔\\\",boxDr:\\\"╓\\\",boxdR:\\\"╒\\\",boxdr:\\\"┌\\\",boxH:\\\"═\\\",boxh:\\\"─\\\",boxHD:\\\"╦\\\",boxHd:\\\"╤\\\",boxhD:\\\"╥\\\",boxhd:\\\"┬\\\",boxHU:\\\"╩\\\",boxHu:\\\"╧\\\",boxhU:\\\"╨\\\",boxhu:\\\"┴\\\",boxminus:\\\"⊟\\\",boxplus:\\\"⊞\\\",boxtimes:\\\"⊠\\\",boxUL:\\\"╝\\\",boxUl:\\\"╜\\\",boxuL:\\\"╛\\\",boxul:\\\"┘\\\",boxUR:\\\"╚\\\",boxUr:\\\"╙\\\",boxuR:\\\"╘\\\",boxur:\\\"└\\\",boxV:\\\"║\\\",boxv:\\\"│\\\",boxVH:\\\"╬\\\",boxVh:\\\"╫\\\",boxvH:\\\"╪\\\",boxvh:\\\"┼\\\",boxVL:\\\"╣\\\",boxVl:\\\"╢\\\",boxvL:\\\"╡\\\",boxvl:\\\"┤\\\",boxVR:\\\"╠\\\",boxVr:\\\"╟\\\",boxvR:\\\"╞\\\",boxvr:\\\"├\\\",bprime:\\\"‵\\\",Breve:\\\"˘\\\",breve:\\\"˘\\\",brvbar:\\\"¦\\\",Bscr:\\\"ℬ\\\",bscr:\\\"𝒷\\\",bsemi:\\\"⁏\\\",bsim:\\\"∽\\\",bsime:\\\"⋍\\\",bsol:\\\"\\\\\\\\\\\",bsolb:\\\"⧅\\\",bsolhsub:\\\"⟈\\\",bull:\\\"•\\\",bullet:\\\"•\\\",bump:\\\"≎\\\",bumpE:\\\"⪮\\\",bumpe:\\\"≏\\\",Bumpeq:\\\"≎\\\",bumpeq:\\\"≏\\\",Cacute:\\\"Ć\\\",cacute:\\\"ć\\\",Cap:\\\"⋒\\\",cap:\\\"∩\\\",capand:\\\"⩄\\\",capbrcup:\\\"⩉\\\",capcap:\\\"⩋\\\",capcup:\\\"⩇\\\",capdot:\\\"⩀\\\",CapitalDifferentialD:\\\"ⅅ\\\",caps:\\\"∩︀\\\",caret:\\\"⁁\\\",caron:\\\"ˇ\\\",Cayleys:\\\"ℭ\\\",ccaps:\\\"⩍\\\",Ccaron:\\\"Č\\\",ccaron:\\\"č\\\",Ccedil:\\\"Ç\\\",ccedil:\\\"ç\\\",Ccirc:\\\"Ĉ\\\",ccirc:\\\"ĉ\\\",Cconint:\\\"∰\\\",ccups:\\\"⩌\\\",ccupssm:\\\"⩐\\\",Cdot:\\\"Ċ\\\",cdot:\\\"ċ\\\",cedil:\\\"¸\\\",Cedilla:\\\"¸\\\",cemptyv:\\\"⦲\\\",cent:\\\"¢\\\",CenterDot:\\\"·\\\",centerdot:\\\"·\\\",Cfr:\\\"ℭ\\\",cfr:\\\"𝔠\\\",CHcy:\\\"Ч\\\",chcy:\\\"ч\\\",check:\\\"✓\\\",checkmark:\\\"✓\\\",Chi:\\\"Χ\\\",chi:\\\"χ\\\",cir:\\\"○\\\",circ:\\\"ˆ\\\",circeq:\\\"≗\\\",circlearrowleft:\\\"↺\\\",circlearrowright:\\\"↻\\\",circledast:\\\"⊛\\\",circledcirc:\\\"⊚\\\",circleddash:\\\"⊝\\\",CircleDot:\\\"⊙\\\",circledR:\\\"®\\\",circledS:\\\"Ⓢ\\\",CircleMinus:\\\"⊖\\\",CirclePlus:\\\"⊕\\\",CircleTimes:\\\"⊗\\\",cirE:\\\"⧃\\\",cire:\\\"≗\\\",cirfnint:\\\"⨐\\\",cirmid:\\\"⫯\\\",cirscir:\\\"⧂\\\",ClockwiseContourIntegral:\\\"∲\\\",CloseCurlyDoubleQuote:\\\"”\\\",CloseCurlyQuote:\\\"’\\\",clubs:\\\"♣\\\",clubsuit:\\\"♣\\\",Colon:\\\"∷\\\",colon:\\\":\\\",Colone:\\\"⩴\\\",colone:\\\"≔\\\",coloneq:\\\"≔\\\",comma:\\\",\\\",commat:\\\"@\\\",comp:\\\"∁\\\",compfn:\\\"∘\\\",complement:\\\"∁\\\",complexes:\\\"ℂ\\\",cong:\\\"≅\\\",congdot:\\\"⩭\\\",Congruent:\\\"≡\\\",Conint:\\\"∯\\\",conint:\\\"∮\\\",ContourIntegral:\\\"∮\\\",Copf:\\\"ℂ\\\",copf:\\\"𝕔\\\",coprod:\\\"∐\\\",Coproduct:\\\"∐\\\",COPY:\\\"©\\\",copy:\\\"©\\\",copysr:\\\"℗\\\",CounterClockwiseContourIntegral:\\\"∳\\\",crarr:\\\"↵\\\",Cross:\\\"⨯\\\",cross:\\\"✗\\\",Cscr:\\\"𝒞\\\",cscr:\\\"𝒸\\\",csub:\\\"⫏\\\",csube:\\\"⫑\\\",csup:\\\"⫐\\\",csupe:\\\"⫒\\\",ctdot:\\\"⋯\\\",cudarrl:\\\"⤸\\\",cudarrr:\\\"⤵\\\",cuepr:\\\"⋞\\\",cuesc:\\\"⋟\\\",cularr:\\\"↶\\\",cularrp:\\\"⤽\\\",Cup:\\\"⋓\\\",cup:\\\"∪\\\",cupbrcap:\\\"⩈\\\",CupCap:\\\"≍\\\",cupcap:\\\"⩆\\\",cupcup:\\\"⩊\\\",cupdot:\\\"⊍\\\",cupor:\\\"⩅\\\",cups:\\\"∪︀\\\",curarr:\\\"↷\\\",curarrm:\\\"⤼\\\",curlyeqprec:\\\"⋞\\\",curlyeqsucc:\\\"⋟\\\",curlyvee:\\\"⋎\\\",curlywedge:\\\"⋏\\\",curren:\\\"¤\\\",curvearrowleft:\\\"↶\\\",curvearrowright:\\\"↷\\\",cuvee:\\\"⋎\\\",cuwed:\\\"⋏\\\",cwconint:\\\"∲\\\",cwint:\\\"∱\\\",cylcty:\\\"⌭\\\",Dagger:\\\"‡\\\",dagger:\\\"†\\\",daleth:\\\"ℸ\\\",Darr:\\\"↡\\\",dArr:\\\"⇓\\\",darr:\\\"↓\\\",dash:\\\"‐\\\",Dashv:\\\"⫤\\\",dashv:\\\"⊣\\\",dbkarow:\\\"⤏\\\",dblac:\\\"˝\\\",Dcaron:\\\"Ď\\\",dcaron:\\\"ď\\\",Dcy:\\\"Д\\\",dcy:\\\"д\\\",DD:\\\"ⅅ\\\",dd:\\\"ⅆ\\\",ddagger:\\\"‡\\\",ddarr:\\\"⇊\\\",DDotrahd:\\\"⤑\\\",ddotseq:\\\"⩷\\\",deg:\\\"°\\\",Del:\\\"∇\\\",Delta:\\\"Δ\\\",delta:\\\"δ\\\",demptyv:\\\"⦱\\\",dfisht:\\\"⥿\\\",Dfr:\\\"𝔇\\\",dfr:\\\"𝔡\\\",dHar:\\\"⥥\\\",dharl:\\\"⇃\\\",dharr:\\\"⇂\\\",DiacriticalAcute:\\\"´\\\",DiacriticalDot:\\\"˙\\\",DiacriticalDoubleAcute:\\\"˝\\\",DiacriticalGrave:\\\"`\\\",DiacriticalTilde:\\\"˜\\\",diam:\\\"⋄\\\",Diamond:\\\"⋄\\\",diamond:\\\"⋄\\\",diamondsuit:\\\"♦\\\",diams:\\\"♦\\\",die:\\\"¨\\\",DifferentialD:\\\"ⅆ\\\",digamma:\\\"ϝ\\\",disin:\\\"⋲\\\",div:\\\"÷\\\",divide:\\\"÷\\\",divideontimes:\\\"⋇\\\",divonx:\\\"⋇\\\",DJcy:\\\"Ђ\\\",djcy:\\\"ђ\\\",dlcorn:\\\"⌞\\\",dlcrop:\\\"⌍\\\",dollar:\\\"$\\\",Dopf:\\\"𝔻\\\",dopf:\\\"𝕕\\\",Dot:\\\"¨\\\",dot:\\\"˙\\\",DotDot:\\\"⃜\\\",doteq:\\\"≐\\\",doteqdot:\\\"≑\\\",DotEqual:\\\"≐\\\",dotminus:\\\"∸\\\",dotplus:\\\"∔\\\",dotsquare:\\\"⊡\\\",doublebarwedge:\\\"⌆\\\",DoubleContourIntegral:\\\"∯\\\",DoubleDot:\\\"¨\\\",DoubleDownArrow:\\\"⇓\\\",DoubleLeftArrow:\\\"⇐\\\",DoubleLeftRightArrow:\\\"⇔\\\",DoubleLeftTee:\\\"⫤\\\",DoubleLongLeftArrow:\\\"⟸\\\",DoubleLongLeftRightArrow:\\\"⟺\\\",DoubleLongRightArrow:\\\"⟹\\\",DoubleRightArrow:\\\"⇒\\\",DoubleRightTee:\\\"⊨\\\",DoubleUpArrow:\\\"⇑\\\",DoubleUpDownArrow:\\\"⇕\\\",DoubleVerticalBar:\\\"∥\\\",DownArrow:\\\"↓\\\",Downarrow:\\\"⇓\\\",downarrow:\\\"↓\\\",DownArrowBar:\\\"⤓\\\",DownArrowUpArrow:\\\"⇵\\\",DownBreve:\\\"̑\\\",downdownarrows:\\\"⇊\\\",downharpoonleft:\\\"⇃\\\",downharpoonright:\\\"⇂\\\",DownLeftRightVector:\\\"⥐\\\",DownLeftTeeVector:\\\"⥞\\\",DownLeftVector:\\\"↽\\\",DownLeftVectorBar:\\\"⥖\\\",DownRightTeeVector:\\\"⥟\\\",DownRightVector:\\\"⇁\\\",DownRightVectorBar:\\\"⥗\\\",DownTee:\\\"⊤\\\",DownTeeArrow:\\\"↧\\\",drbkarow:\\\"⤐\\\",drcorn:\\\"⌟\\\",drcrop:\\\"⌌\\\",Dscr:\\\"𝒟\\\",dscr:\\\"𝒹\\\",DScy:\\\"Ѕ\\\",dscy:\\\"ѕ\\\",dsol:\\\"⧶\\\",Dstrok:\\\"Đ\\\",dstrok:\\\"đ\\\",dtdot:\\\"⋱\\\",dtri:\\\"▿\\\",dtrif:\\\"▾\\\",duarr:\\\"⇵\\\",duhar:\\\"⥯\\\",dwangle:\\\"⦦\\\",DZcy:\\\"Џ\\\",dzcy:\\\"џ\\\",dzigrarr:\\\"⟿\\\",Eacute:\\\"É\\\",eacute:\\\"é\\\",easter:\\\"⩮\\\",Ecaron:\\\"Ě\\\",ecaron:\\\"ě\\\",ecir:\\\"≖\\\",Ecirc:\\\"Ê\\\",ecirc:\\\"ê\\\",ecolon:\\\"≕\\\",Ecy:\\\"Э\\\",ecy:\\\"э\\\",eDDot:\\\"⩷\\\",Edot:\\\"Ė\\\",eDot:\\\"≑\\\",edot:\\\"ė\\\",ee:\\\"ⅇ\\\",efDot:\\\"≒\\\",Efr:\\\"𝔈\\\",efr:\\\"𝔢\\\",eg:\\\"⪚\\\",Egrave:\\\"È\\\",egrave:\\\"è\\\",egs:\\\"⪖\\\",egsdot:\\\"⪘\\\",el:\\\"⪙\\\",Element:\\\"∈\\\",elinters:\\\"⏧\\\",ell:\\\"ℓ\\\",els:\\\"⪕\\\",elsdot:\\\"⪗\\\",Emacr:\\\"Ē\\\",emacr:\\\"ē\\\",empty:\\\"∅\\\",emptyset:\\\"∅\\\",EmptySmallSquare:\\\"◻\\\",emptyv:\\\"∅\\\",EmptyVerySmallSquare:\\\"▫\\\",emsp:\\\" \\\",emsp13:\\\" \\\",emsp14:\\\" \\\",ENG:\\\"Ŋ\\\",eng:\\\"ŋ\\\",ensp:\\\" \\\",Eogon:\\\"Ę\\\",eogon:\\\"ę\\\",Eopf:\\\"𝔼\\\",eopf:\\\"𝕖\\\",epar:\\\"⋕\\\",eparsl:\\\"⧣\\\",eplus:\\\"⩱\\\",epsi:\\\"ε\\\",Epsilon:\\\"Ε\\\",epsilon:\\\"ε\\\",epsiv:\\\"ϵ\\\",eqcirc:\\\"≖\\\",eqcolon:\\\"≕\\\",eqsim:\\\"≂\\\",eqslantgtr:\\\"⪖\\\",eqslantless:\\\"⪕\\\",Equal:\\\"⩵\\\",equals:\\\"=\\\",EqualTilde:\\\"≂\\\",equest:\\\"≟\\\",Equilibrium:\\\"⇌\\\",equiv:\\\"≡\\\",equivDD:\\\"⩸\\\",eqvparsl:\\\"⧥\\\",erarr:\\\"⥱\\\",erDot:\\\"≓\\\",Escr:\\\"ℰ\\\",escr:\\\"ℯ\\\",esdot:\\\"≐\\\",Esim:\\\"⩳\\\",esim:\\\"≂\\\",Eta:\\\"Η\\\",eta:\\\"η\\\",ETH:\\\"Ð\\\",eth:\\\"ð\\\",Euml:\\\"Ë\\\",euml:\\\"ë\\\",euro:\\\"€\\\",excl:\\\"!\\\",exist:\\\"∃\\\",Exists:\\\"∃\\\",expectation:\\\"ℰ\\\",ExponentialE:\\\"ⅇ\\\",exponentiale:\\\"ⅇ\\\",fallingdotseq:\\\"≒\\\",Fcy:\\\"Ф\\\",fcy:\\\"ф\\\",female:\\\"♀\\\",ffilig:\\\"ﬃ\\\",fflig:\\\"ﬀ\\\",ffllig:\\\"ﬄ\\\",Ffr:\\\"𝔉\\\",ffr:\\\"𝔣\\\",filig:\\\"ﬁ\\\",FilledSmallSquare:\\\"◼\\\",FilledVerySmallSquare:\\\"▪\\\",fjlig:\\\"fj\\\",flat:\\\"♭\\\",fllig:\\\"ﬂ\\\",fltns:\\\"▱\\\",fnof:\\\"ƒ\\\",Fopf:\\\"𝔽\\\",fopf:\\\"𝕗\\\",ForAll:\\\"∀\\\",forall:\\\"∀\\\",fork:\\\"⋔\\\",forkv:\\\"⫙\\\",Fouriertrf:\\\"ℱ\\\",fpartint:\\\"⨍\\\",frac12:\\\"½\\\",frac13:\\\"⅓\\\",frac14:\\\"¼\\\",frac15:\\\"⅕\\\",frac16:\\\"⅙\\\",frac18:\\\"⅛\\\",frac23:\\\"⅔\\\",frac25:\\\"⅖\\\",frac34:\\\"¾\\\",frac35:\\\"⅗\\\",frac38:\\\"⅜\\\",frac45:\\\"⅘\\\",frac56:\\\"⅚\\\",frac58:\\\"⅝\\\",frac78:\\\"⅞\\\",frasl:\\\"⁄\\\",frown:\\\"⌢\\\",Fscr:\\\"ℱ\\\",fscr:\\\"𝒻\\\",gacute:\\\"ǵ\\\",Gamma:\\\"Γ\\\",gamma:\\\"γ\\\",Gammad:\\\"Ϝ\\\",gammad:\\\"ϝ\\\",gap:\\\"⪆\\\",Gbreve:\\\"Ğ\\\",gbreve:\\\"ğ\\\",Gcedil:\\\"Ģ\\\",Gcirc:\\\"Ĝ\\\",gcirc:\\\"ĝ\\\",Gcy:\\\"Г\\\",gcy:\\\"г\\\",Gdot:\\\"Ġ\\\",gdot:\\\"ġ\\\",gE:\\\"≧\\\",ge:\\\"≥\\\",gEl:\\\"⪌\\\",gel:\\\"⋛\\\",geq:\\\"≥\\\",geqq:\\\"≧\\\",geqslant:\\\"⩾\\\",ges:\\\"⩾\\\",gescc:\\\"⪩\\\",gesdot:\\\"⪀\\\",gesdoto:\\\"⪂\\\",gesdotol:\\\"⪄\\\",gesl:\\\"⋛︀\\\",gesles:\\\"⪔\\\",Gfr:\\\"𝔊\\\",gfr:\\\"𝔤\\\",Gg:\\\"⋙\\\",gg:\\\"≫\\\",ggg:\\\"⋙\\\",gimel:\\\"ℷ\\\",GJcy:\\\"Ѓ\\\",gjcy:\\\"ѓ\\\",gl:\\\"≷\\\",gla:\\\"⪥\\\",glE:\\\"⪒\\\",glj:\\\"⪤\\\",gnap:\\\"⪊\\\",gnapprox:\\\"⪊\\\",gnE:\\\"≩\\\",gne:\\\"⪈\\\",gneq:\\\"⪈\\\",gneqq:\\\"≩\\\",gnsim:\\\"⋧\\\",Gopf:\\\"𝔾\\\",gopf:\\\"𝕘\\\",grave:\\\"`\\\",GreaterEqual:\\\"≥\\\",GreaterEqualLess:\\\"⋛\\\",GreaterFullEqual:\\\"≧\\\",GreaterGreater:\\\"⪢\\\",GreaterLess:\\\"≷\\\",GreaterSlantEqual:\\\"⩾\\\",GreaterTilde:\\\"≳\\\",Gscr:\\\"𝒢\\\",gscr:\\\"ℊ\\\",gsim:\\\"≳\\\",gsime:\\\"⪎\\\",gsiml:\\\"⪐\\\",Gt:\\\"≫\\\",GT:\\\">\\\",gt:\\\">\\\",gtcc:\\\"⪧\\\",gtcir:\\\"⩺\\\",gtdot:\\\"⋗\\\",gtlPar:\\\"⦕\\\",gtquest:\\\"⩼\\\",gtrapprox:\\\"⪆\\\",gtrarr:\\\"⥸\\\",gtrdot:\\\"⋗\\\",gtreqless:\\\"⋛\\\",gtreqqless:\\\"⪌\\\",gtrless:\\\"≷\\\",gtrsim:\\\"≳\\\",gvertneqq:\\\"≩︀\\\",gvnE:\\\"≩︀\\\",Hacek:\\\"ˇ\\\",hairsp:\\\" \\\",half:\\\"½\\\",hamilt:\\\"ℋ\\\",HARDcy:\\\"Ъ\\\",hardcy:\\\"ъ\\\",hArr:\\\"⇔\\\",harr:\\\"↔\\\",harrcir:\\\"⥈\\\",harrw:\\\"↭\\\",Hat:\\\"^\\\",hbar:\\\"ℏ\\\",Hcirc:\\\"Ĥ\\\",hcirc:\\\"ĥ\\\",hearts:\\\"♥\\\",heartsuit:\\\"♥\\\",hellip:\\\"…\\\",hercon:\\\"⊹\\\",Hfr:\\\"ℌ\\\",hfr:\\\"𝔥\\\",HilbertSpace:\\\"ℋ\\\",hksearow:\\\"⤥\\\",hkswarow:\\\"⤦\\\",hoarr:\\\"⇿\\\",homtht:\\\"∻\\\",hookleftarrow:\\\"↩\\\",hookrightarrow:\\\"↪\\\",Hopf:\\\"ℍ\\\",hopf:\\\"𝕙\\\",horbar:\\\"―\\\",HorizontalLine:\\\"─\\\",Hscr:\\\"ℋ\\\",hscr:\\\"𝒽\\\",hslash:\\\"ℏ\\\",Hstrok:\\\"Ħ\\\",hstrok:\\\"ħ\\\",HumpDownHump:\\\"≎\\\",HumpEqual:\\\"≏\\\",hybull:\\\"⁃\\\",hyphen:\\\"‐\\\",Iacute:\\\"Í\\\",iacute:\\\"í\\\",ic:\\\"⁣\\\",Icirc:\\\"Î\\\",icirc:\\\"î\\\",Icy:\\\"И\\\",icy:\\\"и\\\",Idot:\\\"İ\\\",IEcy:\\\"Е\\\",iecy:\\\"е\\\",iexcl:\\\"¡\\\",iff:\\\"⇔\\\",Ifr:\\\"ℑ\\\",ifr:\\\"𝔦\\\",Igrave:\\\"Ì\\\",igrave:\\\"ì\\\",ii:\\\"ⅈ\\\",iiiint:\\\"⨌\\\",iiint:\\\"∭\\\",iinfin:\\\"⧜\\\",iiota:\\\"℩\\\",IJlig:\\\"Ĳ\\\",ijlig:\\\"ĳ\\\",Im:\\\"ℑ\\\",Imacr:\\\"Ī\\\",imacr:\\\"ī\\\",image:\\\"ℑ\\\",ImaginaryI:\\\"ⅈ\\\",imagline:\\\"ℐ\\\",imagpart:\\\"ℑ\\\",imath:\\\"ı\\\",imof:\\\"⊷\\\",imped:\\\"Ƶ\\\",Implies:\\\"⇒\\\",in:\\\"∈\\\",incare:\\\"℅\\\",infin:\\\"∞\\\",infintie:\\\"⧝\\\",inodot:\\\"ı\\\",Int:\\\"∬\\\",int:\\\"∫\\\",intcal:\\\"⊺\\\",integers:\\\"ℤ\\\",Integral:\\\"∫\\\",intercal:\\\"⊺\\\",Intersection:\\\"⋂\\\",intlarhk:\\\"⨗\\\",intprod:\\\"⨼\\\",InvisibleComma:\\\"⁣\\\",InvisibleTimes:\\\"⁢\\\",IOcy:\\\"Ё\\\",iocy:\\\"ё\\\",Iogon:\\\"Į\\\",iogon:\\\"į\\\",Iopf:\\\"𝕀\\\",iopf:\\\"𝕚\\\",Iota:\\\"Ι\\\",iota:\\\"ι\\\",iprod:\\\"⨼\\\",iquest:\\\"¿\\\",Iscr:\\\"ℐ\\\",iscr:\\\"𝒾\\\",isin:\\\"∈\\\",isindot:\\\"⋵\\\",isinE:\\\"⋹\\\",isins:\\\"⋴\\\",isinsv:\\\"⋳\\\",isinv:\\\"∈\\\",it:\\\"⁢\\\",Itilde:\\\"Ĩ\\\",itilde:\\\"ĩ\\\",Iukcy:\\\"І\\\",iukcy:\\\"і\\\",Iuml:\\\"Ï\\\",iuml:\\\"ï\\\",Jcirc:\\\"Ĵ\\\",jcirc:\\\"ĵ\\\",Jcy:\\\"Й\\\",jcy:\\\"й\\\",Jfr:\\\"𝔍\\\",jfr:\\\"𝔧\\\",jmath:\\\"ȷ\\\",Jopf:\\\"𝕁\\\",jopf:\\\"𝕛\\\",Jscr:\\\"𝒥\\\",jscr:\\\"𝒿\\\",Jsercy:\\\"Ј\\\",jsercy:\\\"ј\\\",Jukcy:\\\"Є\\\",jukcy:\\\"є\\\",Kappa:\\\"Κ\\\",kappa:\\\"κ\\\",kappav:\\\"ϰ\\\",Kcedil:\\\"Ķ\\\",kcedil:\\\"ķ\\\",Kcy:\\\"К\\\",kcy:\\\"к\\\",Kfr:\\\"𝔎\\\",kfr:\\\"𝔨\\\",kgreen:\\\"ĸ\\\",KHcy:\\\"Х\\\",khcy:\\\"х\\\",KJcy:\\\"Ќ\\\",kjcy:\\\"ќ\\\",Kopf:\\\"𝕂\\\",kopf:\\\"𝕜\\\",Kscr:\\\"𝒦\\\",kscr:\\\"𝓀\\\",lAarr:\\\"⇚\\\",Lacute:\\\"Ĺ\\\",lacute:\\\"ĺ\\\",laemptyv:\\\"⦴\\\",lagran:\\\"ℒ\\\",Lambda:\\\"Λ\\\",lambda:\\\"λ\\\",Lang:\\\"⟪\\\",lang:\\\"⟨\\\",langd:\\\"⦑\\\",langle:\\\"⟨\\\",lap:\\\"⪅\\\",Laplacetrf:\\\"ℒ\\\",laquo:\\\"«\\\",Larr:\\\"↞\\\",lArr:\\\"⇐\\\",larr:\\\"←\\\",larrb:\\\"⇤\\\",larrbfs:\\\"⤟\\\",larrfs:\\\"⤝\\\",larrhk:\\\"↩\\\",larrlp:\\\"↫\\\",larrpl:\\\"⤹\\\",larrsim:\\\"⥳\\\",larrtl:\\\"↢\\\",lat:\\\"⪫\\\",lAtail:\\\"⤛\\\",latail:\\\"⤙\\\",late:\\\"⪭\\\",lates:\\\"⪭︀\\\",lBarr:\\\"⤎\\\",lbarr:\\\"⤌\\\",lbbrk:\\\"❲\\\",lbrace:\\\"{\\\",lbrack:\\\"[\\\",lbrke:\\\"⦋\\\",lbrksld:\\\"⦏\\\",lbrkslu:\\\"⦍\\\",Lcaron:\\\"Ľ\\\",lcaron:\\\"ľ\\\",Lcedil:\\\"Ļ\\\",lcedil:\\\"ļ\\\",lceil:\\\"⌈\\\",lcub:\\\"{\\\",Lcy:\\\"Л\\\",lcy:\\\"л\\\",ldca:\\\"⤶\\\",ldquo:\\\"“\\\",ldquor:\\\"„\\\",ldrdhar:\\\"⥧\\\",ldrushar:\\\"⥋\\\",ldsh:\\\"↲\\\",lE:\\\"≦\\\",le:\\\"≤\\\",LeftAngleBracket:\\\"⟨\\\",LeftArrow:\\\"←\\\",Leftarrow:\\\"⇐\\\",leftarrow:\\\"←\\\",LeftArrowBar:\\\"⇤\\\",LeftArrowRightArrow:\\\"⇆\\\",leftarrowtail:\\\"↢\\\",LeftCeiling:\\\"⌈\\\",LeftDoubleBracket:\\\"⟦\\\",LeftDownTeeVector:\\\"⥡\\\",LeftDownVector:\\\"⇃\\\",LeftDownVectorBar:\\\"⥙\\\",LeftFloor:\\\"⌊\\\",leftharpoondown:\\\"↽\\\",leftharpoonup:\\\"↼\\\",leftleftarrows:\\\"⇇\\\",LeftRightArrow:\\\"↔\\\",Leftrightarrow:\\\"⇔\\\",leftrightarrow:\\\"↔\\\",leftrightarrows:\\\"⇆\\\",leftrightharpoons:\\\"⇋\\\",leftrightsquigarrow:\\\"↭\\\",LeftRightVector:\\\"⥎\\\",LeftTee:\\\"⊣\\\",LeftTeeArrow:\\\"↤\\\",LeftTeeVector:\\\"⥚\\\",leftthreetimes:\\\"⋋\\\",LeftTriangle:\\\"⊲\\\",LeftTriangleBar:\\\"⧏\\\",LeftTriangleEqual:\\\"⊴\\\",LeftUpDownVector:\\\"⥑\\\",LeftUpTeeVector:\\\"⥠\\\",LeftUpVector:\\\"↿\\\",LeftUpVectorBar:\\\"⥘\\\",LeftVector:\\\"↼\\\",LeftVectorBar:\\\"⥒\\\",lEg:\\\"⪋\\\",leg:\\\"⋚\\\",leq:\\\"≤\\\",leqq:\\\"≦\\\",leqslant:\\\"⩽\\\",les:\\\"⩽\\\",lescc:\\\"⪨\\\",lesdot:\\\"⩿\\\",lesdoto:\\\"⪁\\\",lesdotor:\\\"⪃\\\",lesg:\\\"⋚︀\\\",lesges:\\\"⪓\\\",lessapprox:\\\"⪅\\\",lessdot:\\\"⋖\\\",lesseqgtr:\\\"⋚\\\",lesseqqgtr:\\\"⪋\\\",LessEqualGreater:\\\"⋚\\\",LessFullEqual:\\\"≦\\\",LessGreater:\\\"≶\\\",lessgtr:\\\"≶\\\",LessLess:\\\"⪡\\\",lesssim:\\\"≲\\\",LessSlantEqual:\\\"⩽\\\",LessTilde:\\\"≲\\\",lfisht:\\\"⥼\\\",lfloor:\\\"⌊\\\",Lfr:\\\"𝔏\\\",lfr:\\\"𝔩\\\",lg:\\\"≶\\\",lgE:\\\"⪑\\\",lHar:\\\"⥢\\\",lhard:\\\"↽\\\",lharu:\\\"↼\\\",lharul:\\\"⥪\\\",lhblk:\\\"▄\\\",LJcy:\\\"Љ\\\",ljcy:\\\"љ\\\",Ll:\\\"⋘\\\",ll:\\\"≪\\\",llarr:\\\"⇇\\\",llcorner:\\\"⌞\\\",Lleftarrow:\\\"⇚\\\",llhard:\\\"⥫\\\",lltri:\\\"◺\\\",Lmidot:\\\"Ŀ\\\",lmidot:\\\"ŀ\\\",lmoust:\\\"⎰\\\",lmoustache:\\\"⎰\\\",lnap:\\\"⪉\\\",lnapprox:\\\"⪉\\\",lnE:\\\"≨\\\",lne:\\\"⪇\\\",lneq:\\\"⪇\\\",lneqq:\\\"≨\\\",lnsim:\\\"⋦\\\",loang:\\\"⟬\\\",loarr:\\\"⇽\\\",lobrk:\\\"⟦\\\",LongLeftArrow:\\\"⟵\\\",Longleftarrow:\\\"⟸\\\",longleftarrow:\\\"⟵\\\",LongLeftRightArrow:\\\"⟷\\\",Longleftrightarrow:\\\"⟺\\\",longleftrightarrow:\\\"⟷\\\",longmapsto:\\\"⟼\\\",LongRightArrow:\\\"⟶\\\",Longrightarrow:\\\"⟹\\\",longrightarrow:\\\"⟶\\\",looparrowleft:\\\"↫\\\",looparrowright:\\\"↬\\\",lopar:\\\"⦅\\\",Lopf:\\\"𝕃\\\",lopf:\\\"𝕝\\\",loplus:\\\"⨭\\\",lotimes:\\\"⨴\\\",lowast:\\\"∗\\\",lowbar:\\\"_\\\",LowerLeftArrow:\\\"↙\\\",LowerRightArrow:\\\"↘\\\",loz:\\\"◊\\\",lozenge:\\\"◊\\\",lozf:\\\"⧫\\\",lpar:\\\"(\\\",lparlt:\\\"⦓\\\",lrarr:\\\"⇆\\\",lrcorner:\\\"⌟\\\",lrhar:\\\"⇋\\\",lrhard:\\\"⥭\\\",lrm:\\\"‎\\\",lrtri:\\\"⊿\\\",lsaquo:\\\"‹\\\",Lscr:\\\"ℒ\\\",lscr:\\\"𝓁\\\",Lsh:\\\"↰\\\",lsh:\\\"↰\\\",lsim:\\\"≲\\\",lsime:\\\"⪍\\\",lsimg:\\\"⪏\\\",lsqb:\\\"[\\\",lsquo:\\\"‘\\\",lsquor:\\\"‚\\\",Lstrok:\\\"Ł\\\",lstrok:\\\"ł\\\",Lt:\\\"≪\\\",LT:\\\"<\\\",lt:\\\"<\\\",ltcc:\\\"⪦\\\",ltcir:\\\"⩹\\\",ltdot:\\\"⋖\\\",lthree:\\\"⋋\\\",ltimes:\\\"⋉\\\",ltlarr:\\\"⥶\\\",ltquest:\\\"⩻\\\",ltri:\\\"◃\\\",ltrie:\\\"⊴\\\",ltrif:\\\"◂\\\",ltrPar:\\\"⦖\\\",lurdshar:\\\"⥊\\\",luruhar:\\\"⥦\\\",lvertneqq:\\\"≨︀\\\",lvnE:\\\"≨︀\\\",macr:\\\"¯\\\",male:\\\"♂\\\",malt:\\\"✠\\\",maltese:\\\"✠\\\",Map:\\\"⤅\\\",map:\\\"↦\\\",mapsto:\\\"↦\\\",mapstodown:\\\"↧\\\",mapstoleft:\\\"↤\\\",mapstoup:\\\"↥\\\",marker:\\\"▮\\\",mcomma:\\\"⨩\\\",Mcy:\\\"М\\\",mcy:\\\"м\\\",mdash:\\\"—\\\",mDDot:\\\"∺\\\",measuredangle:\\\"∡\\\",MediumSpace:\\\" \\\",Mellintrf:\\\"ℳ\\\",Mfr:\\\"𝔐\\\",mfr:\\\"𝔪\\\",mho:\\\"℧\\\",micro:\\\"µ\\\",mid:\\\"∣\\\",midast:\\\"*\\\",midcir:\\\"⫰\\\",middot:\\\"·\\\",minus:\\\"−\\\",minusb:\\\"⊟\\\",minusd:\\\"∸\\\",minusdu:\\\"⨪\\\",MinusPlus:\\\"∓\\\",mlcp:\\\"⫛\\\",mldr:\\\"…\\\",mnplus:\\\"∓\\\",models:\\\"⊧\\\",Mopf:\\\"𝕄\\\",mopf:\\\"𝕞\\\",mp:\\\"∓\\\",Mscr:\\\"ℳ\\\",mscr:\\\"𝓂\\\",mstpos:\\\"∾\\\",Mu:\\\"Μ\\\",mu:\\\"μ\\\",multimap:\\\"⊸\\\",mumap:\\\"⊸\\\",nabla:\\\"∇\\\",Nacute:\\\"Ń\\\",nacute:\\\"ń\\\",nang:\\\"∠⃒\\\",nap:\\\"≉\\\",napE:\\\"⩰̸\\\",napid:\\\"≋̸\\\",napos:\\\"ŉ\\\",napprox:\\\"≉\\\",natur:\\\"♮\\\",natural:\\\"♮\\\",naturals:\\\"ℕ\\\",nbsp:\\\" \\\",nbump:\\\"≎̸\\\",nbumpe:\\\"≏̸\\\",ncap:\\\"⩃\\\",Ncaron:\\\"Ň\\\",ncaron:\\\"ň\\\",Ncedil:\\\"Ņ\\\",ncedil:\\\"ņ\\\",ncong:\\\"≇\\\",ncongdot:\\\"⩭̸\\\",ncup:\\\"⩂\\\",Ncy:\\\"Н\\\",ncy:\\\"н\\\",ndash:\\\"–\\\",ne:\\\"≠\\\",nearhk:\\\"⤤\\\",neArr:\\\"⇗\\\",nearr:\\\"↗\\\",nearrow:\\\"↗\\\",nedot:\\\"≐̸\\\",NegativeMediumSpace:\\\"​\\\",NegativeThickSpace:\\\"​\\\",NegativeThinSpace:\\\"​\\\",NegativeVeryThinSpace:\\\"​\\\",nequiv:\\\"≢\\\",nesear:\\\"⤨\\\",nesim:\\\"≂̸\\\",NestedGreaterGreater:\\\"≫\\\",NestedLessLess:\\\"≪\\\",NewLine:\\\"\\\\n\\\",nexist:\\\"∄\\\",nexists:\\\"∄\\\",Nfr:\\\"𝔑\\\",nfr:\\\"𝔫\\\",ngE:\\\"≧̸\\\",nge:\\\"≱\\\",ngeq:\\\"≱\\\",ngeqq:\\\"≧̸\\\",ngeqslant:\\\"⩾̸\\\",nges:\\\"⩾̸\\\",nGg:\\\"⋙̸\\\",ngsim:\\\"≵\\\",nGt:\\\"≫⃒\\\",ngt:\\\"≯\\\",ngtr:\\\"≯\\\",nGtv:\\\"≫̸\\\",nhArr:\\\"⇎\\\",nharr:\\\"↮\\\",nhpar:\\\"⫲\\\",ni:\\\"∋\\\",nis:\\\"⋼\\\",nisd:\\\"⋺\\\",niv:\\\"∋\\\",NJcy:\\\"Њ\\\",njcy:\\\"њ\\\",nlArr:\\\"⇍\\\",nlarr:\\\"↚\\\",nldr:\\\"‥\\\",nlE:\\\"≦̸\\\",nle:\\\"≰\\\",nLeftarrow:\\\"⇍\\\",nleftarrow:\\\"↚\\\",nLeftrightarrow:\\\"⇎\\\",nleftrightarrow:\\\"↮\\\",nleq:\\\"≰\\\",nleqq:\\\"≦̸\\\",nleqslant:\\\"⩽̸\\\",nles:\\\"⩽̸\\\",nless:\\\"≮\\\",nLl:\\\"⋘̸\\\",nlsim:\\\"≴\\\",nLt:\\\"≪⃒\\\",nlt:\\\"≮\\\",nltri:\\\"⋪\\\",nltrie:\\\"⋬\\\",nLtv:\\\"≪̸\\\",nmid:\\\"∤\\\",NoBreak:\\\"⁠\\\",NonBreakingSpace:\\\" \\\",Nopf:\\\"ℕ\\\",nopf:\\\"𝕟\\\",Not:\\\"⫬\\\",not:\\\"¬\\\",NotCongruent:\\\"≢\\\",NotCupCap:\\\"≭\\\",NotDoubleVerticalBar:\\\"∦\\\",NotElement:\\\"∉\\\",NotEqual:\\\"≠\\\",NotEqualTilde:\\\"≂̸\\\",NotExists:\\\"∄\\\",NotGreater:\\\"≯\\\",NotGreaterEqual:\\\"≱\\\",NotGreaterFullEqual:\\\"≧̸\\\",NotGreaterGreater:\\\"≫̸\\\",NotGreaterLess:\\\"≹\\\",NotGreaterSlantEqual:\\\"⩾̸\\\",NotGreaterTilde:\\\"≵\\\",NotHumpDownHump:\\\"≎̸\\\",NotHumpEqual:\\\"≏̸\\\",notin:\\\"∉\\\",notindot:\\\"⋵̸\\\",notinE:\\\"⋹̸\\\",notinva:\\\"∉\\\",notinvb:\\\"⋷\\\",notinvc:\\\"⋶\\\",NotLeftTriangle:\\\"⋪\\\",NotLeftTriangleBar:\\\"⧏̸\\\",NotLeftTriangleEqual:\\\"⋬\\\",NotLess:\\\"≮\\\",NotLessEqual:\\\"≰\\\",NotLessGreater:\\\"≸\\\",NotLessLess:\\\"≪̸\\\",NotLessSlantEqual:\\\"⩽̸\\\",NotLessTilde:\\\"≴\\\",NotNestedGreaterGreater:\\\"⪢̸\\\",NotNestedLessLess:\\\"⪡̸\\\",notni:\\\"∌\\\",notniva:\\\"∌\\\",notnivb:\\\"⋾\\\",notnivc:\\\"⋽\\\",NotPrecedes:\\\"⊀\\\",NotPrecedesEqual:\\\"⪯̸\\\",NotPrecedesSlantEqual:\\\"⋠\\\",NotReverseElement:\\\"∌\\\",NotRightTriangle:\\\"⋫\\\",NotRightTriangleBar:\\\"⧐̸\\\",NotRightTriangleEqual:\\\"⋭\\\",NotSquareSubset:\\\"⊏̸\\\",NotSquareSubsetEqual:\\\"⋢\\\",NotSquareSuperset:\\\"⊐̸\\\",NotSquareSupersetEqual:\\\"⋣\\\",NotSubset:\\\"⊂⃒\\\",NotSubsetEqual:\\\"⊈\\\",NotSucceeds:\\\"⊁\\\",NotSucceedsEqual:\\\"⪰̸\\\",NotSucceedsSlantEqual:\\\"⋡\\\",NotSucceedsTilde:\\\"≿̸\\\",NotSuperset:\\\"⊃⃒\\\",NotSupersetEqual:\\\"⊉\\\",NotTilde:\\\"≁\\\",NotTildeEqual:\\\"≄\\\",NotTildeFullEqual:\\\"≇\\\",NotTildeTilde:\\\"≉\\\",NotVerticalBar:\\\"∤\\\",npar:\\\"∦\\\",nparallel:\\\"∦\\\",nparsl:\\\"⫽⃥\\\",npart:\\\"∂̸\\\",npolint:\\\"⨔\\\",npr:\\\"⊀\\\",nprcue:\\\"⋠\\\",npre:\\\"⪯̸\\\",nprec:\\\"⊀\\\",npreceq:\\\"⪯̸\\\",nrArr:\\\"⇏\\\",nrarr:\\\"↛\\\",nrarrc:\\\"⤳̸\\\",nrarrw:\\\"↝̸\\\",nRightarrow:\\\"⇏\\\",nrightarrow:\\\"↛\\\",nrtri:\\\"⋫\\\",nrtrie:\\\"⋭\\\",nsc:\\\"⊁\\\",nsccue:\\\"⋡\\\",nsce:\\\"⪰̸\\\",Nscr:\\\"𝒩\\\",nscr:\\\"𝓃\\\",nshortmid:\\\"∤\\\",nshortparallel:\\\"∦\\\",nsim:\\\"≁\\\",nsime:\\\"≄\\\",nsimeq:\\\"≄\\\",nsmid:\\\"∤\\\",nspar:\\\"∦\\\",nsqsube:\\\"⋢\\\",nsqsupe:\\\"⋣\\\",nsub:\\\"⊄\\\",nsubE:\\\"⫅̸\\\",nsube:\\\"⊈\\\",nsubset:\\\"⊂⃒\\\",nsubseteq:\\\"⊈\\\",nsubseteqq:\\\"⫅̸\\\",nsucc:\\\"⊁\\\",nsucceq:\\\"⪰̸\\\",nsup:\\\"⊅\\\",nsupE:\\\"⫆̸\\\",nsupe:\\\"⊉\\\",nsupset:\\\"⊃⃒\\\",nsupseteq:\\\"⊉\\\",nsupseteqq:\\\"⫆̸\\\",ntgl:\\\"≹\\\",Ntilde:\\\"Ñ\\\",ntilde:\\\"ñ\\\",ntlg:\\\"≸\\\",ntriangleleft:\\\"⋪\\\",ntrianglelefteq:\\\"⋬\\\",ntriangleright:\\\"⋫\\\",ntrianglerighteq:\\\"⋭\\\",Nu:\\\"Ν\\\",nu:\\\"ν\\\",num:\\\"#\\\",numero:\\\"№\\\",numsp:\\\" \\\",nvap:\\\"≍⃒\\\",nVDash:\\\"⊯\\\",nVdash:\\\"⊮\\\",nvDash:\\\"⊭\\\",nvdash:\\\"⊬\\\",nvge:\\\"≥⃒\\\",nvgt:\\\">⃒\\\",nvHarr:\\\"⤄\\\",nvinfin:\\\"⧞\\\",nvlArr:\\\"⤂\\\",nvle:\\\"≤⃒\\\",nvlt:\\\"<⃒\\\",nvltrie:\\\"⊴⃒\\\",nvrArr:\\\"⤃\\\",nvrtrie:\\\"⊵⃒\\\",nvsim:\\\"∼⃒\\\",nwarhk:\\\"⤣\\\",nwArr:\\\"⇖\\\",nwarr:\\\"↖\\\",nwarrow:\\\"↖\\\",nwnear:\\\"⤧\\\",Oacute:\\\"Ó\\\",oacute:\\\"ó\\\",oast:\\\"⊛\\\",ocir:\\\"⊚\\\",Ocirc:\\\"Ô\\\",ocirc:\\\"ô\\\",Ocy:\\\"О\\\",ocy:\\\"о\\\",odash:\\\"⊝\\\",Odblac:\\\"Ő\\\",odblac:\\\"ő\\\",odiv:\\\"⨸\\\",odot:\\\"⊙\\\",odsold:\\\"⦼\\\",OElig:\\\"Œ\\\",oelig:\\\"œ\\\",ofcir:\\\"⦿\\\",Ofr:\\\"𝔒\\\",ofr:\\\"𝔬\\\",ogon:\\\"˛\\\",Ograve:\\\"Ò\\\",ograve:\\\"ò\\\",ogt:\\\"⧁\\\",ohbar:\\\"⦵\\\",ohm:\\\"Ω\\\",oint:\\\"∮\\\",olarr:\\\"↺\\\",olcir:\\\"⦾\\\",olcross:\\\"⦻\\\",oline:\\\"‾\\\",olt:\\\"⧀\\\",Omacr:\\\"Ō\\\",omacr:\\\"ō\\\",Omega:\\\"Ω\\\",omega:\\\"ω\\\",Omicron:\\\"Ο\\\",omicron:\\\"ο\\\",omid:\\\"⦶\\\",ominus:\\\"⊖\\\",Oopf:\\\"𝕆\\\",oopf:\\\"𝕠\\\",opar:\\\"⦷\\\",OpenCurlyDoubleQuote:\\\"“\\\",OpenCurlyQuote:\\\"‘\\\",operp:\\\"⦹\\\",oplus:\\\"⊕\\\",Or:\\\"⩔\\\",or:\\\"∨\\\",orarr:\\\"↻\\\",ord:\\\"⩝\\\",order:\\\"ℴ\\\",orderof:\\\"ℴ\\\",ordf:\\\"ª\\\",ordm:\\\"º\\\",origof:\\\"⊶\\\",oror:\\\"⩖\\\",orslope:\\\"⩗\\\",orv:\\\"⩛\\\",oS:\\\"Ⓢ\\\",Oscr:\\\"𝒪\\\",oscr:\\\"ℴ\\\",Oslash:\\\"Ø\\\",oslash:\\\"ø\\\",osol:\\\"⊘\\\",Otilde:\\\"Õ\\\",otilde:\\\"õ\\\",Otimes:\\\"⨷\\\",otimes:\\\"⊗\\\",otimesas:\\\"⨶\\\",Ouml:\\\"Ö\\\",ouml:\\\"ö\\\",ovbar:\\\"⌽\\\",OverBar:\\\"‾\\\",OverBrace:\\\"⏞\\\",OverBracket:\\\"⎴\\\",OverParenthesis:\\\"⏜\\\",par:\\\"∥\\\",para:\\\"¶\\\",parallel:\\\"∥\\\",parsim:\\\"⫳\\\",parsl:\\\"⫽\\\",part:\\\"∂\\\",PartialD:\\\"∂\\\",Pcy:\\\"П\\\",pcy:\\\"п\\\",percnt:\\\"%\\\",period:\\\".\\\",permil:\\\"‰\\\",perp:\\\"⊥\\\",pertenk:\\\"‱\\\",Pfr:\\\"𝔓\\\",pfr:\\\"𝔭\\\",Phi:\\\"Φ\\\",phi:\\\"φ\\\",phiv:\\\"ϕ\\\",phmmat:\\\"ℳ\\\",phone:\\\"☎\\\",Pi:\\\"Π\\\",pi:\\\"π\\\",pitchfork:\\\"⋔\\\",piv:\\\"ϖ\\\",planck:\\\"ℏ\\\",planckh:\\\"ℎ\\\",plankv:\\\"ℏ\\\",plus:\\\"+\\\",plusacir:\\\"⨣\\\",plusb:\\\"⊞\\\",pluscir:\\\"⨢\\\",plusdo:\\\"∔\\\",plusdu:\\\"⨥\\\",pluse:\\\"⩲\\\",PlusMinus:\\\"±\\\",plusmn:\\\"±\\\",plussim:\\\"⨦\\\",plustwo:\\\"⨧\\\",pm:\\\"±\\\",Poincareplane:\\\"ℌ\\\",pointint:\\\"⨕\\\",Popf:\\\"ℙ\\\",popf:\\\"𝕡\\\",pound:\\\"£\\\",Pr:\\\"⪻\\\",pr:\\\"≺\\\",prap:\\\"⪷\\\",prcue:\\\"≼\\\",prE:\\\"⪳\\\",pre:\\\"⪯\\\",prec:\\\"≺\\\",precapprox:\\\"⪷\\\",preccurlyeq:\\\"≼\\\",Precedes:\\\"≺\\\",PrecedesEqual:\\\"⪯\\\",PrecedesSlantEqual:\\\"≼\\\",PrecedesTilde:\\\"≾\\\",preceq:\\\"⪯\\\",precnapprox:\\\"⪹\\\",precneqq:\\\"⪵\\\",precnsim:\\\"⋨\\\",precsim:\\\"≾\\\",Prime:\\\"″\\\",prime:\\\"′\\\",primes:\\\"ℙ\\\",prnap:\\\"⪹\\\",prnE:\\\"⪵\\\",prnsim:\\\"⋨\\\",prod:\\\"∏\\\",Product:\\\"∏\\\",profalar:\\\"⌮\\\",profline:\\\"⌒\\\",profsurf:\\\"⌓\\\",prop:\\\"∝\\\",Proportion:\\\"∷\\\",Proportional:\\\"∝\\\",propto:\\\"∝\\\",prsim:\\\"≾\\\",prurel:\\\"⊰\\\",Pscr:\\\"𝒫\\\",pscr:\\\"𝓅\\\",Psi:\\\"Ψ\\\",psi:\\\"ψ\\\",puncsp:\\\" \\\",Qfr:\\\"𝔔\\\",qfr:\\\"𝔮\\\",qint:\\\"⨌\\\",Qopf:\\\"ℚ\\\",qopf:\\\"𝕢\\\",qprime:\\\"⁗\\\",Qscr:\\\"𝒬\\\",qscr:\\\"𝓆\\\",quaternions:\\\"ℍ\\\",quatint:\\\"⨖\\\",quest:\\\"?\\\",questeq:\\\"≟\\\",QUOT:'\\\"',quot:'\\\"',rAarr:\\\"⇛\\\",race:\\\"∽̱\\\",Racute:\\\"Ŕ\\\",racute:\\\"ŕ\\\",radic:\\\"√\\\",raemptyv:\\\"⦳\\\",Rang:\\\"⟫\\\",rang:\\\"⟩\\\",rangd:\\\"⦒\\\",range:\\\"⦥\\\",rangle:\\\"⟩\\\",raquo:\\\"»\\\",Rarr:\\\"↠\\\",rArr:\\\"⇒\\\",rarr:\\\"→\\\",rarrap:\\\"⥵\\\",rarrb:\\\"⇥\\\",rarrbfs:\\\"⤠\\\",rarrc:\\\"⤳\\\",rarrfs:\\\"⤞\\\",rarrhk:\\\"↪\\\",rarrlp:\\\"↬\\\",rarrpl:\\\"⥅\\\",rarrsim:\\\"⥴\\\",Rarrtl:\\\"⤖\\\",rarrtl:\\\"↣\\\",rarrw:\\\"↝\\\",rAtail:\\\"⤜\\\",ratail:\\\"⤚\\\",ratio:\\\"∶\\\",rationals:\\\"ℚ\\\",RBarr:\\\"⤐\\\",rBarr:\\\"⤏\\\",rbarr:\\\"⤍\\\",rbbrk:\\\"❳\\\",rbrace:\\\"}\\\",rbrack:\\\"]\\\",rbrke:\\\"⦌\\\",rbrksld:\\\"⦎\\\",rbrkslu:\\\"⦐\\\",Rcaron:\\\"Ř\\\",rcaron:\\\"ř\\\",Rcedil:\\\"Ŗ\\\",rcedil:\\\"ŗ\\\",rceil:\\\"⌉\\\",rcub:\\\"}\\\",Rcy:\\\"Р\\\",rcy:\\\"р\\\",rdca:\\\"⤷\\\",rdldhar:\\\"⥩\\\",rdquo:\\\"”\\\",rdquor:\\\"”\\\",rdsh:\\\"↳\\\",Re:\\\"ℜ\\\",real:\\\"ℜ\\\",realine:\\\"ℛ\\\",realpart:\\\"ℜ\\\",reals:\\\"ℝ\\\",rect:\\\"▭\\\",REG:\\\"®\\\",reg:\\\"®\\\",ReverseElement:\\\"∋\\\",ReverseEquilibrium:\\\"⇋\\\",ReverseUpEquilibrium:\\\"⥯\\\",rfisht:\\\"⥽\\\",rfloor:\\\"⌋\\\",Rfr:\\\"ℜ\\\",rfr:\\\"𝔯\\\",rHar:\\\"⥤\\\",rhard:\\\"⇁\\\",rharu:\\\"⇀\\\",rharul:\\\"⥬\\\",Rho:\\\"Ρ\\\",rho:\\\"ρ\\\",rhov:\\\"ϱ\\\",RightAngleBracket:\\\"⟩\\\",RightArrow:\\\"→\\\",Rightarrow:\\\"⇒\\\",rightarrow:\\\"→\\\",RightArrowBar:\\\"⇥\\\",RightArrowLeftArrow:\\\"⇄\\\",rightarrowtail:\\\"↣\\\",RightCeiling:\\\"⌉\\\",RightDoubleBracket:\\\"⟧\\\",RightDownTeeVector:\\\"⥝\\\",RightDownVector:\\\"⇂\\\",RightDownVectorBar:\\\"⥕\\\",RightFloor:\\\"⌋\\\",rightharpoondown:\\\"⇁\\\",rightharpoonup:\\\"⇀\\\",rightleftarrows:\\\"⇄\\\",rightleftharpoons:\\\"⇌\\\",rightrightarrows:\\\"⇉\\\",rightsquigarrow:\\\"↝\\\",RightTee:\\\"⊢\\\",RightTeeArrow:\\\"↦\\\",RightTeeVector:\\\"⥛\\\",rightthreetimes:\\\"⋌\\\",RightTriangle:\\\"⊳\\\",RightTriangleBar:\\\"⧐\\\",RightTriangleEqual:\\\"⊵\\\",RightUpDownVector:\\\"⥏\\\",RightUpTeeVector:\\\"⥜\\\",RightUpVector:\\\"↾\\\",RightUpVectorBar:\\\"⥔\\\",RightVector:\\\"⇀\\\",RightVectorBar:\\\"⥓\\\",ring:\\\"˚\\\",risingdotseq:\\\"≓\\\",rlarr:\\\"⇄\\\",rlhar:\\\"⇌\\\",rlm:\\\"‏\\\",rmoust:\\\"⎱\\\",rmoustache:\\\"⎱\\\",rnmid:\\\"⫮\\\",roang:\\\"⟭\\\",roarr:\\\"⇾\\\",robrk:\\\"⟧\\\",ropar:\\\"⦆\\\",Ropf:\\\"ℝ\\\",ropf:\\\"𝕣\\\",roplus:\\\"⨮\\\",rotimes:\\\"⨵\\\",RoundImplies:\\\"⥰\\\",rpar:\\\")\\\",rpargt:\\\"⦔\\\",rppolint:\\\"⨒\\\",rrarr:\\\"⇉\\\",Rrightarrow:\\\"⇛\\\",rsaquo:\\\"›\\\",Rscr:\\\"ℛ\\\",rscr:\\\"𝓇\\\",Rsh:\\\"↱\\\",rsh:\\\"↱\\\",rsqb:\\\"]\\\",rsquo:\\\"’\\\",rsquor:\\\"’\\\",rthree:\\\"⋌\\\",rtimes:\\\"⋊\\\",rtri:\\\"▹\\\",rtrie:\\\"⊵\\\",rtrif:\\\"▸\\\",rtriltri:\\\"⧎\\\",RuleDelayed:\\\"⧴\\\",ruluhar:\\\"⥨\\\",rx:\\\"℞\\\",Sacute:\\\"Ś\\\",sacute:\\\"ś\\\",sbquo:\\\"‚\\\",Sc:\\\"⪼\\\",sc:\\\"≻\\\",scap:\\\"⪸\\\",Scaron:\\\"Š\\\",scaron:\\\"š\\\",sccue:\\\"≽\\\",scE:\\\"⪴\\\",sce:\\\"⪰\\\",Scedil:\\\"Ş\\\",scedil:\\\"ş\\\",Scirc:\\\"Ŝ\\\",scirc:\\\"ŝ\\\",scnap:\\\"⪺\\\",scnE:\\\"⪶\\\",scnsim:\\\"⋩\\\",scpolint:\\\"⨓\\\",scsim:\\\"≿\\\",Scy:\\\"С\\\",scy:\\\"с\\\",sdot:\\\"⋅\\\",sdotb:\\\"⊡\\\",sdote:\\\"⩦\\\",searhk:\\\"⤥\\\",seArr:\\\"⇘\\\",searr:\\\"↘\\\",searrow:\\\"↘\\\",sect:\\\"§\\\",semi:\\\";\\\",seswar:\\\"⤩\\\",setminus:\\\"∖\\\",setmn:\\\"∖\\\",sext:\\\"✶\\\",Sfr:\\\"𝔖\\\",sfr:\\\"𝔰\\\",sfrown:\\\"⌢\\\",sharp:\\\"♯\\\",SHCHcy:\\\"Щ\\\",shchcy:\\\"щ\\\",SHcy:\\\"Ш\\\",shcy:\\\"ш\\\",ShortDownArrow:\\\"↓\\\",ShortLeftArrow:\\\"←\\\",shortmid:\\\"∣\\\",shortparallel:\\\"∥\\\",ShortRightArrow:\\\"→\\\",ShortUpArrow:\\\"↑\\\",shy:\\\"­\\\",Sigma:\\\"Σ\\\",sigma:\\\"σ\\\",sigmaf:\\\"ς\\\",sigmav:\\\"ς\\\",sim:\\\"∼\\\",simdot:\\\"⩪\\\",sime:\\\"≃\\\",simeq:\\\"≃\\\",simg:\\\"⪞\\\",simgE:\\\"⪠\\\",siml:\\\"⪝\\\",simlE:\\\"⪟\\\",simne:\\\"≆\\\",simplus:\\\"⨤\\\",simrarr:\\\"⥲\\\",slarr:\\\"←\\\",SmallCircle:\\\"∘\\\",smallsetminus:\\\"∖\\\",smashp:\\\"⨳\\\",smeparsl:\\\"⧤\\\",smid:\\\"∣\\\",smile:\\\"⌣\\\",smt:\\\"⪪\\\",smte:\\\"⪬\\\",smtes:\\\"⪬︀\\\",SOFTcy:\\\"Ь\\\",softcy:\\\"ь\\\",sol:\\\"/\\\",solb:\\\"⧄\\\",solbar:\\\"⌿\\\",Sopf:\\\"𝕊\\\",sopf:\\\"𝕤\\\",spades:\\\"♠\\\",spadesuit:\\\"♠\\\",spar:\\\"∥\\\",sqcap:\\\"⊓\\\",sqcaps:\\\"⊓︀\\\",sqcup:\\\"⊔\\\",sqcups:\\\"⊔︀\\\",Sqrt:\\\"√\\\",sqsub:\\\"⊏\\\",sqsube:\\\"⊑\\\",sqsubset:\\\"⊏\\\",sqsubseteq:\\\"⊑\\\",sqsup:\\\"⊐\\\",sqsupe:\\\"⊒\\\",sqsupset:\\\"⊐\\\",sqsupseteq:\\\"⊒\\\",squ:\\\"□\\\",Square:\\\"□\\\",square:\\\"□\\\",SquareIntersection:\\\"⊓\\\",SquareSubset:\\\"⊏\\\",SquareSubsetEqual:\\\"⊑\\\",SquareSuperset:\\\"⊐\\\",SquareSupersetEqual:\\\"⊒\\\",SquareUnion:\\\"⊔\\\",squarf:\\\"▪\\\",squf:\\\"▪\\\",srarr:\\\"→\\\",Sscr:\\\"𝒮\\\",sscr:\\\"𝓈\\\",ssetmn:\\\"∖\\\",ssmile:\\\"⌣\\\",sstarf:\\\"⋆\\\",Star:\\\"⋆\\\",star:\\\"☆\\\",starf:\\\"★\\\",straightepsilon:\\\"ϵ\\\",straightphi:\\\"ϕ\\\",strns:\\\"¯\\\",Sub:\\\"⋐\\\",sub:\\\"⊂\\\",subdot:\\\"⪽\\\",subE:\\\"⫅\\\",sube:\\\"⊆\\\",subedot:\\\"⫃\\\",submult:\\\"⫁\\\",subnE:\\\"⫋\\\",subne:\\\"⊊\\\",subplus:\\\"⪿\\\",subrarr:\\\"⥹\\\",Subset:\\\"⋐\\\",subset:\\\"⊂\\\",subseteq:\\\"⊆\\\",subseteqq:\\\"⫅\\\",SubsetEqual:\\\"⊆\\\",subsetneq:\\\"⊊\\\",subsetneqq:\\\"⫋\\\",subsim:\\\"⫇\\\",subsub:\\\"⫕\\\",subsup:\\\"⫓\\\",succ:\\\"≻\\\",succapprox:\\\"⪸\\\",succcurlyeq:\\\"≽\\\",Succeeds:\\\"≻\\\",SucceedsEqual:\\\"⪰\\\",SucceedsSlantEqual:\\\"≽\\\",SucceedsTilde:\\\"≿\\\",succeq:\\\"⪰\\\",succnapprox:\\\"⪺\\\",succneqq:\\\"⪶\\\",succnsim:\\\"⋩\\\",succsim:\\\"≿\\\",SuchThat:\\\"∋\\\",Sum:\\\"∑\\\",sum:\\\"∑\\\",sung:\\\"♪\\\",Sup:\\\"⋑\\\",sup:\\\"⊃\\\",sup1:\\\"¹\\\",sup2:\\\"²\\\",sup3:\\\"³\\\",supdot:\\\"⪾\\\",supdsub:\\\"⫘\\\",supE:\\\"⫆\\\",supe:\\\"⊇\\\",supedot:\\\"⫄\\\",Superset:\\\"⊃\\\",SupersetEqual:\\\"⊇\\\",suphsol:\\\"⟉\\\",suphsub:\\\"⫗\\\",suplarr:\\\"⥻\\\",supmult:\\\"⫂\\\",supnE:\\\"⫌\\\",supne:\\\"⊋\\\",supplus:\\\"⫀\\\",Supset:\\\"⋑\\\",supset:\\\"⊃\\\",supseteq:\\\"⊇\\\",supseteqq:\\\"⫆\\\",supsetneq:\\\"⊋\\\",supsetneqq:\\\"⫌\\\",supsim:\\\"⫈\\\",supsub:\\\"⫔\\\",supsup:\\\"⫖\\\",swarhk:\\\"⤦\\\",swArr:\\\"⇙\\\",swarr:\\\"↙\\\",swarrow:\\\"↙\\\",swnwar:\\\"⤪\\\",szlig:\\\"ß\\\",Tab:\\\"\\\\t\\\",target:\\\"⌖\\\",Tau:\\\"Τ\\\",tau:\\\"τ\\\",tbrk:\\\"⎴\\\",Tcaron:\\\"Ť\\\",tcaron:\\\"ť\\\",Tcedil:\\\"Ţ\\\",tcedil:\\\"ţ\\\",Tcy:\\\"Т\\\",tcy:\\\"т\\\",tdot:\\\"⃛\\\",telrec:\\\"⌕\\\",Tfr:\\\"𝔗\\\",tfr:\\\"𝔱\\\",there4:\\\"∴\\\",Therefore:\\\"∴\\\",therefore:\\\"∴\\\",Theta:\\\"Θ\\\",theta:\\\"θ\\\",thetasym:\\\"ϑ\\\",thetav:\\\"ϑ\\\",thickapprox:\\\"≈\\\",thicksim:\\\"∼\\\",ThickSpace:\\\"  \\\",thinsp:\\\" \\\",ThinSpace:\\\" \\\",thkap:\\\"≈\\\",thksim:\\\"∼\\\",THORN:\\\"Þ\\\",thorn:\\\"þ\\\",Tilde:\\\"∼\\\",tilde:\\\"˜\\\",TildeEqual:\\\"≃\\\",TildeFullEqual:\\\"≅\\\",TildeTilde:\\\"≈\\\",times:\\\"×\\\",timesb:\\\"⊠\\\",timesbar:\\\"⨱\\\",timesd:\\\"⨰\\\",tint:\\\"∭\\\",toea:\\\"⤨\\\",top:\\\"⊤\\\",topbot:\\\"⌶\\\",topcir:\\\"⫱\\\",Topf:\\\"𝕋\\\",topf:\\\"𝕥\\\",topfork:\\\"⫚\\\",tosa:\\\"⤩\\\",tprime:\\\"‴\\\",TRADE:\\\"™\\\",trade:\\\"™\\\",triangle:\\\"▵\\\",triangledown:\\\"▿\\\",triangleleft:\\\"◃\\\",trianglelefteq:\\\"⊴\\\",triangleq:\\\"≜\\\",triangleright:\\\"▹\\\",trianglerighteq:\\\"⊵\\\",tridot:\\\"◬\\\",trie:\\\"≜\\\",triminus:\\\"⨺\\\",TripleDot:\\\"⃛\\\",triplus:\\\"⨹\\\",trisb:\\\"⧍\\\",tritime:\\\"⨻\\\",trpezium:\\\"⏢\\\",Tscr:\\\"𝒯\\\",tscr:\\\"𝓉\\\",TScy:\\\"Ц\\\",tscy:\\\"ц\\\",TSHcy:\\\"Ћ\\\",tshcy:\\\"ћ\\\",Tstrok:\\\"Ŧ\\\",tstrok:\\\"ŧ\\\",twixt:\\\"≬\\\",twoheadleftarrow:\\\"↞\\\",twoheadrightarrow:\\\"↠\\\",Uacute:\\\"Ú\\\",uacute:\\\"ú\\\",Uarr:\\\"↟\\\",uArr:\\\"⇑\\\",uarr:\\\"↑\\\",Uarrocir:\\\"⥉\\\",Ubrcy:\\\"Ў\\\",ubrcy:\\\"ў\\\",Ubreve:\\\"Ŭ\\\",ubreve:\\\"ŭ\\\",Ucirc:\\\"Û\\\",ucirc:\\\"û\\\",Ucy:\\\"У\\\",ucy:\\\"у\\\",udarr:\\\"⇅\\\",Udblac:\\\"Ű\\\",udblac:\\\"ű\\\",udhar:\\\"⥮\\\",ufisht:\\\"⥾\\\",Ufr:\\\"𝔘\\\",ufr:\\\"𝔲\\\",Ugrave:\\\"Ù\\\",ugrave:\\\"ù\\\",uHar:\\\"⥣\\\",uharl:\\\"↿\\\",uharr:\\\"↾\\\",uhblk:\\\"▀\\\",ulcorn:\\\"⌜\\\",ulcorner:\\\"⌜\\\",ulcrop:\\\"⌏\\\",ultri:\\\"◸\\\",Umacr:\\\"Ū\\\",umacr:\\\"ū\\\",uml:\\\"¨\\\",UnderBar:\\\"_\\\",UnderBrace:\\\"⏟\\\",UnderBracket:\\\"⎵\\\",UnderParenthesis:\\\"⏝\\\",Union:\\\"⋃\\\",UnionPlus:\\\"⊎\\\",Uogon:\\\"Ų\\\",uogon:\\\"ų\\\",Uopf:\\\"𝕌\\\",uopf:\\\"𝕦\\\",UpArrow:\\\"↑\\\",Uparrow:\\\"⇑\\\",uparrow:\\\"↑\\\",UpArrowBar:\\\"⤒\\\",UpArrowDownArrow:\\\"⇅\\\",UpDownArrow:\\\"↕\\\",Updownarrow:\\\"⇕\\\",updownarrow:\\\"↕\\\",UpEquilibrium:\\\"⥮\\\",upharpoonleft:\\\"↿\\\",upharpoonright:\\\"↾\\\",uplus:\\\"⊎\\\",UpperLeftArrow:\\\"↖\\\",UpperRightArrow:\\\"↗\\\",Upsi:\\\"ϒ\\\",upsi:\\\"υ\\\",upsih:\\\"ϒ\\\",Upsilon:\\\"Υ\\\",upsilon:\\\"υ\\\",UpTee:\\\"⊥\\\",UpTeeArrow:\\\"↥\\\",upuparrows:\\\"⇈\\\",urcorn:\\\"⌝\\\",urcorner:\\\"⌝\\\",urcrop:\\\"⌎\\\",Uring:\\\"Ů\\\",uring:\\\"ů\\\",urtri:\\\"◹\\\",Uscr:\\\"𝒰\\\",uscr:\\\"𝓊\\\",utdot:\\\"⋰\\\",Utilde:\\\"Ũ\\\",utilde:\\\"ũ\\\",utri:\\\"▵\\\",utrif:\\\"▴\\\",uuarr:\\\"⇈\\\",Uuml:\\\"Ü\\\",uuml:\\\"ü\\\",uwangle:\\\"⦧\\\",vangrt:\\\"⦜\\\",varepsilon:\\\"ϵ\\\",varkappa:\\\"ϰ\\\",varnothing:\\\"∅\\\",varphi:\\\"ϕ\\\",varpi:\\\"ϖ\\\",varpropto:\\\"∝\\\",vArr:\\\"⇕\\\",varr:\\\"↕\\\",varrho:\\\"ϱ\\\",varsigma:\\\"ς\\\",varsubsetneq:\\\"⊊︀\\\",varsubsetneqq:\\\"⫋︀\\\",varsupsetneq:\\\"⊋︀\\\",varsupsetneqq:\\\"⫌︀\\\",vartheta:\\\"ϑ\\\",vartriangleleft:\\\"⊲\\\",vartriangleright:\\\"⊳\\\",Vbar:\\\"⫫\\\",vBar:\\\"⫨\\\",vBarv:\\\"⫩\\\",Vcy:\\\"В\\\",vcy:\\\"в\\\",VDash:\\\"⊫\\\",Vdash:\\\"⊩\\\",vDash:\\\"⊨\\\",vdash:\\\"⊢\\\",Vdashl:\\\"⫦\\\",Vee:\\\"⋁\\\",vee:\\\"∨\\\",veebar:\\\"⊻\\\",veeeq:\\\"≚\\\",vellip:\\\"⋮\\\",Verbar:\\\"‖\\\",verbar:\\\"|\\\",Vert:\\\"‖\\\",vert:\\\"|\\\",VerticalBar:\\\"∣\\\",VerticalLine:\\\"|\\\",VerticalSeparator:\\\"❘\\\",VerticalTilde:\\\"≀\\\",VeryThinSpace:\\\" \\\",Vfr:\\\"𝔙\\\",vfr:\\\"𝔳\\\",vltri:\\\"⊲\\\",vnsub:\\\"⊂⃒\\\",vnsup:\\\"⊃⃒\\\",Vopf:\\\"𝕍\\\",vopf:\\\"𝕧\\\",vprop:\\\"∝\\\",vrtri:\\\"⊳\\\",Vscr:\\\"𝒱\\\",vscr:\\\"𝓋\\\",vsubnE:\\\"⫋︀\\\",vsubne:\\\"⊊︀\\\",vsupnE:\\\"⫌︀\\\",vsupne:\\\"⊋︀\\\",Vvdash:\\\"⊪\\\",vzigzag:\\\"⦚\\\",Wcirc:\\\"Ŵ\\\",wcirc:\\\"ŵ\\\",wedbar:\\\"⩟\\\",Wedge:\\\"⋀\\\",wedge:\\\"∧\\\",wedgeq:\\\"≙\\\",weierp:\\\"℘\\\",Wfr:\\\"𝔚\\\",wfr:\\\"𝔴\\\",Wopf:\\\"𝕎\\\",wopf:\\\"𝕨\\\",wp:\\\"℘\\\",wr:\\\"≀\\\",wreath:\\\"≀\\\",Wscr:\\\"𝒲\\\",wscr:\\\"𝓌\\\",xcap:\\\"⋂\\\",xcirc:\\\"◯\\\",xcup:\\\"⋃\\\",xdtri:\\\"▽\\\",Xfr:\\\"𝔛\\\",xfr:\\\"𝔵\\\",xhArr:\\\"⟺\\\",xharr:\\\"⟷\\\",Xi:\\\"Ξ\\\",xi:\\\"ξ\\\",xlArr:\\\"⟸\\\",xlarr:\\\"⟵\\\",xmap:\\\"⟼\\\",xnis:\\\"⋻\\\",xodot:\\\"⨀\\\",Xopf:\\\"𝕏\\\",xopf:\\\"𝕩\\\",xoplus:\\\"⨁\\\",xotime:\\\"⨂\\\",xrArr:\\\"⟹\\\",xrarr:\\\"⟶\\\",Xscr:\\\"𝒳\\\",xscr:\\\"𝓍\\\",xsqcup:\\\"⨆\\\",xuplus:\\\"⨄\\\",xutri:\\\"△\\\",xvee:\\\"⋁\\\",xwedge:\\\"⋀\\\",Yacute:\\\"Ý\\\",yacute:\\\"ý\\\",YAcy:\\\"Я\\\",yacy:\\\"я\\\",Ycirc:\\\"Ŷ\\\",ycirc:\\\"ŷ\\\",Ycy:\\\"Ы\\\",ycy:\\\"ы\\\",yen:\\\"¥\\\",Yfr:\\\"𝔜\\\",yfr:\\\"𝔶\\\",YIcy:\\\"Ї\\\",yicy:\\\"ї\\\",Yopf:\\\"𝕐\\\",yopf:\\\"𝕪\\\",Yscr:\\\"𝒴\\\",yscr:\\\"𝓎\\\",YUcy:\\\"Ю\\\",yucy:\\\"ю\\\",Yuml:\\\"Ÿ\\\",yuml:\\\"ÿ\\\",Zacute:\\\"Ź\\\",zacute:\\\"ź\\\",Zcaron:\\\"Ž\\\",zcaron:\\\"ž\\\",Zcy:\\\"З\\\",zcy:\\\"з\\\",Zdot:\\\"Ż\\\",zdot:\\\"ż\\\",zeetrf:\\\"ℨ\\\",ZeroWidthSpace:\\\"​\\\",Zeta:\\\"Ζ\\\",zeta:\\\"ζ\\\",Zfr:\\\"ℨ\\\",zfr:\\\"𝔷\\\",ZHcy:\\\"Ж\\\",zhcy:\\\"ж\\\",zigrarr:\\\"⇝\\\",Zopf:\\\"ℤ\\\",zopf:\\\"𝕫\\\",Zscr:\\\"𝒵\\\",zscr:\\\"𝓏\\\",zwj:\\\"‍\\\",zwnj:\\\"‌\\\"}),e.entityMap=e.HTML_ENTITIES}(Qs);var Js={},Zs=Ii.NAMESPACE,en=/[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/,tn=new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+en.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\"),sn=new RegExp(\\\"^\\\"+en.source+tn.source+\\\"*(?::\\\"+en.source+tn.source+\\\"*)?$\\\");function nn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nn)}function rn(){}function an(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function on(e,t,i,s,n,r){function a(e,t,s){i.attributeNames.hasOwnProperty(e)&&r.fatalError(\\\"Attribute \\\"+e+\\\" redefined\\\"),i.addValue(e,t.replace(/[\\\\t\\\\n\\\\r]/g,\\\" \\\").replace(/&#?\\\\w+;/g,n),s)}for(var o,l=++t,c=0;;){var d=e.charAt(l);switch(d){case\\\"=\\\":if(1===c)o=e.slice(t,l),c=3;else{if(2!==c)throw new Error(\\\"attribute equal must after attrName\\\");c=3}break;case\\\"'\\\":case'\\\"':if(3===c||1===c){if(1===c&&(r.warning('attribute value must after \\\"=\\\"'),o=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error(\\\"attribute value no end '\\\"+d+\\\"' match\\\");a(o,u=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after \\\"=\\\"');a(o,u=e.slice(t,l),t),r.warning('attribute \\\"'+o+'\\\" missed start quot('+d+\\\")!!\\\"),t=l+1,c=5}break;case\\\"/\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error(\\\"attribute invalid close char('/')\\\")}break;case\\\"\\\":return r.error(\\\"unexpected end of input\\\"),0==c&&i.setTagName(e.slice(t,l)),l;case\\\">\\\":switch(c){case 0:i.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:\\\"/\\\"===(u=e.slice(t,l)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=o),4==c?(r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!'),a(o,u,t)):(Zs.isHTML(s[\\\"\\\"])&&u.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+u+'\\\" missed value!! \\\"'+u+'\\\" instead!!'),a(u,u,t));break;case 3:throw new Error(\\\"attribute value missed!!\\\")}return l;case\\\"\\\":d=\\\" \\\";default:if(d<=\\\" \\\")switch(c){case 0:i.setTagName(e.slice(t,l)),c=6;break;case 1:o=e.slice(t,l),c=2;break;case 4:var u=e.slice(t,l);r.warning('attribute \\\"'+u+'\\\" missed quot(\\\")!!'),a(o,u,t);case 5:c=6}else switch(c){case 2:i.tagName,Zs.isHTML(s[\\\"\\\"])&&o.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute \\\"'+o+'\\\" missed value!! \\\"'+o+'\\\" instead2!!'),a(o,o,t),t=l,c=1;break;case 5:r.warning('attribute space is required\\\"'+o+'\\\"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error(\\\"elements closed character '/' and '>' must be connected to\\\")}}l++}}function ln(e,t,i){for(var s=e.tagName,n=null,r=e.length;r--;){var a=e[r],o=a.qName,l=a.value;if((h=o.indexOf(\\\":\\\"))>0)var c=a.prefix=o.slice(0,h),d=o.slice(h+1),u=\\\"xmlns\\\"===c&&d;else d=o,c=null,u=\\\"xmlns\\\"===o&&\\\"\\\";a.localName=d,!1!==u&&(null==n&&(n={},un(i,i={})),i[u]=n[u]=l,a.uri=Zs.XMLNS,t.startPrefixMapping(u,l))}for(r=e.length;r--;){(c=(a=e[r]).prefix)&&(\\\"xml\\\"===c&&(a.uri=Zs.XML),\\\"xmlns\\\"!==c&&(a.uri=i[c||\\\"\\\"]))}var h;(h=s.indexOf(\\\":\\\"))>0?(c=e.prefix=s.slice(0,h),d=e.localName=s.slice(h+1)):(c=null,d=e.localName=s);var p=e.uri=i[c||\\\"\\\"];if(t.startElement(p,d,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(p,d,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function cn(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf(\\\"</\\\"+i+\\\">\\\",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\\\\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function dn(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(\\\"</\\\"+i+\\\">\\\"))<t&&(n=e.lastIndexOf(\\\"</\\\"+i)),s[i]=n),n<t}function un(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function hn(e,t,i,s){if(\\\"-\\\"===e.charAt(t+2))return\\\"-\\\"===e.charAt(t+3)?(n=e.indexOf(\\\"--\\\\x3e\\\",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(s.error(\\\"Unclosed comment\\\"),-1):-1;if(\\\"CDATA[\\\"==e.substr(t+3,6)){var n=e.indexOf(\\\"]]>\\\",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function pn(e,t,i){var s=e.indexOf(\\\"?>\\\",t);if(s){var n=e.substring(t,s).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function mn(){this.attributeNames={}}nn.prototype=new Error,nn.prototype.name=nn.name,rn.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),un(t,t={}),function(e,t,i,s,n){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:\\\"#\\\"===t.charAt(0)?r(parseInt(t.substr(1).replace(\\\"x\\\",\\\"0x\\\"))):(n.error(\\\"entity not found:\\\"+e),e)}function o(t){if(t>g){var i=e.substring(g,t).replace(/&#?\\\\w+;/g,a);h&&l(g),s.characters(i,0,t-g),g=t}}function l(t,i){for(;t>=d&&(i=u.exec(e));)c=i.index,d=c+i[0].length,h.lineNumber++;h.columnNumber=t-c+1}var c=0,d=0,u=/.*(?:\\\\r\\\\n?|\\\\n)|.*$/g,h=s.locator,p=[{currentNSMap:t}],m={},g=0;for(;;){try{var f=e.indexOf(\\\"<\\\",g);if(f<0){if(!e.substr(g).match(/^\\\\s*$/)){var y=s.doc,v=y.createTextNode(e.substr(g));y.appendChild(v),s.currentElement=v}return}switch(f>g&&o(f),e.charAt(f+1)){case\\\"/\\\":var b=e.indexOf(\\\">\\\",f+3),_=e.substring(f+2,b).replace(/[ \\\\t\\\\n\\\\r]+$/g,\\\"\\\"),T=p.pop();b<0?(_=e.substring(f+2).replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" is not complete:\\\"+T.tagName),b=f+1+_.length):_.match(/\\\\s</)&&(_=_.replace(/[\\\\s<].*/,\\\"\\\"),n.error(\\\"end tag name: \\\"+_+\\\" maybe not complete\\\"),b=f+1+_.length);var S=T.localNSMap,w=T.tagName==_;if(w||T.tagName&&T.tagName.toLowerCase()==_.toLowerCase()){if(s.endElement(T.uri,T.localName,_),S)for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&s.endPrefixMapping(k);w||n.fatalError(\\\"end tag name: \\\"+_+\\\" is not match the current start tagName:\\\"+T.tagName)}else p.push(T);b++;break;case\\\"?\\\":h&&l(f),b=pn(e,f,s);break;case\\\"!\\\":h&&l(f),b=hn(e,f,s,n);break;default:h&&l(f);var x=new mn,E=p[p.length-1].currentNSMap,C=(b=on(e,f,x,E,a,n),x.length);if(!x.closed&&dn(e,b,x.tagName,m)&&(x.closed=!0,i.nbsp||n.warning(\\\"unclosed xml attribute\\\")),h&&C){for(var A=an(h,{}),I=0;I<C;I++){var j=x[I];l(j.offset),j.locator=an(h,{})}s.locator=A,ln(x,s,E)&&p.push(x),s.locator=h}else ln(x,s,E)&&p.push(x);Zs.isHTML(x.uri)&&!x.closed?b=cn(e,b,x.tagName,a,s):b++}}catch(e){if(e instanceof nn)throw e;n.error(\\\"element parse error: \\\"+e),b=-1}b>g?g=b:o(Math.max(f,g)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},mn.prototype={setTagName:function(e){if(!sn.test(e))throw new Error(\\\"invalid tagName:\\\"+e);this.tagName=e},addValue:function(e,t,i){if(!sn.test(e))throw new Error(\\\"invalid attribute:\\\"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Js.XMLReader=rn,Js.ParseError=nn;var gn=Ii,fn=Qs,yn=Js,vn=Ai.DOMImplementation,bn=gn.NAMESPACE,_n=yn.ParseError,Tn=yn.XMLReader;function Sn(e){return e.replace(/\\\\r[\\\\n\\\\u0085]/g,\\\"\\\\n\\\").replace(/[\\\\r\\\\u0085\\\\u2028]/g,\\\"\\\\n\\\")}function wn(e){this.options=e||{locator:{}}}function kn(){this.cdata=!1}function xn(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function En(e){if(e)return\\\"\\\\n@\\\"+(e.systemId||\\\"\\\")+\\\"#[line:\\\"+e.lineNumber+\\\",col:\\\"+e.columnNumber+\\\"]\\\"}function Cn(e,t,i){return\\\"string\\\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\\\"\\\":e}function An(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wn.prototype.parseFromString=function(e,t){var i=this.options,s=new Tn,n=i.domBuilder||new kn,r=i.errorHandler,a=i.locator,o=i.xmlns||{},l=/\\\\/x?html?$/.test(t),c=l?fn.HTML_ENTITIES:fn.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=function(e,t,i){if(!e){if(t instanceof kn)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r(\\\"[xmldom \\\"+t+\\\"]\\\\t\\\"+e+En(i))}||function(){}}return i=i||{},r(\\\"warning\\\"),r(\\\"error\\\"),r(\\\"fatalError\\\"),s}(r,n,a),s.domBuilder=i.domBuilder||n,l&&(o[\\\"\\\"]=bn.HTML),o.xml=o.xml||bn.XML;var d=i.normalizeLineEndings||Sn;return e&&\\\"string\\\"==typeof e?s.parse(d(e),o,c):s.errorHandler.error(\\\"invalid doc source\\\"),n.doc},kn.prototype={startDocument:function(){this.doc=(new vn).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;An(this,r),this.currentElement=r,this.locator&&xn(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),c=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&xn(s.getLocator(o),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&xn(this.locator,i),An(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Cn.apply(this,arguments)){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\\\\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&xn(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Cn.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&xn(this.locator,s),An(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&xn(this.locator,n),An(this,n),this.doc.doctype=n}},warning:function(e){console.warn(\\\"[xmldom warning]\\\\t\\\"+e,En(this.locator))},error:function(e){console.error(\\\"[xmldom error]\\\\t\\\"+e,En(this.locator))},fatalError:function(e){throw new _n(e,this.locator)}},\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(e){kn.prototype[e]=function(){return null}}),Ks.__DOMHandler=kn,Ks.normalizeLineEndings=Sn,Ks.DOMParser=wn;var In=Ks.DOMParser;\\n/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jn=e=>!!e&&\\\"object\\\"==typeof e,Dn=(...e)=>e.reduce((e,t)=>(\\\"object\\\"!=typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):jn(e[i])&&jn(t[i])?e[i]=Dn(e[i],t[i]):e[i]=t[i]}),e),{}),Pn=e=>Object.keys(e).map(t=>e[t]),Ln=e=>e.reduce((e,t)=>e.concat(t),[]),On=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var Nn=\\\"INVALID_NUMBER_OF_PERIOD\\\",Mn=\\\"DASH_EMPTY_MANIFEST\\\",Rn=\\\"DASH_INVALID_XML\\\",Un=\\\"NO_BASE_URL\\\",Bn=\\\"SEGMENT_TIME_UNSPECIFIED\\\",Fn=\\\"UNSUPPORTED_UTC_TIMING_SCHEME\\\";const qn=({baseUrl:e=\\\"\\\",source:t=\\\"\\\",range:i=\\\"\\\",indexRange:s=\\\"\\\"})=>{const n={uri:t,resolvedUri:Gt(e||\\\"\\\",t)};if(i||s){const e=(i||s).split(\\\"-\\\");let t,r=Le.BigInt?Le.BigInt(e[0]):parseInt(e[0],10),a=Le.BigInt?Le.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&\\\"bigint\\\"==typeof a&&(a=Number(a)),t=\\\"bigint\\\"==typeof a||\\\"bigint\\\"==typeof r?Le.BigInt(a)-Le.BigInt(r)+Le.BigInt(1):a-r+1,\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),n.byterange={length:t,offset:r}}return n},$n=e=>(e&&\\\"number\\\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),zn={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=$n(e.endNumber),a=t/i;return\\\"number\\\"==typeof r?{start:0,end:r}:\\\"number\\\"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=$n(e.endNumber),d=(t+i)/1e3,u=s+a,h=d+o-u,p=Math.ceil(h*n/r),m=Math.floor((d-u-l)*n/r),g=Math.floor((d-u)*n/r);return{start:Math.max(0,m),end:\\\"number\\\"==typeof c?c:Math.min(p,g)}}},Hn=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=zn[t](e),l=((e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i})(a,o).map((e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if(\\\"static\\\"===t){const e=l.length-1,t=\\\"number\\\"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Vn=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n=\\\"\\\",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(Un);const c=qn({baseUrl:t,source:i.sourceURL,range:i.range}),d=qn({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Hn(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Wn=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter(e=>1!==e.referenceType),d=[],u=e.endList?\\\"static\\\":\\\"dynamic\\\",h=e.sidx.timeline;let p,m=h,g=e.mediaSequence||0;p=\\\"bigint\\\"==typeof t.firstOffset?Le.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<c.length;e++){const a=t.references[e],o=a.referencedSize,c=a.subsegmentDuration;let f;f=\\\"bigint\\\"==typeof p?p+Le.BigInt(o)-Le.BigInt(1):p+o-1;const y=Vn({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:m,number:g,duration:c,sourceDuration:n,indexRange:`${p}-${f}`,type:u})[0];s&&(y.map=s),d.push(y),p+=\\\"bigint\\\"==typeof p?Le.BigInt(o):o,m+=c/l,g++}return e.segments=d,e},Gn=[\\\"AUDIO\\\",\\\"SUBTITLES\\\"],Xn=1/60,Yn=e=>{return(t=e,i=({timeline:e})=>e,Pn(t.reduce((e,t)=>(t.forEach(t=>{e[i(t)]=t}),e),{}))).sort((e,t)=>e.timeline>t.timeline?1:-1);var t,i},Kn=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Gn.forEach(function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r,e,t,n)}}),t},Qn=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},Jn=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Kn(e)),s=t.playlists.concat(Kn(t));return t.timelineStarts=Yn([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline});const s=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex(function(e){return Math.abs(e.presentationTime-n.presentationTime)<Xn});if(-1===r)return Qn({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Qn({playlist:t,mediaSequence:s.segments[r].number})})})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Zn=e=>e&&e.uri+\\\"-\\\"+(e=>{let t;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),er=e=>{const t=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let i=[];return Object.values(t).forEach(e=>{const t=Pn(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||\\\"\\\");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i=\\\"discontinuity\\\",t.reduce((e,t,s)=>(t[i]&&e.push(s),e),[])),e})},tr=(e,t)=>{const i=Zn(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Wn(e,s,e.sidx.resolvedUri),e},ir=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=tr(e[i],t);return e},sr=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:\\\"audio\\\",SUBTITLES:\\\"subs\\\",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes[\\\"FRAME-RATE\\\"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},nr=({attributes:e})=>\\\"video/mp4\\\"===e.mimeType||\\\"video/webm\\\"===e.mimeType||\\\"video\\\"===e.contentType,rr=({attributes:e})=>\\\"audio/mp4\\\"===e.mimeType||\\\"audio/webm\\\"===e.mimeType||\\\"audio\\\"===e.contentType,ar=({attributes:e})=>\\\"text/vtt\\\"===e.mimeType||\\\"text\\\"===e.contentType,or=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],lr=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=er(e.filter(nr)).map(sr),u=er(e.filter(rr)),h=er(e.filter(ar)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:\\\"\\\",duration:a,playlists:ir(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),\\\"dynamic\\\"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=u.length?((e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||\\\"\\\",a=n.attributes.lang||\\\"\\\";let o=n.attributes.label||\\\"main\\\";if(a&&!n.attributes.label){const e=r?` (${r})`:\\\"\\\";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:\\\"main\\\"===r,playlists:[],uri:\\\"\\\"});const l=tr((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,\\\"PROGRAM-ID\\\":1},uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO=\\\"audio\\\",o.attributes.SUBTITLES=\\\"subs\\\"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&\\\"main\\\"===r&&(s=n,s.default=!0),e},{});s||(n[Object.keys(n)[0]].default=!0);return n})(u,s,g):null,y=h.length?((e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||\\\"text\\\",n=i.attributes.lang||\\\"und\\\";return e[s]||(e[s]={language:n,default:!1,autoselect:!1,playlists:[],uri:\\\"\\\"}),e[s].playlists.push(tr((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,\\\"PROGRAM-ID\\\":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:\\\"\\\",endList:\\\"static\\\"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||\\\"\\\",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e},{}))(h,s):null,v=d.concat(or(f),or(y)),b=v.map(({timelineStarts:e})=>e);var _,T;return m.timelineStarts=Yn(b),_=v,T=m.timelineStarts,_.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex(function({timeline:t}){return t===e.timeline}),e.segments&&e.segments.forEach((e,t)=>{e.number=t})}),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups[\\\"CLOSED-CAPTIONS\\\"].cc=p.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty(\\\"aspectRatio\\\")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty(\\\"easyReader\\\")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty(\\\"3D\\\")&&(e[s][\\\"3D\\\"]=t[\\\"3D\\\"])}),e):e,{})),n?Jn({oldManifest:n,newManifest:m}):m},cr=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},dr=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n=\\\"\\\",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let u=0;u<t.length;u++){const h=t[u],p=h.d,m=h.r||0,g=h.t||0;let f;if(d<0&&(d=g),g&&g>d&&(d=g),m<0){const o=u+1;f=o===t.length?\\\"dynamic\\\"===i&&s>0&&n.indexOf(\\\"$Number$\\\")>0?cr(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;v<y;)c.push({number:v,duration:p/a,time:d,timeline:l}),d+=p,v++}return c},ur=/\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g,hr=(e,t)=>e.replace(ur,(e=>(t,i,s,n)=>{if(\\\"$$\\\"===t)return\\\"$\\\";if(void 0===e[i])return t;const r=\\\"\\\"+e[i];return\\\"RepresentationID\\\"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join(\\\"0\\\")}${r}`)})(t)),pr=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:\\\"\\\",range:\\\"\\\"}}=e,n=qn({baseUrl:e.baseUrl,source:hr(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Hn(e):dr(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map(t=>{i.Number=t.number,i.Time=t.time;const s=hr(e.media||\\\"\\\",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Gt(e.baseUrl||\\\"\\\",s),map:n,number:t.number,presentationTime:o}})},mr=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(Bn);const r=s.map(t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=qn({baseUrl:i,source:s.sourceURL,range:s.range}),r=qn({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t));let a;i&&(a=Hn(e)),t&&(a=dr(e,t));return a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e)},gr=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=pr,i=Dn(e,t.template)):t.base?(s=Vn,i=Dn(e,t.base)):t.list&&(s=mr,i=Dn(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},fr=(e,t)=>On(e.childNodes).filter(({tagName:e})=>e===t),yr=e=>e.textContent.trim(),vr=e=>{const t=/P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},br={mediaPresentationDuration:e=>vr(e),availabilityStartTime(e){return/^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/.test(t=e)&&(t+=\\\"Z\\\"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>vr(e),suggestedPresentationDelay:e=>vr(e),type:e=>e,timeShiftBufferDepth:e=>vr(e),start:e=>vr(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split(\\\"/\\\").reduce((e,t)=>e/t)))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?vr(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},_r=e=>e&&e.attributes?On(e.attributes).reduce((e,t)=>{const i=br[t.name]||br.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Tr={\\\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\\\":\\\"org.w3.clearkey\\\",\\\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\\\":\\\"com.widevine.alpha\\\",\\\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\\\":\\\"com.microsoft.playready\\\",\\\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\\\":\\\"com.adobe.primetime\\\",\\\"urn:mpeg:dash:mp4protection:2011\\\":\\\"mp4protection\\\"},Sr=(e,t)=>t.length?Ln(e.map(function(e){return t.map(function(t){const i=yr(t),s=Gt(e.baseUrl,i),n=Dn(_r(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n})})):e,wr=e=>{const t=fr(e,\\\"SegmentTemplate\\\")[0],i=fr(e,\\\"SegmentList\\\")[0],s=i&&fr(i,\\\"SegmentURL\\\").map(e=>Dn({tag:\\\"SegmentURL\\\"},_r(e))),n=fr(e,\\\"SegmentBase\\\")[0],r=i||t,a=r&&fr(r,\\\"SegmentTimeline\\\")[0],o=i||n||t,l=o&&fr(o,\\\"Initialization\\\")[0],c=t&&_r(t);c&&l?c.initialization=l&&_r(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&fr(a,\\\"S\\\").map(e=>_r(e)),list:i&&Dn(_r(i),{segmentUrls:s,initialization:_r(l)}),base:n&&Dn(_r(n),{initialization:_r(l)})};return Object.keys(d).forEach(e=>{d[e]||delete d[e]}),d},kr=e=>Ln(fr(e.node,\\\"EventStream\\\").map(t=>{const i=_r(t),s=i.schemeIdUri;return fr(t,\\\"Event\\\").map(t=>{const n=_r(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:yr(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),xr=(e,t,i)=>s=>{const n=_r(s),r=Sr(t,fr(s,\\\"BaseURL\\\")),a=fr(s,\\\"Role\\\")[0],o={role:_r(a)};let l=Dn(e,n,o);const c=fr(s,\\\"Accessibility\\\")[0],d=(e=>{if(\\\"urn:scte:dash:cc:cea-608:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{let t,i;return i=e,/^CC\\\\d=/.test(e)?[t,i]=e.split(\\\"=\\\"):/^CC\\\\d$/.test(e)&&(t=e),{channel:t,language:i}});if(\\\"urn:scte:dash:cc:cea-708:2015\\\"===e.schemeIdUri)return(\\\"string\\\"!=typeof e.value?[]:e.value.split(\\\";\\\")).map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,\\\"3D\\\":0};if(/=/.test(e)){const[i,s=\\\"\\\"]=e.split(\\\"=\\\");t.channel=i,t.language=e,s.split(\\\",\\\").forEach(e=>{const[i,s]=e.split(\\\":\\\");\\\"lang\\\"===i?t.language=s:\\\"er\\\"===i?t.easyReader=Number(s):\\\"war\\\"===i?t.aspectRatio=Number(s):\\\"3D\\\"===i&&(t[\\\"3D\\\"]=Number(s))})}else t.language=e;return t.channel&&(t.channel=\\\"SERVICE\\\"+t.channel),t})})(_r(c));d&&(l=Dn(l,{captionServices:d}));const u=fr(s,\\\"Label\\\")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Dn(l,{label:e})}const h=fr(s,\\\"ContentProtection\\\").reduce((e,t)=>{const i=_r(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Tr[i.schemeIdUri];if(s){e[s]={attributes:i};const n=fr(t,\\\"cenc:pssh\\\")[0];if(n){const t=yr(n);e[s].pssh=t&&Yt(t)}}return e},{});Object.keys(h).length&&(l=Dn(l,{contentProtection:h}));const p=wr(s),m=fr(s,\\\"Representation\\\"),g=Dn(i,p);return Ln(m.map(((e,t,i)=>s=>{const n=fr(s,\\\"BaseURL\\\"),r=Sr(t,n),a=Dn(e,_r(s)),o=wr(s);return r.map(e=>({segmentInfo:Dn(i,o),attributes:Dn(a,e)}))})(l,r,g)))},Er=(e,t)=>(i,s)=>{const n=Sr(t,fr(i.node,\\\"BaseURL\\\")),r=Dn(e,{periodStart:i.attributes.start});\\\"number\\\"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=fr(i.node,\\\"AdaptationSet\\\"),o=wr(i.node);return Ln(a.map(xr(r,n,o)))},Cr=(e,t)=>{if(e.length>1&&t({type:\\\"warn\\\",message:\\\"The MPD manifest should contain no more than one ContentSteering tag\\\"}),!e.length)return null;const i=Dn({serverURL:yr(e[0])},_r(e[0]));return i.queryBeforeStart=\\\"true\\\"===i.queryBeforeStart,i},Ar=e=>{if(\\\"\\\"===e)throw new Error(Mn);const t=new In;let i,s;try{i=t.parseFromString(e,\\\"application/xml\\\"),s=i&&\\\"MPD\\\"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName(\\\"parsererror\\\").length>0)throw new Error(Rn);return s},Ir=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i=\\\"\\\",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=fr(e,\\\"Period\\\");if(!a.length)throw new Error(Nn);const o=fr(e,\\\"Location\\\"),l=_r(e),c=Sr([{baseUrl:i}],fr(e,\\\"BaseURL\\\")),d=fr(e,\\\"ContentSteering\\\");l.type=l.type||\\\"static\\\",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(yr));const u=[];return a.forEach((e,t)=>{const i=_r(e),s=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>\\\"number\\\"==typeof e.start?e.start:t&&\\\"number\\\"==typeof t.start&&\\\"number\\\"==typeof t.duration?t.start+t.duration:t||\\\"static\\\"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:Cr(d,r),representationInfo:Ln(u.map(Er(l,c))),eventStream:Ln(u.map(kr))}})(Ar(e),t),s=i.representationInfo.map(gr);return lr({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},jr=e=>(e=>{const t=fr(e,\\\"UTCTiming\\\")[0];if(!t)return null;const i=_r(t);switch(i.schemeIdUri){case\\\"urn:mpeg:dash:utc:http-head:2014\\\":case\\\"urn:mpeg:dash:utc:http-head:2012\\\":i.method=\\\"HEAD\\\";break;case\\\"urn:mpeg:dash:utc:http-xsdate:2014\\\":case\\\"urn:mpeg:dash:utc:http-iso:2014\\\":case\\\"urn:mpeg:dash:utc:http-xsdate:2012\\\":case\\\"urn:mpeg:dash:utc:http-iso:2012\\\":i.method=\\\"GET\\\";break;case\\\"urn:mpeg:dash:utc:direct:2014\\\":case\\\"urn:mpeg:dash:utc:direct:2012\\\":i.method=\\\"DIRECT\\\",i.value=Date.parse(i.value);break;default:throw new Error(Fn)}return i})(Ar(e));var Dr=Math.pow(2,32),Pr=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*Dr+i.getUint32(4)},Lr=Ie(function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Pr(e.subarray(s)),i.firstOffset=Pr(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i}),Or=Ti([73,68,51]),Nr=function e(t,i){return void 0===i&&(i=0),(t=Ti(t)).length-i<10||!Ci(t,Or,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Ti(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mr=function(e){return\\\"string\\\"==typeof e?Ei(e):e},Rr=function e(t,i,s){void 0===s&&(s=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return Mr(e)}):[Mr(e)]}(i),t=Ti(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Ci(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ur={EBML:Ti([26,69,223,163]),DocType:Ti([66,130]),Segment:Ti([24,83,128,103]),SegmentInfo:Ti([21,73,169,102]),Tracks:Ti([22,84,174,107]),Track:Ti([174]),TrackNumber:Ti([215]),DefaultDuration:Ti([35,227,131]),TrackEntry:Ti([174]),TrackType:Ti([131]),FlagDefault:Ti([136]),CodecID:Ti([134]),CodecPrivate:Ti([99,162]),VideoTrack:Ti([224]),AudioTrack:Ti([225]),Cluster:Ti([31,67,182,117]),Timestamp:Ti([231]),TimestampScale:Ti([42,215,177]),BlockGroup:Ti([160]),BlockDuration:Ti([155]),Block:Ti([161]),SimpleBlock:Ti([163])},Br=[128,64,32,16,8,4,2,1],Fr=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<Br.length&&!(e&Br[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=Br[n-1]),{length:n,value:ki(r,{signed:s}),bytes:r}},qr=function e(t){return\\\"string\\\"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):\\\"number\\\"==typeof t?xi(t):t},$r=function e(t,i,s){if(s>=i.length)return i.length;var n=Fr(i,s,!1);if(Ci(t.bytes,n.bytes))return s;var r=Fr(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},zr=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return qr(e)}):[qr(e)]}(i),t=Ti(t);var s=[];if(!i.length)return s;for(var n=0;n<t.length;){var r=Fr(t,n,!1),a=Fr(t,n+r.length),o=n+r.length+a.length;127===a.value&&(a.value=$r(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,c=t.subarray(o,l);Ci(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},Hr=Ti([0,0,0,1]),Vr=Ti([0,0,1]),Wr=Ti([0,0,3]),Gr=function(e){for(var t=[],i=1;i<e.length-2;)Ci(e.subarray(i,i+3),Wr)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,n=new Uint8Array(s),r=0;for(i=0;i<s;r++,i++)r===t[0]&&(r++,t.shift()),n[i]=e[r];return n},Xr=function(e,t,i,s){e=Ti(e),i=[].concat(i);for(var n,r=0,a=0;r<e.length&&(a<s||n);){var o=void 0;if(Ci(e.subarray(r),Hr)?o=4:Ci(e.subarray(r),Vr)&&(o=3),o){if(a++,n)return Gr(e.subarray(n,r));var l=void 0;\\\"h264\\\"===t?l=31&e[r+o]:\\\"h265\\\"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+(\\\"h264\\\"===t?1:2)}else r++}return e.subarray(0,0)},Yr={webm:Ti([119,101,98,109]),matroska:Ti([109,97,116,114,111,115,107,97]),flac:Ti([102,76,97,67]),ogg:Ti([79,103,103,83]),ac3:Ti([11,119]),riff:Ti([82,73,70,70]),avi:Ti([65,86,73]),wav:Ti([87,65,86,69]),\\\"3gp\\\":Ti([102,116,121,112,51,103]),mp4:Ti([102,116,121,112]),fmp4:Ti([115,116,121,112]),mov:Ti([102,116,121,112,113,116]),moov:Ti([109,111,111,118]),moof:Ti([109,111,111,102])},Kr={aac:function(e){var t=Nr(e);return Ci(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Nr(e);return Ci(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.webm)},mkv:function(e){var t=zr(e,[Ur.EBML,Ur.DocType])[0];return Ci(t,Yr.matroska)},mp4:function(e){return!Kr[\\\"3gp\\\"](e)&&!Kr.mov(e)&&(!(!Ci(e,Yr.mp4,{offset:4})&&!Ci(e,Yr.fmp4,{offset:4}))||(!(!Ci(e,Yr.moof,{offset:4})&&!Ci(e,Yr.moov,{offset:4}))||void 0))},mov:function(e){return Ci(e,Yr.mov,{offset:4})},\\\"3gp\\\":function(e){return Ci(e,Yr[\\\"3gp\\\"],{offset:4})},ac3:function(e){var t=Nr(e);return Ci(e,Yr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Nr(e);return Ci(e,Yr.flac,{offset:t})},ogg:function(e){return Ci(e,Yr.ogg)},avi:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.avi,{offset:8})},wav:function(e){return Ci(e,Yr.riff)&&Ci(e,Yr.wav,{offset:8})},h264:function(e){return function(e,t,i){return Xr(e,\\\"h264\\\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Xr(e,\\\"h265\\\",t,i)}(e,[32,33],3).length}},Qr=Object.keys(Kr).filter(function(e){return\\\"ts\\\"!==e&&\\\"h264\\\"!==e&&\\\"h265\\\"!==e}).concat([\\\"ts\\\",\\\"h264\\\",\\\"h265\\\"]);Qr.forEach(function(e){var t=Kr[e];Kr[e]=function(e){return t(Ti(e))}});var Jr=Kr,Zr=function(e){e=Ti(e);for(var t=0;t<Qr.length;t++){var i=Qr[t];if(Jr[i](e))return i}return\\\"\\\"},ea={},ta=\\\"8.23.3\\\";const ia={},sa=function(e,t){return ia[e]=ia[e]||[],t&&(ia[e]=ia[e].concat(t)),ia[e]},na=function(e,t){const i=sa(e).indexOf(t);return!(i<=-1)&&(ia[e]=ia[e].slice(),ia[e].splice(i,1),!0)},ra={prefixed:!0},aa=[[\\\"requestFullscreen\\\",\\\"exitFullscreen\\\",\\\"fullscreenElement\\\",\\\"fullscreenEnabled\\\",\\\"fullscreenchange\\\",\\\"fullscreenerror\\\",\\\"fullscreen\\\"],[\\\"webkitRequestFullscreen\\\",\\\"webkitExitFullscreen\\\",\\\"webkitFullscreenElement\\\",\\\"webkitFullscreenEnabled\\\",\\\"webkitfullscreenchange\\\",\\\"webkitfullscreenerror\\\",\\\"-webkit-full-screen\\\"]],oa=aa[0];let la;for(let db=0;db<aa.length;db++)if(aa[db][1]in Re){la=aa[db];break}if(la){for(let ub=0;ub<la.length;ub++)ra[oa[ub]]=la[ub];ra.prefixed=la[0]!==oa[0]}let ca=[];const da=function e(t,i=\\\":\\\",s=\\\"\\\"){let n,r=\\\"info\\\";function a(...e){n(\\\"log\\\",r,e)}return n=((e,t,i)=>(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if(\\\"log\\\"!==s&&r.unshift(s.toUpperCase()+\\\":\\\"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+\\\":\\\"),ca){ca.push([].concat(r));const e=ca.length-1e3;ca.splice(0,e>0?e:0)}if(!Le.console)return;let c=Le.console[s];c||\\\"debug\\\"!==s||(c=Le.console.info||Le.console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?\\\"apply\\\":\\\"call\\\"](Le.console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:\\\"debug|log|warn|error\\\",off:\\\"\\\",debug:\\\"debug|log|warn|error\\\",info:\\\"log|warn|error\\\",warn:\\\"warn|error\\\",error:\\\"error\\\",DEFAULT:r},a.level=e=>{if(\\\"string\\\"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`\\\"${e}\\\" in not a valid log level`);r=e}return r},a.history=()=>ca?[].concat(ca):[],a.history.filter=e=>(ca||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{ca&&(ca.length=0)},a.history.disable=()=>{null!==ca&&(ca.length=0,ca=null)},a.history.enable=()=>{null===ca&&(ca=[])},a.error=(...e)=>n(\\\"error\\\",r,e),a.warn=(...e)=>n(\\\"warn\\\",r,e),a.debug=(...e)=>n(\\\"debug\\\",r,e),a}(\\\"VIDEOJS\\\"),ua=da.createLogger,ha=Object.prototype.toString,pa=function(e){return fa(e)?Object.keys(e):[]};function ma(e,t){pa(e).forEach(i=>t(e[i],i))}function ga(e,t,i=0){return pa(e).reduce((i,s)=>t(i,e[s],s),i)}function fa(e){return!!e&&\\\"object\\\"==typeof e}function ya(e){return fa(e)&&\\\"[object Object]\\\"===ha.call(e)&&e.constructor===Object}function va(...e){const t={};return e.forEach(e=>{e&&ma(e,(e,i)=>{ya(e)?(ya(t[i])||(t[i]={}),t[i]=va(t[i],e)):t[i]=e})}),t}function ba(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function _a(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var Ta=Object.freeze({__proto__:null,each:ma,reduce:ga,isObject:fa,isPlain:ya,merge:va,values:ba,defineLazyProperty:_a});let Sa,wa=!1,ka=null,xa=!1,Ea=!1,Ca=!1,Aa=!1,Ia=!1,ja=null,Da=null;const Pa=Boolean(Le.cast&&Le.cast.framework&&Le.cast.framework.CastReceiverContext);let La=null,Oa=!1,Na=!1,Ma=!1,Ra=!1,Ua=!1,Ba=!1,Fa=!1;const qa=Boolean(Ga()&&(\\\"ontouchstart\\\"in Le||Le.navigator.maxTouchPoints||Le.DocumentTouch&&Le.document instanceof Le.DocumentTouch)),$a=Le.navigator&&Le.navigator.userAgentData;if($a&&$a.platform&&$a.brands&&(xa=\\\"Android\\\"===$a.platform,Ca=Boolean($a.brands.find(e=>\\\"Microsoft Edge\\\"===e.brand)),Aa=Boolean($a.brands.find(e=>\\\"Chromium\\\"===e.brand)),Ia=!Ca&&Aa,ja=Da=($a.brands.find(e=>\\\"Chromium\\\"===e.brand)||{}).version||null,Na=\\\"Windows\\\"===$a.platform),!Aa){const hb=Le.navigator&&Le.navigator.userAgent||\\\"\\\";wa=/iPod/i.test(hb),ka=function(){const e=hb.match(/OS (\\\\d+)_/i);return e&&e[1]?e[1]:null}(),xa=/Android/i.test(hb),Sa=function(){const e=hb.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\\\".\\\"+e[2]):t||null}(),Ea=/Firefox/i.test(hb),Ca=/Edg/i.test(hb),Aa=/Chrome/i.test(hb)||/CriOS/i.test(hb),Ia=!Ca&&Aa,ja=Da=function(){const e=hb.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),La=function(){const e=/MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(hb);let t=e&&parseFloat(e[1]);return!t&&/Trident\\\\/7.0/i.test(hb)&&/rv:11.0/.test(hb)&&(t=11),t}(),Ua=/Tizen/i.test(hb),Ba=/Web0S/i.test(hb),Fa=Ua||Ba,Oa=/Safari/i.test(hb)&&!Ia&&!xa&&!Ca&&!Fa,Na=/Windows/i.test(hb),Ma=/iPad/i.test(hb)||Oa&&qa&&!/iPhone/i.test(hb),Ra=/iPhone/i.test(hb)&&!Ma}const za=Ra||Ma||wa,Ha=(Oa||za)&&!Ia;var Va=Object.freeze({__proto__:null,get IS_IPOD(){return wa},get IOS_VERSION(){return ka},get IS_ANDROID(){return xa},get ANDROID_VERSION(){return Sa},get IS_FIREFOX(){return Ea},get IS_EDGE(){return Ca},get IS_CHROMIUM(){return Aa},get IS_CHROME(){return Ia},get CHROMIUM_VERSION(){return ja},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:Pa,get IE_VERSION(){return La},get IS_SAFARI(){return Oa},get IS_WINDOWS(){return Na},get IS_IPAD(){return Ma},get IS_IPHONE(){return Ra},get IS_TIZEN(){return Ua},get IS_WEBOS(){return Ba},get IS_SMART_TV(){return Fa},TOUCH_ENABLED:qa,IS_IOS:za,IS_ANY_SAFARI:Ha});function Wa(e){return\\\"string\\\"==typeof e&&Boolean(e.trim())}function Ga(){return Re===Le.document}function Xa(e){return fa(e)&&1===e.nodeType}function Ya(){try{return Le.parent!==Le.self}catch(e){return!0}}function Ka(e){return function(t,i){if(!Wa(t))return Re[e](null);Wa(i)&&(i=Re.querySelector(i));const s=Xa(i)?i:Re;return s[e]&&s[e](t)}}function Qa(e=\\\"div\\\",t={},i={},s){const n=Re.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){const i=t[e];\\\"textContent\\\"===e?Ja(n,i):n[e]===i&&\\\"tabIndex\\\"!==e||(n[e]=i)}),Object.getOwnPropertyNames(i).forEach(function(e){n.setAttribute(e,i[e])}),s&&vo(n,s),n}function Ja(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Za(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function eo(e,t){return function(e){if(e.indexOf(\\\" \\\")>=0)throw new Error(\\\"class has illegal whitespace characters\\\")}(t),e.classList.contains(t)}function to(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e}function io(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\\\\s+/)),[])),e):(da.warn(\\\"removeClass was called with an element that doesn't exist\\\"),null)}function so(e,t,i){return\\\"function\\\"==typeof i&&(i=i(e,t)),\\\"boolean\\\"!=typeof i&&(i=void 0),t.split(/\\\\s+/).forEach(t=>e.classList.toggle(t,i)),e}function no(e,t){Object.getOwnPropertyNames(t).forEach(function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?\\\"\\\":s)})}function ro(e){const t={},i=[\\\"autoplay\\\",\\\"controls\\\",\\\"playsinline\\\",\\\"loop\\\",\\\"muted\\\",\\\"default\\\",\\\"defaultMuted\\\"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function ao(e,t){return e.getAttribute(t)}function oo(e,t,i){e.setAttribute(t,i)}function lo(e,t){e.removeAttribute(t)}function co(){Re.body.focus(),Re.onselectstart=function(){return!1}}function uo(){Re.onselectstart=function(){return!0}}function ho(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return[\\\"bottom\\\",\\\"height\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\",\\\"width\\\"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(wo(e,\\\"height\\\"))),i.width||(i.width=parseFloat(wo(e,\\\"width\\\"))),i}}function po(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Re[ra.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function mo(e,t){const i={x:0,y:0};if(za){let t=e;for(;t&&\\\"html\\\"!==t.nodeName.toLowerCase();){const e=wo(t,\\\"transform\\\");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\\\\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\\\\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&Le.WebKitCSSMatrix){const e=Le.getComputedStyle(t.assignedSlot.parentElement).transform,s=new Le.WebKitCSSMatrix(e);i.x+=s.m41,i.y+=s.m42}t=t.parentNode||t.host}}const s={},n=po(t.target),r=po(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,za&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function go(e){return fa(e)&&3===e.nodeType}function fo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function yo(e){return\\\"function\\\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>(\\\"function\\\"==typeof e&&(e=e()),Xa(e)||go(e)?e:\\\"string\\\"==typeof e&&/\\\\S/.test(e)?Re.createTextNode(e):void 0)).filter(e=>e)}function vo(e,t){return yo(t).forEach(t=>e.appendChild(t)),e}function bo(e,t){return vo(fo(e),t)}function _o(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\\\"mouseup\\\"===e.type&&0===e.button&&0===e.buttons||(\\\"mousedown\\\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const To=Ka(\\\"querySelector\\\"),So=Ka(\\\"querySelectorAll\\\");function wo(e,t){if(!e||!t)return\\\"\\\";if(\\\"function\\\"==typeof Le.getComputedStyle){let i;try{i=Le.getComputedStyle(e)}catch(e){return\\\"\\\"}return i?i.getPropertyValue(t)||i[t]:\\\"\\\"}return\\\"\\\"}function ko(e){[...Re.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(\\\"\\\"),s=Re.createElement(\\\"style\\\");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Re.createElement(\\\"link\\\");s.rel=\\\"stylesheet\\\",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}})}var xo=Object.freeze({__proto__:null,isReal:Ga,isEl:Xa,isInFrame:Ya,createEl:Qa,textContent:Ja,prependTo:Za,hasClass:eo,addClass:to,removeClass:io,toggleClass:so,setAttributes:no,getAttributes:ro,getAttribute:ao,setAttribute:oo,removeAttribute:lo,blockTextSelection:co,unblockTextSelection:uo,getBoundingClientRect:ho,findPosition:po,getPointerPosition:mo,isTextNode:go,emptyEl:fo,normalizeContent:yo,appendContent:vo,insertContent:bo,isSingleLeftClick:_o,$:To,$$:So,computedStyle:wo,copyStyleSheetsToWindow:ko});let Eo,Co=!1;const Ao=function(){if(!1===Eo.options.autoSetup)return;const e=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video\\\")),t=Array.prototype.slice.call(Re.getElementsByTagName(\\\"audio\\\")),i=Array.prototype.slice.call(Re.getElementsByTagName(\\\"video-js\\\")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!t||!t.getAttribute){Io(1);break}if(void 0===t.player){null!==t.getAttribute(\\\"data-setup\\\")&&Eo(t)}}else Co||Io(1)};function Io(e,t){Ga()&&(t&&(Eo=t),Le.setTimeout(Ao,e))}function jo(){Co=!0,Le.removeEventListener(\\\"load\\\",jo)}Ga()&&(\\\"complete\\\"===Re.readyState?jo():Le.addEventListener(\\\"load\\\",jo));const Do=function(e){const t=Re.createElement(\\\"style\\\");return t.className=e,t},Po=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var Lo=new WeakMap;let Oo,No=3;function Mo(){return No++}function Ro(e,t){if(!Lo.has(e))return;const i=Lo.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\\\"on\\\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Lo.delete(e)}function Uo(e,t,i,s){i.forEach(function(i){e(t,i,s)})}function Bo(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const s=e||Le.event;e={};const n=[\\\"layerX\\\",\\\"layerY\\\",\\\"keyLocation\\\",\\\"path\\\",\\\"webkitMovementX\\\",\\\"webkitMovementY\\\",\\\"mozPressure\\\",\\\"mozInputSource\\\"];for(const t in s)n.includes(t)||\\\"returnValue\\\"===t&&s.preventDefault||(e[t]=s[t]);if(e.target||(e.target=e.srcElement||Re),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){s.preventDefault&&s.preventDefault(),e.returnValue=!1,s.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),e.cancelBubble=!0,s.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=Re.documentElement,i=Re.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const Fo=[\\\"touchstart\\\",\\\"touchmove\\\"];function qo(e,t,i){if(Array.isArray(t))return Uo(qo,e,t,i);Lo.has(e)||Lo.set(e,{});const s=Lo.get(e);if(s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),i.guid||(i.guid=Mo()),s.handlers[t].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,i){if(s.disabled)return;t=Bo(t);const n=s.handlers[t.type];if(n){const s=n.slice(0);for(let n=0,r=s.length;n<r&&!t.isImmediatePropagationStopped();n++)try{s[n].call(e,t,i)}catch(e){da.error(e)}}}),1===s.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if(\\\"boolean\\\"!=typeof Oo){Oo=!1;try{const e=Object.defineProperty({},\\\"passive\\\",{get(){Oo=!0}});Le.addEventListener(\\\"test\\\",null,e),Le.removeEventListener(\\\"test\\\",null,e)}catch(e){}}return Oo})()&&Fo.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent(\\\"on\\\"+t,s.dispatcher)}function $o(e,t,i){if(!Lo.has(e))return;const s=Lo.get(e);if(!s.handlers)return;if(Array.isArray(t))return Uo($o,e,t,i);const n=function(e,t){s.handlers[t]=[],Ro(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);Ro(e,t)}else n(e,t)}function zo(e,t,i){const s=Lo.has(e)?Lo.get(e):{},n=e.parentNode||e.ownerDocument;if(\\\"string\\\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Bo(t),s.dispatcher&&s.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)zo.call(null,n,t,i);else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){Lo.has(t.target)||Lo.set(t.target,{});const e=Lo.get(t.target);t.target[t.type]&&(e.disabled=!0,\\\"function\\\"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function Ho(e,t,i){if(Array.isArray(t))return Uo(Ho,e,t,i);const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}function Vo(e,t,i){const s=function(){$o(e,t,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||Mo(),qo(e,t,s)}var Wo=Object.freeze({__proto__:null,fixEvent:Bo,on:qo,off:$o,trigger:zo,one:Ho,any:Vo});const Go=30,Xo=function(e,t,i){t.guid||(t.guid=Mo());const s=t.bind(e);return s.guid=i?i+\\\"_\\\"+t.guid:t.guid,s},Yo=function(e,t){let i=Le.performance.now();return function(...s){const n=Le.performance.now();n-i>=t&&(e(...s),i=n)}},Ko=function(e,t,i,s=Le){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Qo=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Go,bind_:Xo,throttle:Yo,debounce:Ko});let Jo;class Zo{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},qo(this,e,t),this.addEventListener=i}off(e,t){$o(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ho(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Vo(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;\\\"string\\\"==typeof e&&(e={type:t}),e=Bo(e),this.allowedEvents_[t]&&this[\\\"on\\\"+t]&&this[\\\"on\\\"+t](e),zo(this,e)}queueTrigger(e){Jo||(Jo=new Map);const t=e.type||e;let i=Jo.get(this);i||(i=new Map,Jo.set(this,i));const s=i.get(t);i.delete(t),Le.clearTimeout(s);const n=Le.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Jo.delete(this)),this.trigger(e)},0);i.set(t,n)}}Zo.prototype.allowedEvents_={},Zo.prototype.addEventListener=Zo.prototype.on,Zo.prototype.removeEventListener=Zo.prototype.off,Zo.prototype.dispatchEvent=Zo.prototype.trigger;const el=e=>\\\"function\\\"==typeof e.name?e.name():\\\"string\\\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,tl=e=>e instanceof Zo||!!e.eventBusEl_&&[\\\"on\\\",\\\"one\\\",\\\"off\\\",\\\"trigger\\\"].every(t=>\\\"function\\\"==typeof e[t]),il=e=>\\\"string\\\"==typeof e&&/\\\\S/.test(e)||Array.isArray(e)&&!!e.length,sl=(e,t,i)=>{if(!e||!e.nodeName&&!tl(e))throw new Error(`Invalid target for ${el(t)}#${i}; must be a DOM node or evented object.`)},nl=(e,t,i)=>{if(!il(e))throw new Error(`Invalid event type for ${el(t)}#${i}; must be a non-empty string or array.`)},rl=(e,t,i)=>{if(\\\"function\\\"!=typeof e)throw new Error(`Invalid listener for ${el(t)}#${i}; must be a function.`)},al=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(n=t[0],r=t[1],a=t[2]),sl(n,e,i),nl(r,e,i),rl(a,e,i),a=Xo(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},ol=(e,t,i,s)=>{sl(e,e,t),e.nodeName?Wo[t](e,i,s):e[t](i,s)},ll={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"on\\\");if(ol(i,\\\"on\\\",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off(\\\"dispose\\\",e);t.guid=n.guid,ol(this,\\\"on\\\",\\\"dispose\\\",e),ol(i,\\\"on\\\",\\\"dispose\\\",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"one\\\");if(t)ol(i,\\\"one\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"one\\\",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=al(this,e,\\\"any\\\");if(t)ol(i,\\\"any\\\",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,ol(i,\\\"any\\\",s,e)}},off(e,t,i){if(!e||il(e))$o(this.eventBusEl_,e,t);else{const s=e,n=t;sl(s,this,\\\"off\\\"),nl(n,this,\\\"off\\\"),rl(i,this,\\\"off\\\"),i=Xo(this,i),this.off(\\\"dispose\\\",i),s.nodeName?($o(s,n,i),$o(s,\\\"dispose\\\",i)):tl(s)&&(s.off(n,i),s.off(\\\"dispose\\\",i))}},trigger(e,t){sl(this.eventBusEl_,this,\\\"trigger\\\");const i=e&&\\\"string\\\"!=typeof e?e.type:e;if(!il(i))throw new Error(`Invalid event type for ${el(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return zo(this.eventBusEl_,e,t)}};function cl(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey \\\"${i}\\\" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Qa(\\\"span\\\",{className:\\\"vjs-event-bus\\\"});return Object.assign(e,ll),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on(\\\"dispose\\\",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&Lo.has(e)&&Lo.delete(e)}),Le.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const dl={state:{},setState(e){let t;return\\\"function\\\"==typeof e&&(e=e()),ma(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&tl(this)&&this.trigger({changes:t,type:\\\"statechanged\\\"}),t}};function ul(e,t){return Object.assign(e,dl),e.state=Object.assign({},e.state,t),\\\"function\\\"==typeof e.handleStateChanged&&tl(e)&&e.on(\\\"statechanged\\\",e.handleStateChanged),e}const hl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())},pl=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},ml=function(e,t){return pl(e)===pl(t)};var gl=Object.freeze({__proto__:null,toLowerCase:hl,toTitleCase:pl,titleCaseEquals:ml});class fl{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=va({},this.options_),t=this.options_=va(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||\\\"no_player\\\";this.id_=`${t}_component_${Mo()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(\\\" \\\").forEach(e=>this.addClass(e)),[\\\"on\\\",\\\"off\\\",\\\"one\\\",\\\"any\\\",\\\"trigger\\\"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(cl(this,{eventBusKey:this.el_?\\\"el_\\\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\\\"languagechange\\\",this.handleLanguagechange)),ul(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\\\"dispose\\\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=va(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Qa(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split(\\\"-\\\")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\\\\{(\\\\d+)\\\\}/g,function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n})),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i=\\\"http://www.w3.org/2000/svg\\\",s=Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder vjs-svg-icon\\\"},{\\\"aria-hidden\\\":\\\"true\\\"}),n=Re.createElementNS(i,\\\"svg\\\");n.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 512 512\\\");const r=Re.createElementNS(i,\\\"use\\\");return n.appendChild(r),r.setAttributeNS(null,\\\"href\\\",`#vjs-icon-${e}`),s.appendChild(n),this.iconIsSet_?t.replaceChild(s,t.querySelector(\\\".vjs-icon-placeholder\\\")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},i=this.children_.length){let s,n;if(\\\"string\\\"==typeof e){n=pl(e);const i=t.componentClass||n;t.name=n;const r=fl.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if(\\\"function\\\"!=typeof r)return null;s=new r(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,\\\"function\\\"==typeof s.id&&(this.childIndex_[s.id()]=s),n=n||s.name&&pl(s.name()),n&&(this.childNameIndex_[n]=s,this.childNameIndex_[hl(n)]=s),\\\"function\\\"==typeof s.el&&s.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Xa(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(s.el(),e)}return s}removeChild(e){if(\\\"string\\\"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[pl(e.name())]=null,this.childNameIndex_[hl(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=fl.getComponent(\\\"Tech\\\");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){return\\\"string\\\"==typeof t?e===t:e===t.name})})).map(t=>{let i,s;return\\\"string\\\"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}}).filter(e=>{const t=fl.getComponent(e.opts.componentClass||pl(e.name));return t&&!n.isTech(t)}).forEach(i)}}buildCSSClass(){return\\\"\\\"}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger(\\\"ready\\\")},1)}$(e,t){return To(e,t||this.contentEl())}$$(e,t){return So(e,t||this.contentEl())}hasClass(e){return eo(this.el_,e)}addClass(...e){to(this.el_,...e)}removeClass(...e){io(this.el_,...e)}toggleClass(e,t){so(this.el_,e,t)}show(){this.removeClass(\\\"vjs-hidden\\\")}hide(){this.addClass(\\\"vjs-hidden\\\")}lockShowing(){this.addClass(\\\"vjs-lock-showing\\\")}unlockShowing(){this.removeClass(\\\"vjs-lock-showing\\\")}getAttribute(e){return ao(this.el_,e)}setAttribute(e,t){oo(this.el_,e,t)}removeAttribute(e){lo(this.el_,e)}width(e,t){return this.dimension(\\\"width\\\",e,t)}height(e,t){return this.dimension(\\\"height\\\",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\\\"\\\"+t).indexOf(\\\"%\\\")||-1!==(\\\"\\\"+t).indexOf(\\\"px\\\")?this.el_.style[e]=t:this.el_.style[e]=\\\"auto\\\"===t?\\\"\\\":t+\\\"px\\\",void(i||this.trigger(\\\"componentresize\\\"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf(\\\"px\\\");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_[\\\"offset\\\"+pl(e)],10)}currentDimension(e){let t=0;if(\\\"width\\\"!==e&&\\\"height\\\"!==e)throw new Error(\\\"currentDimension only accepts width or height value\\\");if(t=wo(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${pl(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension(\\\"width\\\"),height:this.currentDimension(\\\"height\\\")}}currentWidth(){return this.currentDimension(\\\"width\\\")}currentHeight(){return this.currentDimension(\\\"height\\\")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(\\\"Tab\\\"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;let i;this.on(\\\"touchstart\\\",function(s){1===s.touches.length&&(t={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},e=Le.performance.now(),i=!0)}),this.on(\\\"touchmove\\\",function(e){if(e.touches.length>1)i=!1;else if(t){const s=e.touches[0].pageX-t.pageX,n=e.touches[0].pageY-t.pageY;Math.sqrt(s*s+n*n)>10&&(i=!1)}});const s=function(){i=!1};this.on(\\\"touchleave\\\",s),this.on(\\\"touchcancel\\\",s),this.on(\\\"touchend\\\",function(s){if(t=null,!0===i){Le.performance.now()-e<200&&(s.preventDefault(),this.trigger(\\\"tap\\\"))}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Xo(this.player(),this.player().reportUserActivity);let t;this.on(\\\"touchstart\\\",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(i){e(),this.clearInterval(t)};this.on(\\\"touchmove\\\",e),this.on(\\\"touchend\\\",i),this.on(\\\"touchcancel\\\",i)}setTimeout(e,t){var i;return e=Xo(this,e),this.clearTimersOnDispose_(),i=Le.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Le.clearTimeout(e)),e}setInterval(e,t){e=Xo(this,e),this.clearTimersOnDispose_();const i=Le.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Le.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Xo(this,e),t=Le.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Xo(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Le.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\\\"dispose\\\",()=>{[[\\\"namedRafs_\\\",\\\"cancelNamedAnimationFrame\\\"],[\\\"rafIds_\\\",\\\"cancelAnimationFrame\\\"],[\\\"setTimeoutIds_\\\",\\\"clearTimeout\\\"],[\\\"setIntervalIds_\\\",\\\"clearInterval\\\"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=Le.getComputedStyle(e,null),i=t.getPropertyValue(\\\"visibility\\\");return\\\"none\\\"!==t.getPropertyValue(\\\"display\\\")&&![\\\"hidden\\\",\\\"collapse\\\"].includes(i)}return e||(e=this.el()),!(!function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(Re.documentElement.clientWidth||Le.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(Re.documentElement.clientHeight||Le.innerHeight))return!1;let i=Re.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)||!function(e){return!!t(e.parentElement)&&!(!t(e)||\\\"0\\\"===e.style.opacity||\\\"0px\\\"===Le.getComputedStyle(e).height||\\\"0px\\\"===Le.getComputedStyle(e).width)}(e)||e.parentElement&&!(e.tabIndex>=0))}static registerComponent(e,t){if(\\\"string\\\"!=typeof e||!e)throw new Error(`Illegal component name, \\\"${e}\\\"; must be a non-empty string.`);const i=fl.getComponent(\\\"Tech\\\"),s=i&&i.isTech(t),n=fl===t||fl.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?\\\"techs must be registered using Tech.registerTech()\\\":\\\"must be a Component subclass\\\",new Error(`Illegal component, \\\"${e}\\\"; ${t}.`)}e=pl(e),fl.components_||(fl.components_={});const r=fl.getComponent(\\\"Player\\\");if(\\\"Player\\\"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error(\\\"Can not register Player component after player has been created.\\\")}return fl.components_[e]=t,fl.components_[hl(e)]=t,t}static getComponent(e){if(e&&fl.components_)return fl.components_[e]}}function yl(e,t,i,s){return function(e,t,i){if(\\\"number\\\"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function vl(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error(\\\"This TimeRanges object is empty\\\")},end(){throw new Error(\\\"This TimeRanges object is empty\\\")}}:{length:e.length,start:yl.bind(null,\\\"start\\\",0,e),end:yl.bind(null,\\\"end\\\",1,e)},Le.Symbol&&Le.Symbol.iterator&&(t[Le.Symbol.iterator]=()=>(e||[]).values()),t}function bl(e,t){return Array.isArray(e)?vl(e):void 0===e||void 0===t?vl():vl([[e,t]])}fl.registerComponent(\\\"Component\\\",fl);const _l=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i=\\\"-\\\"),n=n>0||a>0?n+\\\":\\\":\\\"\\\",s=((n||r>=10)&&s<10?\\\"0\\\"+s:s)+\\\":\\\",i=i<10?\\\"0\\\"+i:i,n+s+i};let Tl=_l;function Sl(e){Tl=e}function wl(){Tl=_l}function kl(e,t=e){return Tl(e,t)}var xl=Object.freeze({__proto__:null,createTimeRanges:bl,createTimeRange:bl,setFormatTime:Sl,resetFormatTime:wl,formatTime:kl});function El(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=bl(0,0));for(let r=0;r<e.length;r++)i=e.start(r),s=e.end(r),s>t&&(s=t),n+=s-i;return n/t}function Cl(e){if(e instanceof Cl)return e;\\\"number\\\"==typeof e?this.code=e:\\\"string\\\"==typeof e?this.message=e:fa(e)&&(\\\"number\\\"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Cl.defaultMessages[this.code]||\\\"\\\")}function Al(e){return null!=e&&\\\"function\\\"==typeof e.then}function Il(e){Al(e)&&e.then(null,e=>{})}Cl.prototype.code=0,Cl.prototype.message=\\\"\\\",Cl.prototype.status=null,Cl.prototype.metadata=null,Cl.errorTypes=[\\\"MEDIA_ERR_CUSTOM\\\",\\\"MEDIA_ERR_ABORTED\\\",\\\"MEDIA_ERR_NETWORK\\\",\\\"MEDIA_ERR_DECODE\\\",\\\"MEDIA_ERR_SRC_NOT_SUPPORTED\\\",\\\"MEDIA_ERR_ENCRYPTED\\\"],Cl.defaultMessages={1:\\\"You aborted the media playback\\\",2:\\\"A network error caused the media download to fail part-way.\\\",3:\\\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\\\",4:\\\"The media could not be loaded, either because the server or network failed or because the format is not supported.\\\",5:\\\"The media is encrypted and we do not have the keys to decrypt it.\\\"},Cl.MEDIA_ERR_CUSTOM=0,Cl.prototype.MEDIA_ERR_CUSTOM=0,Cl.MEDIA_ERR_ABORTED=1,Cl.prototype.MEDIA_ERR_ABORTED=1,Cl.MEDIA_ERR_NETWORK=2,Cl.prototype.MEDIA_ERR_NETWORK=2,Cl.MEDIA_ERR_DECODE=3,Cl.prototype.MEDIA_ERR_DECODE=3,Cl.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Cl.MEDIA_ERR_ENCRYPTED=5,Cl.prototype.MEDIA_ERR_ENCRYPTED=5;const jl=function(e){return[\\\"kind\\\",\\\"label\\\",\\\"language\\\",\\\"id\\\",\\\"inBandMetadataTrackDispatchType\\\",\\\"mode\\\",\\\"src\\\"].reduce((t,i,s)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})};var Dl=function(e){const t=e.$$(\\\"track\\\"),i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){const t=jl(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(jl))},Pl=function(e,t){return e.forEach(function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))}),t.textTracks()},Ll=jl;const Ol=\\\"vjs-modal-dialog\\\";class Nl extends fl{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qa(\\\"div\\\",{className:`${Ol}-content`},{role:\\\"document\\\"}),this.descEl_=Qa(\\\"p\\\",{className:`${Ol}-description vjs-control-text`,id:this.el().getAttribute(\\\"aria-describedby\\\")}),Ja(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),tabIndex:-1},{\\\"aria-describedby\\\":`${this.id()}_description`,\\\"aria-hidden\\\":\\\"true\\\",\\\"aria-label\\\":this.label(),role:\\\"dialog\\\",\\\"aria-live\\\":\\\"polite\\\"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ol} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||\\\"Modal Window\\\")}description(){let e=this.options_.description||this.localize(\\\"This is a modal window.\\\");return this.closeable()&&(e+=\\\" \\\"+this.localize(\\\"This modal can be closed by pressing the Escape key or activating the close button.\\\")),e}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger(\\\"beforemodalopen\\\"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"false\\\"),this.trigger(\\\"modalopen\\\"),this.hasBeenOpened_=!0}opened(e){return\\\"boolean\\\"==typeof e&&this[e?\\\"open\\\":\\\"close\\\"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger(\\\"beforemodalclose\\\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\\\"keydown\\\",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),this.trigger({type:\\\"modalclose\\\",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(\\\"boolean\\\"==typeof e){const t=this.closeable_=!!e;let i=this.getChild(\\\"closeButton\\\");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\\\"closeButton\\\",{controlText:\\\"Close Modal Dialog\\\"}),this.contentEl_=e,this.on(i,\\\"close\\\",this.close_)}!t&&i&&(this.off(i,\\\"close\\\",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger(\\\"beforemodalfill\\\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),bo(t,e),this.trigger(\\\"modalfill\\\"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild(\\\"closeButton\\\");n&&i.appendChild(n.el_),this.trigger(\\\"aftermodalfill\\\")}empty(){this.trigger(\\\"beforemodalempty\\\"),fo(this.contentEl()),this.trigger(\\\"modalempty\\\")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Re.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:\\\"modalKeydown\\\",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),\\\"Escape\\\"===e.key&&this.closeable())return e.preventDefault(),void this.close();if(\\\"Tab\\\"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(\\\":focus\\\");let s;for(let e=0;e<t.length;e++)if(i===t[e]){s=e;break}Re.activeElement===this.el_&&(s=0),e.shiftKey&&0===s?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||s!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll(\\\"*\\\");return Array.prototype.filter.call(e,e=>(e instanceof Le.HTMLAnchorElement||e instanceof Le.HTMLAreaElement)&&e.hasAttribute(\\\"href\\\")||(e instanceof Le.HTMLInputElement||e instanceof Le.HTMLSelectElement||e instanceof Le.HTMLTextAreaElement||e instanceof Le.HTMLButtonElement)&&!e.hasAttribute(\\\"disabled\\\")||e instanceof Le.HTMLIFrameElement||e instanceof Le.HTMLObjectElement||e instanceof Le.HTMLEmbedElement||e.hasAttribute(\\\"tabindex\\\")&&-1!==e.getAttribute(\\\"tabindex\\\")||e.hasAttribute(\\\"contenteditable\\\"))}}Nl.prototype.options_={pauseOnOpen:!0,temporary:!0},fl.registerComponent(\\\"ModalDialog\\\",Nl);class Ml extends Zo{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\\\"addtrack\\\",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:\\\"labelchange\\\",target:this})},tl(e)&&e.addEventListener(\\\"labelchange\\\",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\\\"removetrack\\\",target:this})}getTrackById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}Ml.prototype.allowedEvents_={change:\\\"change\\\",addtrack:\\\"addtrack\\\",removetrack:\\\"removetrack\\\",labelchange:\\\"labelchange\\\"};for(const pb in Ml.prototype.allowedEvents_)Ml.prototype[\\\"on\\\"+pb]=null;const Rl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class Ul extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Rl(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Rl(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Rl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"enabledchange\\\",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\\\"enabledchange\\\",e.enabledChange_),e.enabledChange_=null)}}const Bl=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Fl extends Ml{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Bl(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,\\\"selectedIndex\\\",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&Bl(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Bl(this,e),this.changing_=!1,this.trigger(\\\"change\\\"))},e.addEventListener(\\\"selectedchange\\\",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\\\"selectedchange\\\",e.selectedChange_),e.selectedChange_=null)}}class ql extends Ml{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger(\\\"change\\\")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger(\\\"selectedlanguagechange\\\")),e.addEventListener(\\\"modechange\\\",this.queueChange_);-1===[\\\"metadata\\\",\\\"chapters\\\"].indexOf(e.kind)&&e.addEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\\\"modechange\\\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\\\"modechange\\\",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class $l{constructor(e){$l.prototype.setCues_.call(this,e),Object.defineProperty(this,\\\"length\\\",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){\\\"\\\"+e in this||Object.defineProperty(this,\\\"\\\"+e,{get(){return this.cues_[e]}})};if(t<s)for(i=t;i<s;i++)n.call(this,i)}getCueById(e){let t=null;for(let i=0,s=this.length;i<s;i++){const s=this[i];if(s.id===e){t=s;break}}return t}}const zl={alternative:\\\"alternative\\\",captions:\\\"captions\\\",main:\\\"main\\\",sign:\\\"sign\\\",subtitles:\\\"subtitles\\\",commentary:\\\"commentary\\\"},Hl={alternative:\\\"alternative\\\",descriptions:\\\"descriptions\\\",main:\\\"main\\\",\\\"main-desc\\\":\\\"main-desc\\\",translation:\\\"translation\\\",commentary:\\\"commentary\\\"},Vl={subtitles:\\\"subtitles\\\",captions:\\\"captions\\\",descriptions:\\\"descriptions\\\",chapters:\\\"chapters\\\",metadata:\\\"metadata\\\"},Wl={disabled:\\\"disabled\\\",hidden:\\\"hidden\\\",showing:\\\"showing\\\"};class Gl extends Zo{constructor(e={}){super();const t={id:e.id||\\\"vjs_track_\\\"+Mo(),kind:e.kind||\\\"\\\",language:e.language||\\\"\\\"};let i=e.label||\\\"\\\";for(const e in t)Object.defineProperty(this,e,{get:()=>t[e],set(){}});Object.defineProperty(this,\\\"label\\\",{get:()=>i,set(e){e!==i&&(i=e,this.trigger(\\\"labelchange\\\"))}})}}const Xl=function(e){return new URL(e,Re.baseURI)},Yl=function(e){return new URL(e,Re.baseURI).href},Kl=function(e){if(\\\"string\\\"==typeof e){const t=e.split(\\\"?\\\")[0].replace(/\\\\/+$/,\\\"\\\").match(/\\\\.([^.\\\\/]+)$/);return t?t[1].toLowerCase():\\\"\\\"}return\\\"\\\"},Ql=function(e,t=Le.location){return Xl(e).origin!==t.origin};var Jl=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:Yl,getFileExtension:Kl,isCrossOrigin:Ql});const Zl=function(e,t){const i=new Le.WebVTT.Parser(Le,Le.vttjs,Le.WebVTT.StringDecoder()),s=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){s.push(e)},i.onflush=function(){t.trigger({type:\\\"loadeddata\\\",target:t})},i.parse(e),s.length>0&&(Le.console&&Le.console.groupCollapsed&&Le.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(e=>da.error(e)),Le.console&&Le.console.groupEnd&&Le.console.groupEnd()),i.flush()},ec=function(e,t){const i={uri:e},s=Ql(e);s&&(i.cors=s);const n=\\\"use-credentials\\\"===t.tech_.crossOrigin();n&&(i.withCredentials=n),at(i,Xo(this,function(e,i,s){if(e)return da.error(e,i);t.loaded_=!0,\\\"function\\\"!=typeof Le.WebVTT?t.tech_&&t.tech_.any([\\\"vttjsloaded\\\",\\\"vttjserror\\\"],e=>{if(\\\"vttjserror\\\"!==e.type)return Zl(s,t);da.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Zl(s,t)}))};class tc extends Gl{constructor(e={}){if(!e.tech)throw new Error(\\\"A tech was not provided.\\\");const t=va(e,{kind:Vl[e.kind]||\\\"subtitles\\\",language:e.language||e.srclang||\\\"\\\"});let i=Wl[t.mode]||\\\"disabled\\\";const s=t.default;\\\"metadata\\\"!==t.kind&&\\\"chapters\\\"!==t.kind||(i=\\\"hidden\\\"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new $l(this.cues_),r=new $l(this.activeCues_);let a=!1;this.timeupdateHandler=Xo(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger(\\\"cuechange\\\"),a=!1),\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):\\\"timeupdate\\\"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one(\\\"dispose\\\",()=>{this.stopTracking()}),\\\"disabled\\\"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Wl[e]&&i!==e&&(i=e,this.preload_||\\\"disabled\\\"===i||0!==this.cues.length||ec(this.src,this),this.stopTracking(),\\\"disabled\\\"!==i&&this.startTracking(),this.trigger(\\\"modechange\\\"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i<s;i++){const s=this.cues[i];s.startTime<=e&&s.endTime>=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||\\\"subtitles\\\"!==t.kind&&\\\"captions\\\"!==t.kind)&&ec(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on(\\\"timeupdate\\\",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off(\\\"timeupdate\\\",this.timeupdateHandler)}addCue(e){let t=e;if(!(\\\"getCueAsHTML\\\"in t)){t=new Le.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Ll(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}tc.prototype.allowedEvents_={cuechange:\\\"cuechange\\\"};class ic extends Gl{constructor(e={}){const t=va(e,{kind:Hl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"enabled\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"enabledchange\\\"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class sc extends Gl{constructor(e={}){const t=va(e,{kind:zl[e.kind]||\\\"\\\"});super(t);let i=!1;Object.defineProperty(this,\\\"selected\\\",{get:()=>i,set(e){\\\"boolean\\\"==typeof e&&e!==i&&(i=e,this.trigger(\\\"selectedchange\\\"))}}),t.selected&&(this.selected=t.selected)}}class nc extends Zo{constructor(e={}){let t;super();const i=new tc(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=nc.NONE,i.addEventListener(\\\"loadeddata\\\",()=>{t=nc.LOADED,this.trigger({type:\\\"load\\\",target:this})})}}nc.prototype.allowedEvents_={load:\\\"load\\\"},nc.NONE=0,nc.LOADING=1,nc.LOADED=2,nc.ERROR=3;const rc={audio:{ListClass:Ul,TrackClass:ic,capitalName:\\\"Audio\\\"},video:{ListClass:Fl,TrackClass:sc,capitalName:\\\"Video\\\"},text:{ListClass:ql,TrackClass:tc,capitalName:\\\"Text\\\"}};Object.keys(rc).forEach(function(e){rc[e].getterName=`${e}Tracks`,rc[e].privateName=`${e}Tracks_`});const ac={remoteText:{ListClass:ql,TrackClass:tc,capitalName:\\\"RemoteText\\\",getterName:\\\"remoteTextTracks\\\",privateName:\\\"remoteTextTracks_\\\"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,\\\"length\\\",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;\\\"\\\"+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,s=this.trackElements_.length;i<s;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\\\"function\\\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\\\"function\\\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:nc,capitalName:\\\"RemoteTextTrackEls\\\",getterName:\\\"remoteTextTrackEls\\\",privateName:\\\"remoteTextTrackEls_\\\"}},oc=Object.assign({},rc,ac);ac.names=Object.keys(ac),rc.names=Object.keys(rc),oc.names=[].concat(ac.names).concat(rc.names);class lc extends fl{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on(\\\"playing\\\",function(){this.hasStarted_=!0}),this.on(\\\"loadstart\\\",function(){this.hasStarted_=!1}),oc.names.forEach(t=>{const i=oc[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),[\\\"Text\\\",\\\"Audio\\\",\\\"Video\\\"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new oc.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||\\\"Unknown Tech\\\")}triggerSourceset(e){this.isReady_||this.one(\\\"ready\\\",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:\\\"sourceset\\\"})}manualProgressOn(){this.on(\\\"durationchange\\\",this.onDurationChange_),this.manualProgress=!0,this.one(\\\"ready\\\",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\\\"durationchange\\\",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xo(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\\\"progress\\\"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return bl(0,0)}bufferedPercent(){return El(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on(\\\"play\\\",this.trackCurrentTime_),this.on(\\\"pause\\\",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\\\"play\\\",this.trackCurrentTime_),this.off(\\\"pause\\\",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(rc.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];\\\"text\\\"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Cl(e),this.trigger(\\\"error\\\")),this.error_}played(){return this.hasStarted_?bl(0,0):bl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}initTrackListeners(){rc.names.forEach(e=>{const t=rc[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener(\\\"removetrack\\\",i),s.addEventListener(\\\"addtrack\\\",i),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"removetrack\\\",i),s.removeEventListener(\\\"addtrack\\\",i)})})}addWebVttScript_(){if(!Le.WebVTT)if(Re.body.contains(this.el())){if(!this.options_[\\\"vtt.js\\\"]&&ya(Ht)&&Object.keys(Ht).length>0)return void this.trigger(\\\"vttjsloaded\\\");const e=Re.createElement(\\\"script\\\");e.src=this.options_[\\\"vtt.js\\\"]||\\\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\\\",e.onload=()=>{this.trigger(\\\"vttjsloaded\\\")},e.onerror=()=>{this.trigger(\\\"vttjserror\\\")},this.on(\\\"dispose\\\",()=>{e.onload=null,e.onerror=null}),Le.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on(\\\"addtrack\\\",i),t.on(\\\"removetrack\\\",s),this.addWebVttScript_();const n=()=>this.trigger(\\\"texttrackchange\\\"),r=()=>{n();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener(\\\"cuechange\\\",n),\\\"showing\\\"===i.mode&&i.addEventListener(\\\"cuechange\\\",n)}};r(),e.addEventListener(\\\"change\\\",r),e.addEventListener(\\\"addtrack\\\",r),e.addEventListener(\\\"removetrack\\\",r),this.on(\\\"dispose\\\",function(){t.off(\\\"addtrack\\\",i),t.off(\\\"removetrack\\\",s),e.removeEventListener(\\\"change\\\",r),e.removeEventListener(\\\"addtrack\\\",r),e.removeEventListener(\\\"removetrack\\\",r);for(let t=0;t<e.length;t++){e[t].removeEventListener(\\\"cuechange\\\",n)}})}addTextTrack(e,t,i){if(!e)throw new Error(\\\"TextTrack kind is required but was not provided\\\");return function(e,t,i,s,n={}){const r=e.textTracks();n.kind=t,i&&(n.label=i),s&&(n.language=s),n.tech=e;const a=new oc.text.TrackClass(n);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=va(e,{tech:this});return new ac.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return\\\"boolean\\\"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Mo();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one(\\\"playing\\\",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return\\\"\\\"}static canPlayType(e){return\\\"\\\"}static canPlaySource(e,t){return lc.canPlayType(e.type)}static isTech(e){return e.prototype instanceof lc||e instanceof lc||e===lc}static registerTech(e,t){if(lc.techs_||(lc.techs_={}),!lc.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!lc.canPlayType)throw new Error(\\\"Techs must have a static canPlayType method on them\\\");if(!lc.canPlaySource)throw new Error(\\\"Techs must have a static canPlaySource method on them\\\");return e=pl(e),lc.techs_[e]=t,lc.techs_[hl(e)]=t,\\\"Tech\\\"!==e&&lc.defaultTechOrder_.push(e),t}static getTech(e){if(e)return lc.techs_&&lc.techs_[e]?lc.techs_[e]:(e=pl(e),Le&&Le.videojs&&Le.videojs[e]?(da.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Le.videojs[e]):void 0)}}oc.names.forEach(function(e){const t=oc[e];lc.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),lc.prototype.featuresVolumeControl=!0,lc.prototype.featuresMuteControl=!0,lc.prototype.featuresFullscreenResize=!1,lc.prototype.featuresPlaybackRate=!1,lc.prototype.featuresProgressEvents=!1,lc.prototype.featuresSourceset=!1,lc.prototype.featuresTimeupdateEvents=!1,lc.prototype.featuresNativeTextTracks=!1,lc.prototype.featuresVideoFrameCallback=!1,lc.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;e<i.length;e++)if(s=i[e].canPlayType(t),s)return s;return\\\"\\\"},e.selectSourceHandler=function(t,i){const s=e.sourceHandlers||[];let n;for(let e=0;e<s.length;e++)if(n=s[e].canHandleSource(t,i),n)return s[e];return null},e.canPlaySource=function(t,i){const s=e.selectSourceHandler(t,i);return s?s.canHandleSource(t,i):\\\"\\\"};[\\\"seekable\\\",\\\"seeking\\\",\\\"duration\\\"].forEach(function(e){const t=this[e];\\\"function\\\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:da.error(\\\"No source handler found for the current source.\\\")),this.disposeSourceHandler(),this.off(\\\"dispose\\\",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one(\\\"dispose\\\",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\\\"audio\\\",\\\"video\\\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},fl.registerComponent(\\\"Tech\\\",lc),lc.registerTech(\\\"Tech\\\",lc),lc.defaultTechOrder_=[];const cc={},dc={},uc={};function hc(e,t,i){e.setTimeout(()=>vc(t,cc[t.type],i,e),1)}function pc(e,t,i,s=null){const n=\\\"call\\\"+pl(i),r=e.reduce(yc(n),s),a=r===uc,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const mc={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gc={setCurrentTime:1,setMuted:1,setVolume:1},fc={play:1,pause:1};function yc(e){return(t,i)=>t===uc?uc:i[e]?i[e](t):t}function vc(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if(\\\"string\\\"==typeof a)vc(e,cc[a],i,s,n,r);else if(a){const t=function(e,t){const i=dc[e.id()];let s=null;if(null==i)return s=t(e),dc[e.id()]=[[t,s]],s;for(let e=0;e<i.length;e++){const[n,r]=i[e];n===t&&(s=r)}return null===s&&(s=t(e),i.push([t,s])),s}(s,a);if(!t.setSource)return n.push(t),vc(e,o,i,s,n,r);t.setSource(Object.assign({},e),function(a,l){if(a)return vc(e,o,i,s,n,r);n.push(t),vc(l,e.type===l.type?o:cc[l.type],i,s,n,r)})}else o.length?vc(e,o,i,s,n,r):r?i(e,n):vc(e,cc[\\\"*\\\"],i,s,n,!0)}const bc={opus:\\\"video/ogg\\\",ogv:\\\"video/ogg\\\",mp4:\\\"video/mp4\\\",mov:\\\"video/mp4\\\",m4v:\\\"video/mp4\\\",mkv:\\\"video/x-matroska\\\",m4a:\\\"audio/mp4\\\",mp3:\\\"audio/mpeg\\\",aac:\\\"audio/aac\\\",caf:\\\"audio/x-caf\\\",flac:\\\"audio/flac\\\",oga:\\\"audio/ogg\\\",wav:\\\"audio/wav\\\",m3u8:\\\"application/x-mpegURL\\\",mpd:\\\"application/dash+xml\\\",jpg:\\\"image/jpeg\\\",jpeg:\\\"image/jpeg\\\",gif:\\\"image/gif\\\",png:\\\"image/png\\\",svg:\\\"image/svg+xml\\\",webp:\\\"image/webp\\\"},_c=function(e=\\\"\\\"){const t=Kl(e);return bc[t.toLowerCase()]||\\\"\\\"},Tc=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(e){e=Tc(e),Array.isArray(e)?t=t.concat(e):fa(e)&&t.push(e)}),e=t}else e=\\\"string\\\"==typeof e&&e.trim()?[Sc({src:e})]:fa(e)&&\\\"string\\\"==typeof e.src&&e.src&&e.src.trim()?[Sc(e)]:[];return e};function Sc(e){if(!e.type){const t=_c(e.src);t&&(e.type=t)}return e}const wc=Ua?10009:Ba?461:8,kc={codes:{play:415,pause:19,ff:417,rw:412,back:wc},names:{415:\\\"play\\\",19:\\\"pause\\\",417:\\\"ff\\\",412:\\\"rw\\\",[wc]:\\\"back\\\"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class xc extends Zo{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on(\\\"keydown\\\",this.onKeyDown_),this.player_.on(\\\"modalKeydown\\\",this.onKeyDown_),this.player_.on(\\\"loadedmetadata\\\",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on(\\\"modalclose\\\",()=>{this.refocusComponent()}),this.player_.on(\\\"focusin\\\",this.handlePlayerFocus_.bind(this)),this.player_.on(\\\"focusout\\\",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on(\\\"aftermodalfill\\\",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off(\\\"keydown\\\",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if([\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowUp\\\",\\\"ArrowDown\\\"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(kc.isEventKey(t,\\\"play\\\")||kc.isEventKey(t,\\\"pause\\\")||kc.isEventKey(t,\\\"ff\\\")||kc.isEventKey(t,\\\"rw\\\")){t.preventDefault();const e=kc.getEventName(t);this.performMediaAction_(e)}else kc.isEventKey(t,\\\"Back\\\")&&e.target&&\\\"function\\\"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case\\\"play\\\":this.player_.paused()&&this.player_.play();break;case\\\"pause\\\":this.player_.paused()||this.player_.pause();break;case\\\"ff\\\":this.userSeek_(this.player_.currentTime()+5);break;case\\\"rw\\\":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const s=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(\\\".video-js\\\")),t.classList.contains(\\\"vjs-text-track-settings\\\")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(s&&\\\"CloseButton\\\"===s.name()?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const s of e)s.hasOwnProperty(\\\"el_\\\")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&t.push(s),s.hasOwnProperty(\\\"children_\\\")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(e=>{if(e.hasOwnProperty(\\\"el_\\\")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty(\\\"children_\\\")&&e.children_.length>0?i(e.children_):e.hasOwnProperty(\\\"items\\\")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if(\\\"ErrorDisplay\\\"===e.name_&&e.opened_){const i=e.el_.querySelector(\\\".vjs-errors-ok-button-container\\\");if(i){i.querySelectorAll(\\\"button\\\").forEach((e,i)=>{t.push({name:()=>\\\"ModalButton\\\"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})})}}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const s=t(i.children[e]);if(s)return s}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty(\\\"el_\\\")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:\\\"focusableComponentsChanged\\\",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),s=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),n=this.findBestCandidate_(i.center,s,e);n?this.focus(n):this.trigger({type:\\\"endOfFocusableComponents\\\",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let s=1/0,n=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<s&&(s=a,n=r)}return n}isInDirection_(e,t,i){switch(i){case\\\"right\\\":return t.left>=e.right;case\\\"left\\\":return t.right<=e.left;case\\\"down\\\":return t.top>=e.bottom;case\\\"up\\\":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){\\\"object\\\"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const s=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);let r;switch(i){case\\\"right\\\":case\\\"left\\\":r=s+100*n;break;case\\\"up\\\":r=2*n+.5*s;break;case\\\"down\\\":r=5*n+s;break;default:r=s+n}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(\\\"TextTrackSelect\\\"===t.constructor.name){e.focus(t);break}}}fl.registerComponent(\\\"MediaLoader\\\",class extends fl{constructor(e,t,i){if(super(e,va({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,s=t.playerOptions.techOrder;i<s.length;i++){const t=pl(s[i]);let n=lc.getTech(t);if(t||(n=fl.getComponent(t)),n&&n.isSupported()){e.loadTech_(t);break}}}});class Ec extends fl{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e=\\\"div\\\",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),\\\"button\\\"===e&&da.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:\\\"button\\\"},i),this.tabIndex_=t.tabIndex;const s=Qa(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"},{\\\"aria-live\\\":\\\"polite\\\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||\\\"Need Text\\\";const i=this.localize(e);this.controlText_=e,Ja(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute(\\\"title\\\",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"false\\\"),void 0!==this.tabIndex_&&this.el_.setAttribute(\\\"tabIndex\\\",this.tabIndex_),this.on([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.on(\\\"keydown\\\",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.el_.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"),void 0!==this.tabIndex_&&this.el_.removeAttribute(\\\"tabIndex\\\"),this.off(\\\"mouseover\\\",this.handleMouseOver_),this.off(\\\"mouseout\\\",this.handleMouseOut_),this.off([\\\"tap\\\",\\\"click\\\"],this.handleClick_),this.off(\\\"keydown\\\",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){\\\" \\\"===e.key||\\\"Enter\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}}fl.registerComponent(\\\"ClickableComponent\\\",Ec);class Cc extends Ec{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on(\\\"posterchange\\\",this.update_)}dispose(){this.player().off(\\\"posterchange\\\",this.update_),super.dispose()}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-poster\\\"})}crossOrigin(e){if(void 0===e)return this.$(\\\"img\\\")?this.$(\\\"img\\\").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?this.$(\\\"img\\\")&&(this.$(\\\"img\\\").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$(\\\"img\\\")||this.el_.appendChild(Qa(\\\"picture\\\",{className:\\\"vjs-poster\\\",tabIndex:-1},{},Qa(\\\"img\\\",{loading:\\\"lazy\\\",crossOrigin:this.crossOrigin()},{alt:\\\"\\\"}))),this.$(\\\"img\\\").src=e):this.el_.textContent=\\\"\\\"}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Il(this.player_.play()):this.player_.pause())}}Cc.prototype.crossorigin=Cc.prototype.crossOrigin,fl.registerComponent(\\\"PosterImage\\\",Cc);const Ac=\\\"#222\\\",Ic=\\\"#ccc\\\",jc={monospace:\\\"monospace\\\",sansSerif:\\\"sans-serif\\\",serif:\\\"serif\\\",monospaceSansSerif:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',monospaceSerif:'\\\"Courier New\\\", monospace',proportionalSansSerif:\\\"sans-serif\\\",proportionalSerif:\\\"serif\\\",casual:'\\\"Comic Sans MS\\\", Impact, fantasy',script:'\\\"Monotype Corsiva\\\", cursive',smallcaps:'\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'};function Dc(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\\\"Invalid color code provided, \\\"+e+\\\"; must be formatted as e.g. #f0e or #f604e2.\\\");i=e.slice(1)}return\\\"rgba(\\\"+parseInt(i.slice(0,2),16)+\\\",\\\"+parseInt(i.slice(2,4),16)+\\\",\\\"+parseInt(i.slice(4,6),16)+\\\",\\\"+t+\\\")\\\"}function Pc(e,t,i){try{e.style[t]=i}catch(e){return}}function Lc(e){return e?`${e}px`:\\\"\\\"}fl.registerComponent(\\\"TextTrackDisplay\\\",class extends fl{constructor(e,t,i){super(e,t,i);const s=e=>this.updateDisplay(e),n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on(\\\"loadstart\\\",e=>this.toggleDisplay(e)),e.on(\\\"useractive\\\",s),e.on(\\\"userinactive\\\",s),e.on(\\\"texttrackchange\\\",s),e.on(\\\"loadedmetadata\\\",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(Xo(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on(\\\"fullscreenchange\\\",n),e.on(\\\"playerresize\\\",n);const t=Le.screen.orientation||Le,i=Le.screen.orientation?\\\"change\\\":\\\"orientationchange\\\";t.addEventListener(i,n),e.on(\\\"dispose\\\",()=>t.removeEventListener(i,n));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let s,n,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,s=null,n=null):o.default&&(\\\"descriptions\\\"!==o.kind||s?o.kind in e&&!n&&(n=o):s=o)}r?r.mode=\\\"showing\\\":n?n.mode=\\\"showing\\\":s&&(s.mode=\\\"showing\\\")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-text-track-display\\\"},{translate:\\\"yes\\\",\\\"aria-live\\\":\\\"off\\\",\\\"aria-atomic\\\":\\\"true\\\"})}clearDisplay(){\\\"function\\\"==typeof Le.WebVTT&&Le.WebVTT.processCues(Le,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const s=e[i];\\\"showing\\\"===s.mode&&t.push(s)}return void this.updateForTrack(t)}let i=null,s=null,n=e.length;for(;n--;){const t=e[n];\\\"showing\\\"===t.mode&&(\\\"descriptions\\\"===t.kind?i=t:s=t)}if(s?(\\\"off\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"off\\\"),this.updateForTrack(s)):i&&(\\\"assertive\\\"!==this.getAttribute(\\\"aria-live\\\")&&this.setAttribute(\\\"aria-live\\\",\\\"assertive\\\"),this.updateForTrack(i)),!Le.CSS.supports(\\\"inset\\\",\\\"10px\\\")){const e=this.el_,t=e.querySelectorAll(\\\".vjs-text-track-cue\\\"),i=this.player_.controlBar.el_.getBoundingClientRect().height,s=this.player_.el_.getBoundingClientRect().height;e.style=\\\"\\\",Pc(e,\\\"position\\\",\\\"relative\\\"),Pc(e,\\\"height\\\",s-i+\\\"px\\\"),Pc(e,\\\"top\\\",\\\"unset\\\"),Pc(e,\\\"bottom\\\",Fa?s+\\\"px\\\":\\\"0px\\\"),t.length>0&&t.forEach(e=>{if(e.style.inset){const t=e.style.inset.split(\\\" \\\");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:\\\"unset\\\"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!Le.CSS.supports(\\\"inset-inline: 10px\\\"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let n=0,r=0;Math.abs(i-s)>.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),Pc(this.el_,\\\"insetInline\\\",Lc(n)),Pc(this.el_,\\\"insetBlock\\\",Lc(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&Pc(n.firstChild,\\\"color\\\",Dc(t.color||\\\"#fff\\\",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Pc(n.firstChild,\\\"backgroundColor\\\",Dc(t.backgroundColor||\\\"#000\\\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Pc(n,\\\"backgroundColor\\\",Dc(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&(\\\"dropshadow\\\"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${Ac}, 2px 2px 4px ${Ac}, 2px 2px 5px ${Ac}`:\\\"raised\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ac}, 2px 2px ${Ac}, 3px 3px ${Ac}`:\\\"depressed\\\"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${Ic}, 0 1px ${Ic}, -1px -1px ${Ac}, 0 -1px ${Ac}`:\\\"uniform\\\"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}, 0 0 4px ${Ac}`)),t.fontPercent&&1!==t.fontPercent){const e=Le.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+\\\"px\\\",n.style.height=\\\"auto\\\",n.style.top=\\\"auto\\\"}t.fontFamily&&\\\"default\\\"!==t.fontFamily&&(\\\"small-caps\\\"===t.fontFamily?n.firstChild.style.fontVariant=\\\"small-caps\\\":n.firstChild.style.fontFamily=jc[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),\\\"function\\\"!=typeof Le.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const s=e[i];for(let e=0;e<s.activeCues.length;++e)t.push(s.activeCues[e])}Le.WebVTT.processCues(Le,t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const s=i.activeCues[e].displayState;to(s,\\\"vjs-text-track-cue\\\",\\\"vjs-text-track-cue-\\\"+(i.language?i.language:t)),i.language&&oo(s,\\\"lang\\\",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}});fl.registerComponent(\\\"LoadingSpinner\\\",class extends fl{createEl(){const e=this.player_.isAudio(),t=this.localize(e?\\\"Audio Player\\\":\\\"Video Player\\\"),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"{1} is loading.\\\",[t])}),s=super.createEl(\\\"div\\\",{className:\\\"vjs-loading-spinner\\\",dir:\\\"ltr\\\"});return s.appendChild(i),s}handleLanguagechange(){this.$(\\\".vjs-control-text\\\").textContent=this.localize(\\\"{1} is loading.\\\",[this.player_.isAudio()?\\\"Audio Player\\\":\\\"Video Player\\\"])}});class Oc extends Ec{createEl(e,t={},i={}){const s=Qa(\\\"button\\\",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:\\\"button\\\"},i));return this.player_.options_.experimentalSvgIcons||s.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const i=this.constructor.name;return da.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),fl.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute(\\\"disabled\\\")}disable(){super.disable(),this.el_.setAttribute(\\\"disabled\\\",\\\"disabled\\\")}handleKeyDown(e){\\\" \\\"!==e.key&&\\\"Enter\\\"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}fl.registerComponent(\\\"Button\\\",Oc);class Nc extends Oc{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon(\\\"play\\\"),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e))}buildCSSClass(){return\\\"vjs-big-play-button\\\"}handleClick(e){const t=this.player_.play();if(\\\"tap\\\"===e.type||this.mouseused_&&\\\"clientX\\\"in e&&\\\"clientY\\\"in e)return Il(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild(\\\"controlBar\\\"),s=i&&i.getChild(\\\"playToggle\\\");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Al(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}Nc.prototype.controlText_=\\\"Play Video\\\",fl.registerComponent(\\\"BigPlayButton\\\",Nc);fl.registerComponent(\\\"CloseButton\\\",class extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"cancel\\\"),this.controlText(t&&t.controlText||this.localize(\\\"Close\\\"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:\\\"close\\\",bubbles:!1})}handleKeyDown(e){\\\"Escape\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger(\\\"click\\\")):super.handleKeyDown(e)}});class Mc extends Oc{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon(\\\"play\\\"),this.on(e,\\\"play\\\",e=>this.handlePlay(e)),this.on(e,\\\"pause\\\",e=>this.handlePause(e)),t.replay&&this.on(e,\\\"ended\\\",e=>this.handleEnded(e))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Il(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass(\\\"vjs-ended\\\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.setIcon(\\\"pause\\\"),this.controlText(\\\"Pause\\\")}handlePause(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.setIcon(\\\"play\\\"),this.controlText(\\\"Play\\\")}handleEnded(e){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-ended\\\"),this.setIcon(\\\"replay\\\"),this.controlText(\\\"Replay\\\"),this.one(this.player_,\\\"seeked\\\",e=>this.handleSeeked(e))}}Mc.prototype.controlText_=\\\"Play\\\",fl.registerComponent(\\\"PlayToggle\\\",Mc);class Rc extends fl{constructor(e,t){super(e,t),this.on(e,[\\\"timeupdate\\\",\\\"ended\\\",\\\"seeking\\\"],e=>this.update(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl(\\\"div\\\",{className:`${e} vjs-time-control vjs-control`}),i=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(this.labelText_)} `},{role:\\\"presentation\\\"});return t.appendChild(i),this.contentEl_=Qa(\\\"span\\\",{className:`${e}-display`},{role:\\\"presentation\\\"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||\\\"seeking\\\"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=kl(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\\\"TimeDisplay#updateTextNode_\\\",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,da.warn(\\\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\\\")),this.textNode_=Re.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Rc.prototype.labelText_=\\\"Time\\\",Rc.prototype.controlText_=\\\"Time\\\",fl.registerComponent(\\\"TimeDisplay\\\",Rc);class Uc extends Rc{buildCSSClass(){return\\\"vjs-current-time\\\"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&\\\"function\\\"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Uc.prototype.labelText_=\\\"Current Time\\\",Uc.prototype.controlText_=\\\"Current Time\\\",fl.registerComponent(\\\"CurrentTimeDisplay\\\",Uc);class Bc extends Rc{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,\\\"durationchange\\\",i),this.on(e,\\\"loadstart\\\",i),this.on(e,\\\"loadedmetadata\\\",i)}buildCSSClass(){return\\\"vjs-duration\\\"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Bc.prototype.labelText_=\\\"Duration\\\",Bc.prototype.controlText_=\\\"Duration\\\",fl.registerComponent(\\\"DurationDisplay\\\",Bc);fl.registerComponent(\\\"TimeDivider\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-time-control vjs-time-divider\\\"},{\\\"aria-hidden\\\":!0}),t=super.createEl(\\\"div\\\"),i=super.createEl(\\\"span\\\",{textContent:\\\"/\\\"});return t.appendChild(i),e.appendChild(t),e}});class Fc extends Rc{constructor(e,t){super(e,t),this.on(e,\\\"durationchange\\\",e=>this.updateContent(e))}buildCSSClass(){return\\\"vjs-remaining-time\\\"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Qa(\\\"span\\\",{},{\\\"aria-hidden\\\":!0},\\\"-\\\"),this.contentEl_),e}updateContent(e){if(\\\"number\\\"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Fc.prototype.labelText_=\\\"Remaining Time\\\",Fc.prototype.controlText_=\\\"Remaining Time\\\",fl.registerComponent(\\\"RemainingTimeDisplay\\\",Fc);fl.registerComponent(\\\"LiveDisplay\\\",class extends fl{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),\\\"durationchange\\\",e=>this.updateShowing(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-live-control vjs-control\\\"});return this.contentEl_=Qa(\\\"div\\\",{className:\\\"vjs-live-display\\\"},{\\\"aria-live\\\":\\\"off\\\"}),this.contentEl_.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:`${this.localize(\\\"Stream Type\\\")} `})),this.contentEl_.appendChild(Re.createTextNode(this.localize(\\\"LIVE\\\"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class qc extends Oc{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl(\\\"button\\\",{className:\\\"vjs-seek-to-live-control vjs-control\\\"});return this.setIcon(\\\"circle\\\",e),this.textEl_=Qa(\\\"span\\\",{className:\\\"vjs-seek-to-live-text\\\",textContent:this.localize(\\\"LIVE\\\")},{\\\"aria-hidden\\\":\\\"true\\\"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\\\"aria-disabled\\\",!0),this.addClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently playing live\\\")):(this.setAttribute(\\\"aria-disabled\\\",!1),this.removeClass(\\\"vjs-at-live-edge\\\"),this.controlText(\\\"Seek to live, currently behind live\\\"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function $c(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}qc.prototype.controlText_=\\\"Seek to live, currently playing live\\\",fl.registerComponent(\\\"SeekToLive\\\",qc);var zc=Object.freeze({__proto__:null,clamp:$c});class Hc extends fl{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on(\\\"mousedown\\\",this.handleMouseDown_),this.on(\\\"touchstart\\\",this.handleMouseDown_),this.on(\\\"keydown\\\",this.handleKeyDown_),this.on(\\\"click\\\",this.handleClick_),this.on(this.player_,\\\"controlsvisible\\\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\\\"disabled\\\"),this.setAttribute(\\\"tabindex\\\",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off(\\\"mousedown\\\",this.handleMouseDown_),this.off(\\\"touchstart\\\",this.handleMouseDown_),this.off(\\\"keydown\\\",this.handleKeyDown_),this.off(\\\"click\\\",this.handleClick_),this.off(this.player_,\\\"controlsvisible\\\",this.update_),this.off(e,\\\"mousemove\\\",this.handleMouseMove_),this.off(e,\\\"mouseup\\\",this.handleMouseUp_),this.off(e,\\\"touchmove\\\",this.handleMouseMove_),this.off(e,\\\"touchend\\\",this.handleMouseUp_),this.removeAttribute(\\\"tabindex\\\"),this.addClass(\\\"disabled\\\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+\\\" vjs-slider\\\",t=Object.assign({tabIndex:0},t),i=Object.assign({role:\\\"slider\\\",\\\"aria-valuenow\\\":0,\\\"aria-valuemin\\\":0,\\\"aria-valuemax\\\":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;\\\"mousedown\\\"===e.type&&e.preventDefault(),\\\"touchstart\\\"!==e.type||Ia||e.preventDefault(),co(),this.addClass(\\\"vjs-sliding\\\"),this.trigger(\\\"slideractive\\\"),this.on(t,\\\"mousemove\\\",this.handleMouseMove_),this.on(t,\\\"mouseup\\\",this.handleMouseUp_),this.on(t,\\\"touchmove\\\",this.handleMouseMove_),this.on(t,\\\"touchend\\\",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;uo(),this.removeClass(\\\"vjs-sliding\\\"),this.trigger(\\\"sliderinactive\\\"),this.off(t,\\\"mousemove\\\",this.handleMouseMove_),this.off(t,\\\"mouseup\\\",this.handleMouseUp_),this.off(t,\\\"touchmove\\\",this.handleMouseMove_),this.off(t,\\\"touchend\\\",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame(\\\"Slider#update\\\",()=>{const t=this.vertical()?\\\"height\\\":\\\"width\\\";this.bar.el().style[t]=(100*e).toFixed(2)+\\\"%\\\"})),e}getProgress(){return Number($c(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=mo(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,s=t&&t.horizontalSeek;i?s&&\\\"ArrowLeft\\\"===e.key||!s&&\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&\\\"ArrowRight\\\"===e.key||!s&&\\\"ArrowUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):\\\"ArrowUp\\\"===e.key||\\\"ArrowRight\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\\\"vjs-slider-vertical\\\"):this.addClass(\\\"vjs-slider-horizontal\\\")}}fl.registerComponent(\\\"Slider\\\",Hc);const Vc=(e,t)=>$c(e/t*100,0,100).toFixed(2)+\\\"%\\\";fl.registerComponent(\\\"LoadProgressBar\\\",class extends fl{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,\\\"progress\\\",e=>this.update(e))}createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-load-progress\\\"}),t=Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\"}),i=Qa(\\\"span\\\",{textContent:this.localize(\\\"Loaded\\\")}),s=Re.createTextNode(\\\": \\\");return this.percentageEl_=Qa(\\\"span\\\",{className:\\\"vjs-control-text-loaded-percentage\\\",textContent:\\\"0%\\\"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame(\\\"LoadProgressBar#update\\\",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Vc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ja(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=n[e];a||(a=this.el_.appendChild(Qa()),n[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=Vc(i,s),a.style.width=Vc(r-i,s))}for(let e=n.length;e>t.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length})}});fl.registerComponent(\\\"TimeTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-time-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=po(this.el_),n=ho(this.player_.el()),r=e.width*t;if(!n||!s)return;let a=e.left-n.left+r,o=e.width-r+(n.right-e.right);o||(o=e.width-r,a=r);let l=s.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>s.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ja(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame(\\\"TimeTooltip#updateTime\\\",()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?\\\"\\\":\\\"-\\\")+kl(i,e)}else n=kl(i,r);this.update(e,t,n),s&&s()})}});class Wc extends fl{constructor(e,t){super(e,t),this.setIcon(\\\"circle\\\"),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-play-progress vjs-slider-bar\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i){const s=this.getChild(\\\"timeTooltip\\\");if(!s)return;const n=i&&i.target&&\\\"function\\\"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,n)}}Wc.prototype.options_={children:[]},za||xa||Wc.prototype.options_.children.push(\\\"timeTooltip\\\"),fl.registerComponent(\\\"PlayProgressBar\\\",Wc);class Gc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t){const i=t*this.player_.duration();this.getChild(\\\"timeTooltip\\\").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+\\\"px\\\"})}}Gc.prototype.options_={children:[\\\"timeTooltip\\\"]},fl.registerComponent(\\\"MouseTimeDisplay\\\",Gc);class Xc extends Hc{constructor(e,t){(t=va(Xc.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(za||xa)||e.options_.disableSeekWhileScrubbingOnSTV;(!za&&!xa||i)&&t.children.splice(1,0,\\\"mouseTimeDisplay\\\"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Xo(this,this.update),this.update=Yo(this.update_,Go),this.on(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.on(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.on(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.on(Re,\\\"visibilitychange\\\",this.toggleVisibility_)}toggleVisibility_(e){\\\"hidden\\\"===Re.visibilityState?(this.cancelNamedAnimationFrame(\\\"SeekBar#update\\\"),this.cancelNamedAnimationFrame(\\\"Slider#update\\\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Go))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\\\"ended\\\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-holder\\\"},{\\\"aria-label\\\":this.localize(\\\"Progress Bar\\\")})}update(e){if(\\\"hidden\\\"===Re.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame(\\\"SeekBar#update\\\",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let n=this.player_.duration();s&&s.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute(\\\"aria-valuenow\\\",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===n||(this.el_.setAttribute(\\\"aria-valuetext\\\",this.localize(\\\"progress bar timing: currentTime={1} duration={2}\\\",[kl(i,n),kl(n,n)],\\\"{1} of {2}\\\")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(ho(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){_o(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!_o(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.show()}disable(){super.disable();const e=this.getChild(\\\"mouseTimeDisplay\\\");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Il(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:\\\"timeupdate\\\",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(\\\" \\\"===e.key||\\\"Enter\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(\\\"Home\\\"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(\\\"End\\\"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else\\\"PageDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):\\\"PageUp\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,[\\\"durationchange\\\",\\\"timeupdate\\\"],this.update),this.off(this.player_,[\\\"ended\\\"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,\\\"liveedgechange\\\",this.update),this.off(this.player_,[\\\"playing\\\"],this.enableIntervalHandler_),this.off(this.player_,[\\\"ended\\\",\\\"pause\\\",\\\"waiting\\\"],this.disableIntervalHandler_),\\\"hidden\\\"in Re&&\\\"visibilityState\\\"in Re&&this.off(Re,\\\"visibilitychange\\\",this.toggleVisibility_),super.dispose()}}Xc.prototype.options_={children:[\\\"loadProgressBar\\\",\\\"playProgressBar\\\"],barName:\\\"playProgressBar\\\",stepSeconds:5,pageMultiplier:12},fl.registerComponent(\\\"SeekBar\\\",Xc);class Yc extends fl{constructor(e,t){super(e,t),this.handleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.throttledHandleMouseSeek=Yo(Xo(this,this.handleMouseSeek),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-progress-control vjs-control\\\"})}handleMouseMove(e){const t=this.getChild(\\\"seekBar\\\");if(!t)return;const i=t.getChild(\\\"playProgressBar\\\"),s=t.getChild(\\\"mouseTimeDisplay\\\");if(!i&&!s)return;const n=t.el(),r=po(n);let a=mo(n,e).x;a=$c(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.off(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\\\"disabled\\\"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild(\\\"seekBar\\\");this.player_.scrubbing(!1),e.videoWasPlaying&&Il(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on([\\\"mousedown\\\",\\\"touchstart\\\"],this.handleMouseDownHandler_),this.on(this.el_,[\\\"mousemove\\\",\\\"touchmove\\\"],this.handleMouseMove),this.removeClass(\\\"disabled\\\"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.off(e,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(e,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild(\\\"seekBar\\\");i&&i.handleMouseDown(e),this.on(t,\\\"mousemove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseSeek),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild(\\\"seekBar\\\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Yc.prototype.options_={children:[\\\"seekBar\\\"]},fl.registerComponent(\\\"ProgressControl\\\",Yc);class Kc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"picture-in-picture-enter\\\"),this.on(e,[\\\"enterpictureinpicture\\\",\\\"leavepictureinpicture\\\"],e=>this.handlePictureInPictureChange(e)),this.on(e,[\\\"disablepictureinpicturechanged\\\",\\\"loadedmetadata\\\"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,[\\\"loadedmetadata\\\",\\\"audioonlymodechange\\\",\\\"audiopostermodechange\\\"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){\\\"audio\\\"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Re.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&\\\"documentPictureInPicture\\\"in Le?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon(\\\"picture-in-picture-exit\\\"),this.controlText(\\\"Exit Picture-in-Picture\\\")):(this.setIcon(\\\"picture-in-picture-enter\\\"),this.controlText(\\\"Picture-in-Picture\\\")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){\\\"function\\\"==typeof Re.exitPictureInPicture&&super.show()}}Kc.prototype.controlText_=\\\"Picture-in-Picture\\\",fl.registerComponent(\\\"PictureInPictureToggle\\\",Kc);class Qc extends Oc{constructor(e,t){super(e,t),this.setIcon(\\\"fullscreen-enter\\\"),this.on(e,\\\"fullscreenchange\\\",e=>this.handleFullscreenChange(e)),!1===Re[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText(\\\"Exit Fullscreen\\\"),this.setIcon(\\\"fullscreen-exit\\\")):(this.controlText(\\\"Fullscreen\\\"),this.setIcon(\\\"fullscreen-enter\\\"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Qc.prototype.controlText_=\\\"Fullscreen\\\",fl.registerComponent(\\\"FullscreenToggle\\\",Qc);fl.registerComponent(\\\"VolumeLevel\\\",class extends fl{createEl(){const e=super.createEl(\\\"div\\\",{className:\\\"vjs-volume-level\\\"});return this.setIcon(\\\"circle\\\",e),e.appendChild(super.createEl(\\\"span\\\",{className:\\\"vjs-control-text\\\"})),e}});fl.registerComponent(\\\"VolumeLevelTooltip\\\",class extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-tooltip\\\"},{\\\"aria-hidden\\\":\\\"true\\\"})}update(e,t,i,s){if(!i){const i=ho(this.el_),s=ho(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Ja(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame(\\\"VolumeLevelTooltip#updateVolume\\\",()=>{this.update(e,t,i,s.toFixed(0)),n&&n()})}});class Jc extends fl{constructor(e,t){super(e,t),this.update=Yo(Xo(this,this.update),Go)}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-mouse-display\\\"})}update(e,t,i){const s=100*t;this.getChild(\\\"volumeLevelTooltip\\\").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+\\\"px\\\":this.el_.style.left=e.width*t+\\\"px\\\"})}}Jc.prototype.options_={children:[\\\"volumeLevelTooltip\\\"]},fl.registerComponent(\\\"MouseVolumeLevelDisplay\\\",Jc);class Zc extends Hc{constructor(e,t){super(e,t),this.on(\\\"slideractive\\\",e=>this.updateLastVolume_(e)),this.on(e,\\\"volumechange\\\",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-volume-bar vjs-slider-bar\\\"},{\\\"aria-label\\\":this.localize(\\\"Volume Level\\\"),\\\"aria-live\\\":\\\"polite\\\"})}handleMouseDown(e){_o(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild(\\\"mouseVolumeLevelDisplay\\\");if(t){const i=this.el(),s=ho(i),n=this.vertical();let r=mo(i,e);r=n?r.y:r.x,r=$c(r,0,1),t.update(s,r,n)}_o(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\\\"aria-valuenow\\\",t),this.el_.setAttribute(\\\"aria-valuetext\\\",t+\\\"%\\\")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one(\\\"sliderinactive\\\",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Zc.prototype.options_={children:[\\\"volumeLevel\\\"],barName:\\\"volumeLevel\\\"},za||xa||Zc.prototype.options_.children.splice(0,0,\\\"mouseVolumeLevelDisplay\\\"),Zc.prototype.playerEvent=\\\"volumechange\\\",fl.registerComponent(\\\"VolumeBar\\\",Zc);class ed extends fl{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||ya(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresVolumeControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.throttledHandleMouseMove=Yo(Xo(this,this.handleMouseMove),Go),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on(\\\"mousedown\\\",e=>this.handleMouseDown(e)),this.on(\\\"touchstart\\\",e=>this.handleMouseDown(e)),this.on(\\\"mousemove\\\",e=>this.handleMouseMove(e)),this.on(this.volumeBar,[\\\"focus\\\",\\\"slideractive\\\"],()=>{this.volumeBar.addClass(\\\"vjs-slider-active\\\"),this.addClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"slideractive\\\")}),this.on(this.volumeBar,[\\\"blur\\\",\\\"sliderinactive\\\"],()=>{this.volumeBar.removeClass(\\\"vjs-slider-active\\\"),this.removeClass(\\\"vjs-slider-active\\\"),this.trigger(\\\"sliderinactive\\\")})}createEl(){let e=\\\"vjs-volume-horizontal\\\";return this.options_.vertical&&(e=\\\"vjs-volume-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.on(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.on(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.on(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,\\\"mousemove\\\",this.throttledHandleMouseMove),this.off(t,\\\"touchmove\\\",this.throttledHandleMouseMove),this.off(t,\\\"mouseup\\\",this.handleMouseUpHandler_),this.off(t,\\\"touchend\\\",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}ed.prototype.options_={children:[\\\"volumeBar\\\"]},fl.registerComponent(\\\"VolumeControl\\\",ed);class td extends Oc{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\\\"vjs-hidden\\\"),e.on(t,\\\"loadstart\\\",function(){t.tech_.featuresMuteControl?e.removeClass(\\\"vjs-hidden\\\"):e.addClass(\\\"vjs-hidden\\\")})}(this,e),this.on(e,[\\\"loadstart\\\",\\\"volumechange\\\"],e=>this.update(e))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon(\\\"volume-high\\\"),za&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon(\\\"volume-mute\\\"),t=0):e<.33?(this.setIcon(\\\"volume-low\\\"),t=1):e<.67&&(this.setIcon(\\\"volume-medium\\\"),t=2),io(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?\\\" \\\":\\\"\\\"}vjs-vol-${t}`,\\\"\\\")),to(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?\\\"Unmute\\\":\\\"Mute\\\";this.controlText()!==e&&this.controlText(e)}}td.prototype.controlText_=\\\"Mute\\\",fl.registerComponent(\\\"MuteToggle\\\",td);class id extends fl{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||ya(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,[\\\"loadstart\\\"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,\\\"keyup\\\",e=>this.handleKeyPress(e)),this.on(this.volumeControl,\\\"keyup\\\",e=>this.handleVolumeControlKeyUp(e)),this.on(\\\"keydown\\\",e=>this.handleKeyPress(e)),this.on(\\\"mouseover\\\",e=>this.handleMouseOver(e)),this.on(\\\"mouseout\\\",e=>this.handleMouseOut(e)),this.on(this.volumeControl,[\\\"slideractive\\\"],this.sliderActive_),this.on(this.volumeControl,[\\\"sliderinactive\\\"],this.sliderInactive_)}sliderActive_(){this.addClass(\\\"vjs-slider-active\\\")}sliderInactive_(){this.removeClass(\\\"vjs-slider-active\\\")}volumePanelState_(){this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-hidden\\\"),this.volumeControl.hasClass(\\\"vjs-hidden\\\")&&!this.muteToggle.hasClass(\\\"vjs-hidden\\\")&&this.addClass(\\\"vjs-mute-toggle-only\\\")}createEl(){let e=\\\"vjs-volume-panel-horizontal\\\";return this.options_.inline||(e=\\\"vjs-volume-panel-vertical\\\"),super.createEl(\\\"div\\\",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){\\\"Escape\\\"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass(\\\"vjs-hover\\\"),qo(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleKeyPressHandler_)}handleKeyPress(e){\\\"Escape\\\"===e.key&&this.handleMouseOut()}}id.prototype.options_={children:[\\\"muteToggle\\\",\\\"volumeControl\\\"]},fl.registerComponent(\\\"VolumePanel\\\",id);class sd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip forward {1} seconds\\\",[this.skipTime]))}}sd.prototype.controlText_=\\\"Skip Forward\\\",fl.registerComponent(\\\"SkipForward\\\",sd);class nd extends Oc{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize(\\\"Skip backward {1} seconds\\\",[this.skipTime]))}}nd.prototype.controlText_=\\\"Skip Backward\\\",fl.registerComponent(\\\"SkipBackward\\\",nd);class rd extends fl{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof fl&&(this.on(e,\\\"blur\\\",this.boundHandleBlur_),this.on(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof fl&&(this.off(e,\\\"blur\\\",this.boundHandleBlur_),this.off(e,[\\\"tap\\\",\\\"click\\\"],this.boundHandleTapClick_))}removeChild(e){\\\"string\\\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||\\\"ul\\\";this.contentEl_=Qa(e,{className:\\\"vjs-menu-content\\\"}),this.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\");const t=super.createEl(\\\"div\\\",{append:this.contentEl_,className:\\\"vjs-menu\\\"});return t.appendChild(this.contentEl_),qo(t,\\\"click\\\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Re.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;\\\"CaptionSettingsMenuItem\\\"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){\\\"ArrowLeft\\\"===e.key||\\\"ArrowDown\\\"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):\\\"ArrowRight\\\"!==e.key&&\\\"ArrowUp\\\"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass(\\\"vjs-menu-title\\\")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}fl.registerComponent(\\\"Menu\\\",rd);class ad extends fl{constructor(e,t={}){super(e,t),this.menuButton_=new Oc(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute(\\\"aria-haspopup\\\",\\\"true\\\");const i=Oc.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+\\\" \\\"+i,this.menuButton_.removeClass(\\\"vjs-control\\\"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,\\\"tap\\\",s),this.on(this.menuButton_,\\\"click\\\",s),this.on(this.menuButton_,\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(this.menuButton_,\\\"mouseenter\\\",()=>{this.addClass(\\\"vjs-hover\\\"),this.menu.show(),qo(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}),this.on(\\\"mouseleave\\\",e=>this.handleMouseLeave(e)),this.on(\\\"keydown\\\",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute(\\\"role\\\")):(this.show(),this.menu.contentEl_.setAttribute(\\\"role\\\",\\\"menu\\\"))}createMenu(){const e=new rd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Qa(\\\"li\\\",{className:\\\"vjs-menu-title\\\",textContent:pl(this.options_.title),tabIndex:-1}),i=new fl(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl(\\\"div\\\",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e=\\\"vjs-menu-button\\\";!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\";return`vjs-menu-button ${e} ${Oc.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e=\\\"vjs-menu-button\\\";return!0===this.options_.inline?e+=\\\"-inline\\\":e+=\\\"-popup\\\",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass(\\\"vjs-hover\\\"),$o(Re,\\\"keyup\\\",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){\\\"Escape\\\"===e.key||\\\"Tab\\\"===e.key?(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):\\\"Up\\\"!==e.key&&(\\\"Down\\\"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||this.removeClass(\\\"vjs-hover\\\")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){\\\"Escape\\\"!==e.key&&\\\"Tab\\\"!==e.key||(this.buttonPressed_&&this.unpressButton(),\\\"Tab\\\"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"true\\\"),za&&Ya())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\\\"aria-expanded\\\",\\\"false\\\"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass(\\\"vjs-disabled\\\"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass(\\\"vjs-disabled\\\"),this.menuButton_.enable()}}fl.registerComponent(\\\"MenuButton\\\",ad);class od extends ad{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const s=Xo(this,this.update);i.addEventListener(\\\"removetrack\\\",s),i.addEventListener(\\\"addtrack\\\",s),i.addEventListener(\\\"labelchange\\\",s),this.player_.on(\\\"ready\\\",s),this.player_.on(\\\"dispose\\\",function(){i.removeEventListener(\\\"removetrack\\\",s),i.removeEventListener(\\\"addtrack\\\",s),i.removeEventListener(\\\"labelchange\\\",s)})}}fl.registerComponent(\\\"TrackButton\\\",od);class ld extends Ec{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute(\\\"role\\\",\\\"menuitemcheckbox\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitemradio\\\"):this.el_.setAttribute(\\\"role\\\",\\\"menuitem\\\")}createEl(e,t,i){this.nonIconControl=!0;const s=super.createEl(\\\"li\\\",Object.assign({className:\\\"vjs-menu-item\\\",tabIndex:-1},t),i),n=Qa(\\\"span\\\",{className:\\\"vjs-menu-item-text\\\",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(n):s.replaceChild(n,s.querySelector(\\\".vjs-icon-placeholder\\\")),s}handleKeyDown(e){[\\\"Tab\\\",\\\"Escape\\\",\\\"ArrowUp\\\",\\\"ArrowLeft\\\",\\\"ArrowRight\\\",\\\"ArrowDown\\\"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"true\\\"),this.controlText(\\\", selected\\\"),this.isSelected_=!0):(this.removeClass(\\\"vjs-selected\\\"),this.el_.setAttribute(\\\"aria-checked\\\",\\\"false\\\"),this.controlText(\\\"\\\"),this.isSelected_=!1))}}fl.registerComponent(\\\"MenuItem\\\",ld);class cd extends ld{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=\\\"showing\\\"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.addEventListener(\\\"change\\\",n),s.addEventListener(\\\"selectedlanguagechange\\\",r),this.on(\\\"dispose\\\",function(){e.off([\\\"loadstart\\\",\\\"texttrackchange\\\"],n),s.removeEventListener(\\\"change\\\",n),s.removeEventListener(\\\"selectedlanguagechange\\\",r)}),void 0===s.onchange){let e;this.on([\\\"tap\\\",\\\"click\\\"],function(){if(\\\"object\\\"!=typeof Le.Event)try{e=new Le.Event(\\\"change\\\")}catch(e){}e||(e=Re.createEvent(\\\"Event\\\"),e.initEvent(\\\"change\\\",!0,!0)),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const s=i[e];-1!==this.kinds.indexOf(s.kind)&&(s===t?\\\"showing\\\"!==s.mode&&(s.mode=\\\"showing\\\"):\\\"disabled\\\"!==s.mode&&(s.mode=\\\"disabled\\\"))}}handleTracksChange(e){const t=\\\"showing\\\"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(\\\"showing\\\"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}fl.registerComponent(\\\"TextTrackMenuItem\\\",cd);class dd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\\\"disabled\\\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\\\" and \\\")+\\\" off\\\",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(this.options_.kinds.indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e<s;e++){const s=t[e];if([\\\"captions\\\",\\\"descriptions\\\",\\\"subtitles\\\"].indexOf(s.kind)>-1&&\\\"showing\\\"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}fl.registerComponent(\\\"OffTextTrackMenuItem\\\",dd);class ud extends od{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cd){let i;this.label_&&(i=`${this.label_} off`),e.push(new dd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<s.length;i++){const n=s[i];if(this.kinds_.indexOf(n.kind)>-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}fl.registerComponent(\\\"TextTrackButton\\\",ud);class hd extends ld{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n<s.endTime,super(e,t),this.track=i,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}fl.registerComponent(\\\"ChaptersTrackMenuItem\\\",hd);class pd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"chapters\\\"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&\\\"chapters\\\"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener(\\\"load\\\",this.updateHandler_),this.track_.removeEventListener(\\\"cuechange\\\",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\\\"hidden\\\";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener(\\\"load\\\",this.updateHandler_),this.track_.addEventListener(\\\"cuechange\\\",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(pl(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i<s;i++){const s=t[i],n=new hd(this.player_,{track:this.track_,cue:s});e.push(n)}return e}}pd.prototype.kind_=\\\"chapters\\\",pd.prototype.controlText_=\\\"Chapters\\\",fl.registerComponent(\\\"ChaptersButton\\\",pd);class md extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"audio-description\\\");const s=e.textTracks(),n=Xo(this,this.handleTracksChange);s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",function(){s.removeEventListener(\\\"change\\\",n)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(s.kind!==this.kind_&&\\\"showing\\\"===s.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}md.prototype.kind_=\\\"descriptions\\\",md.prototype.controlText_=\\\"Descriptions\\\",fl.registerComponent(\\\"DescriptionsButton\\\",md);class gd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"subtitles\\\")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}gd.prototype.kind_=\\\"subtitles\\\",gd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubtitlesButton\\\",gd);class fd extends cd{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+\\\" settings\\\",selectable:!1,default:!1,mode:\\\"disabled\\\"},t.selectable=!1,t.name=\\\"CaptionSettingsMenuItem\\\",super(e,t),this.addClass(\\\"vjs-texttrack-settings\\\"),this.controlText(\\\", opens \\\"+t.kind+\\\" settings dialog\\\")}handleClick(e){this.player().getChild(\\\"textTrackSettings\\\").open()}handleLanguagechange(){this.$(\\\".vjs-menu-item-text\\\").textContent=this.player_.localize(this.options_.kind+\\\" settings\\\"),super.handleLanguagechange()}}fl.registerComponent(\\\"CaptionSettingsMenuItem\\\",fd);class yd extends ud{constructor(e,t,i){super(e,t,i),this.setIcon(\\\"captions\\\")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yd.prototype.kind_=\\\"captions\\\",yd.prototype.controlText_=\\\"Captions\\\",fl.registerComponent(\\\"CaptionsButton\\\",yd);class vd extends cd{createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return\\\"captions\\\"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon(\\\"captions\\\",s):n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:` ${this.localize(\\\"Captions\\\")}`}))),s}}fl.registerComponent(\\\"SubsCapsMenuItem\\\",vd);class bd extends ud{constructor(e,t={}){super(e,t),this.label_=\\\"subtitles\\\",this.setIcon(\\\"subtitles\\\"),[\\\"en\\\",\\\"en-us\\\",\\\"en-ca\\\",\\\"fr-ca\\\"].indexOf(this.player_.language_)>-1&&(this.label_=\\\"captions\\\",this.setIcon(\\\"captions\\\")),this.menuButton_.controlText(pl(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\\\"textTrackSettings\\\")||(e.push(new fd(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,vd),e}}bd.prototype.kinds_=[\\\"captions\\\",\\\"subtitles\\\"],bd.prototype.controlText_=\\\"Subtitles\\\",fl.registerComponent(\\\"SubsCapsButton\\\",bd);class _d extends ld{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||\\\"Unknown\\\",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener(\\\"change\\\",n),this.on(\\\"dispose\\\",()=>{s.removeEventListener(\\\"change\\\",n)})}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(\\\".vjs-menu-item-text\\\");return[\\\"main-desc\\\",\\\"descriptions\\\"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-icon-placeholder\\\"},{\\\"aria-hidden\\\":!0})),n.appendChild(Qa(\\\"span\\\",{className:\\\"vjs-control-text\\\",textContent:\\\" \\\"+this.localize(\\\"Descriptions\\\")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}fl.registerComponent(\\\"AudioTrackMenuItem\\\",_d);class Td extends od{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon(\\\"audio\\\")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const s=t[i];e.push(new _d(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}Td.prototype.controlText_=\\\"Audio Track\\\",fl.registerComponent(\\\"AudioTrackButton\\\",Td);class Sd extends ld{constructor(e,t){const i=t.rate,s=parseFloat(i,10);t.label=i,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=s,this.on(e,\\\"ratechange\\\",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Sd.prototype.contentElType=\\\"button\\\",fl.registerComponent(\\\"PlaybackRateMenuItem\\\",Sd);class wd extends ad{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute(\\\"aria-describedby\\\",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,\\\"loadstart\\\",e=>this.updateVisibility(e)),this.on(e,\\\"ratechange\\\",e=>this.updateLabel(e)),this.on(e,\\\"playbackrateschange\\\",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_=\\\"vjs-playback-rate-value-label-\\\"+this.id_,this.labelEl_=Qa(\\\"div\\\",{className:\\\"vjs-playback-rate-value\\\",id:this.labelElId_,textContent:\\\"1x\\\"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Sd(this.player(),{rate:e[i]+\\\"x\\\"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass(\\\"vjs-hidden\\\"):this.addClass(\\\"vjs-hidden\\\")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+\\\"x\\\")}}wd.prototype.controlText_=\\\"Playback Rate\\\",fl.registerComponent(\\\"PlaybackRateMenuButton\\\",wd);class kd extends fl{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e=\\\"div\\\",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}fl.registerComponent(\\\"Spacer\\\",kd);fl.registerComponent(\\\"CustomControlSpacer\\\",class extends kd{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl(\\\"div\\\",{className:this.buildCSSClass(),textContent:\\\" \\\"})}});class xd extends fl{createEl(){return super.createEl(\\\"div\\\",{className:\\\"vjs-control-bar\\\",dir:\\\"ltr\\\"})}}xd.prototype.options_={children:[\\\"playToggle\\\",\\\"skipBackward\\\",\\\"skipForward\\\",\\\"volumePanel\\\",\\\"currentTimeDisplay\\\",\\\"timeDivider\\\",\\\"durationDisplay\\\",\\\"progressControl\\\",\\\"liveDisplay\\\",\\\"seekToLive\\\",\\\"remainingTimeDisplay\\\",\\\"customControlSpacer\\\",\\\"playbackRateMenuButton\\\",\\\"chaptersButton\\\",\\\"descriptionsButton\\\",\\\"subsCapsButton\\\",\\\"audioTrackButton\\\",\\\"pictureInPictureToggle\\\",\\\"fullscreenToggle\\\"]},fl.registerComponent(\\\"ControlBar\\\",xd);class Ed extends Nl{constructor(e,t){super(e,t),this.on(e,\\\"error\\\",e=>{this.open(e)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):\\\"\\\"}}Ed.prototype.options_=Object.assign({},Nl.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),fl.registerComponent(\\\"ErrorDisplay\\\",Ed);class Cd extends fl{constructor(e,t={}){super(e,t),this.el_.setAttribute(\\\"aria-labelledby\\\",this.selectLabelledbyIds)}createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(\\\" \\\").trim();return Qa(\\\"select\\\",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Mo()}`)+\\\"-\\\"+e[1].replace(/\\\\W+/g,\\\"\\\"),i=Qa(\\\"option\\\",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute(\\\"aria-labelledby\\\",`${this.selectLabelledbyIds} ${t}`),i}))}}fl.registerComponent(\\\"TextTrackSelect\\\",Cd);class Ad extends fl{constructor(e,t={}){super(e,t);const i=Qa(\\\"legend\\\",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const s=this.options_.selects;for(const t of s){const i=this.options_.selectConfigs[t],s=i.className,n=i.id.replace(\\\"%s\\\",this.options_.id_);let r=null;const a=`vjs_select_${Mo()}`;if(\\\"colors\\\"===this.options_.type){r=Qa(\\\"span\\\",{className:s});const e=Qa(\\\"label\\\",{id:n,className:\\\"vjs-label\\\",textContent:this.localize(i.label)});e.setAttribute(\\\"for\\\",a),r.appendChild(e)}const o=new Cd(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),\\\"colors\\\"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return Qa(\\\"fieldset\\\",{className:this.options_.className})}}fl.registerComponent(\\\"TextTrackFieldset\\\",Ad);class Id extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize(\\\"Text\\\"),className:\\\"vjs-fg vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize(\\\"Text Background\\\"),className:\\\"vjs-bg vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize(\\\"Caption Area Background\\\"),className:\\\"vjs-window vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"colors\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-colors\\\"})}}fl.registerComponent(\\\"TextTrackSettingsColors\\\",Id);class jd extends fl{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,s=new Ad(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:\\\"Font Size\\\",className:\\\"vjs-font-percent vjs-track-setting\\\",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(s);const n=new Ad(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize(\\\"Text Edge Style\\\"),className:\\\"vjs-edge-style vjs-track-setting\\\",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(n);const r=new Ad(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize(\\\"Font Family\\\"),className:\\\"vjs-font-family vjs-track-setting\\\",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:\\\"font\\\"});this.addChild(r)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-font\\\"})}}fl.registerComponent(\\\"TextTrackSettingsFont\\\",jd);class Dd extends fl{constructor(e,t={}){super(e,t);const i=new Oc(e,{controlText:this.localize(\\\"restore all settings to the default values\\\"),className:\\\"vjs-default-button\\\"});i.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),i.el().textContent=this.localize(\\\"Reset\\\"),this.addChild(i);const s=this.localize(\\\"Done\\\"),n=new Oc(e,{controlText:s,className:\\\"vjs-done-button\\\"});n.el().classList.remove(\\\"vjs-control\\\",\\\"vjs-button\\\"),n.el().textContent=s,this.addChild(n)}createEl(){return Qa(\\\"div\\\",{className:\\\"vjs-track-settings-controls\\\"})}}fl.registerComponent(\\\"TrackSettingsControls\\\",Dd);const Pd=\\\"vjs-text-track-settings\\\",Ld=[\\\"#000\\\",\\\"Black\\\"],Od=[\\\"#00F\\\",\\\"Blue\\\"],Nd=[\\\"#0FF\\\",\\\"Cyan\\\"],Md=[\\\"#0F0\\\",\\\"Green\\\"],Rd=[\\\"#F0F\\\",\\\"Magenta\\\"],Ud=[\\\"#F00\\\",\\\"Red\\\"],Bd=[\\\"#FFF\\\",\\\"White\\\"],Fd=[\\\"#FF0\\\",\\\"Yellow\\\"],qd=[\\\"1\\\",\\\"Opaque\\\"],$d=[\\\"0.5\\\",\\\"Semi-Transparent\\\"],zd=[\\\"0\\\",\\\"Transparent\\\"],Hd={backgroundColor:{selector:\\\".vjs-bg-color > select\\\",id:\\\"captions-background-color-%s\\\",label:\\\"Color\\\",options:[Ld,Bd,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-bg-color\\\"},backgroundOpacity:{selector:\\\".vjs-bg-opacity > select\\\",id:\\\"captions-background-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d,zd],className:\\\"vjs-bg-opacity vjs-opacity\\\"},color:{selector:\\\".vjs-text-color > select\\\",id:\\\"captions-foreground-color-%s\\\",label:\\\"Color\\\",options:[Bd,Ld,Ud,Md,Od,Fd,Rd,Nd],className:\\\"vjs-text-color\\\"},edgeStyle:{selector:\\\".vjs-edge-style > select\\\",id:\\\"\\\",label:\\\"Text Edge Style\\\",options:[[\\\"none\\\",\\\"None\\\"],[\\\"raised\\\",\\\"Raised\\\"],[\\\"depressed\\\",\\\"Depressed\\\"],[\\\"uniform\\\",\\\"Uniform\\\"],[\\\"dropshadow\\\",\\\"Drop shadow\\\"]]},fontFamily:{selector:\\\".vjs-font-family > select\\\",id:\\\"\\\",label:\\\"Font Family\\\",options:[[\\\"proportionalSansSerif\\\",\\\"Proportional Sans-Serif\\\"],[\\\"monospaceSansSerif\\\",\\\"Monospace Sans-Serif\\\"],[\\\"proportionalSerif\\\",\\\"Proportional Serif\\\"],[\\\"monospaceSerif\\\",\\\"Monospace Serif\\\"],[\\\"casual\\\",\\\"Casual\\\"],[\\\"script\\\",\\\"Script\\\"],[\\\"small-caps\\\",\\\"Small Caps\\\"]]},fontPercent:{selector:\\\".vjs-font-percent > select\\\",id:\\\"\\\",label:\\\"Font Size\\\",options:[[\\\"0.50\\\",\\\"50%\\\"],[\\\"0.75\\\",\\\"75%\\\"],[\\\"1.00\\\",\\\"100%\\\"],[\\\"1.25\\\",\\\"125%\\\"],[\\\"1.50\\\",\\\"150%\\\"],[\\\"1.75\\\",\\\"175%\\\"],[\\\"2.00\\\",\\\"200%\\\"],[\\\"3.00\\\",\\\"300%\\\"],[\\\"4.00\\\",\\\"400%\\\"]],default:2,parser:e=>\\\"1.00\\\"===e?null:Number(e)},textOpacity:{selector:\\\".vjs-text-opacity > select\\\",id:\\\"captions-foreground-opacity-%s\\\",label:\\\"Opacity\\\",options:[qd,$d],className:\\\"vjs-text-opacity vjs-opacity\\\"},windowColor:{selector:\\\".vjs-window-color > select\\\",id:\\\"captions-window-color-%s\\\",label:\\\"Color\\\",className:\\\"vjs-window-color\\\"},windowOpacity:{selector:\\\".vjs-window-opacity > select\\\",id:\\\"captions-window-opacity-%s\\\",label:\\\"Opacity\\\",options:[zd,$d,qd],className:\\\"vjs-window-opacity vjs-opacity\\\"}};function Vd(e,t){if(t&&(e=t(e)),e&&\\\"none\\\"!==e)return e}Hd.windowColor.options=Hd.backgroundColor.options;fl.registerComponent(\\\"TextTrackSettings\\\",class extends Nl{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qa(\\\"p\\\",{className:\\\"vjs-control-text\\\",textContent:this.localize(\\\"End of dialog window.\\\")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Id(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"color\\\",\\\"textOpacity\\\"],[\\\"backgroundColor\\\",\\\"backgroundOpacity\\\"],[\\\"windowColor\\\",\\\"windowOpacity\\\"]]});this.addChild(t);const i=new jd(e,{textTrackComponentid:this.id_,selectConfigs:Hd,fieldSets:[[\\\"fontPercent\\\"],[\\\"edgeStyle\\\"],[\\\"fontFamily\\\"]]});this.addChild(i);const s=new Dd(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(\\\".vjs-done-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.saveSettings(),this.close()}),this.on(this.$(\\\".vjs-default-button\\\"),[\\\"click\\\",\\\"tap\\\"],()=>{this.setDefaults(),this.updateDisplay()}),ma(Hd,e=>{this.on(this.$(e.selector),\\\"change\\\",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize(\\\"Caption Settings Dialog\\\")}description(){return this.localize(\\\"Beginning of dialog window. Escape will cancel and close the window.\\\")}buildCSSClass(){return super.buildCSSClass()+\\\" vjs-text-track-settings\\\"}getValues(){return ga(Hd,(e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Vd(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e},{})}setValues(e){ma(Hd,(t,i)=>{!function(e,t,i){if(t)for(let s=0;s<e.options.length;s++)if(Vd(e.options[s].value,i)===t){e.selectedIndex=s;break}}(this.$(t.selector),e[i],t.parser)})}setDefaults(){ma(Hd,e=>{const t=e.hasOwnProperty(\\\"default\\\")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(Le.localStorage.getItem(Pd))}catch(e){da.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Le.localStorage.setItem(Pd,JSON.stringify(e)):Le.localStorage.removeItem(Pd)}catch(e){da.warn(e)}}updateDisplay(){const e=this.player_.getChild(\\\"textTrackDisplay\\\");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});fl.registerComponent(\\\"ResizeManager\\\",class extends fl{constructor(e,t){let i=t.ResizeObserver||Le.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,va({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Le.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Ko(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$o(this,\\\"resize\\\",e),$o(this,\\\"unload\\\",t),t=null};qo(this.el_.contentWindow,\\\"unload\\\",t),qo(this.el_.contentWindow,\\\"resize\\\",e)},this.one(\\\"load\\\",this.loadListener_))}createEl(){return super.createEl(\\\"iframe\\\",{className:\\\"vjs-resize-manager\\\",tabIndex:-1,title:this.localize(\\\"No content\\\")},{\\\"aria-hidden\\\":\\\"true\\\"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger(\\\"playerresize\\\")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\\\"load\\\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Wd={trackingThreshold:20,liveTolerance:15};fl.registerComponent(\\\"LiveTracker\\\",class extends fl{constructor(e,t){super(e,va(Wd,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,\\\"durationchange\\\",e=>this.handleDurationchange(e)),this.on(this.player_,\\\"canplay\\\",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Le.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger(\\\"liveedgechange\\\"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\\\"vjs-liveui\\\"),this.startTracking()):(this.player_.removeClass(\\\"vjs-liveui\\\"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Go),this.trackLive_(),this.on(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,\\\"seeked\\\",this.handleSeeked_):(this.one(this.player_,\\\"play\\\",this.handlePlay_),this.one(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,\\\"seeked\\\",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\\\"play\\\",\\\"pause\\\"],this.trackLiveHandler_),this.off(this.player_,\\\"seeked\\\",this.handleSeeked_),this.off(this.player_,\\\"play\\\",this.handlePlay_),this.off(this.player_,\\\"timeupdate\\\",this.handleFirstTimeupdate_),this.off(this.player_,\\\"timeupdate\\\",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger(\\\"liveedgechange\\\"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return\\\"number\\\"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}});fl.registerComponent(\\\"TitleBar\\\",class extends fl{constructor(e,t){super(e,t),this.on(\\\"statechanged\\\",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-title\\\",id:`vjs-title-bar-title-${Mo()}`}),description:Qa(\\\"div\\\",{className:\\\"vjs-title-bar-description\\\",id:`vjs-title-bar-description-${Mo()}`})},Qa(\\\"div\\\",{className:\\\"vjs-title-bar\\\"},{},ba(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:\\\"aria-labelledby\\\",description:\\\"aria-describedby\\\"};[\\\"title\\\",\\\"description\\\"].forEach(e=>{const s=this.state[e],n=this.els[e],r=i[e];fo(n),s&&Ja(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute(\\\"aria-labelledby\\\"),t.removeAttribute(\\\"aria-describedby\\\")),super.dispose(),this.els=null}});const Gd={initialDisplay:4e3,position:[],takeFocus:!1};fl.registerComponent(\\\"TransientButton\\\",class extends Oc{constructor(e,t){super(e,t=va(Gd,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,[\\\"useractive\\\",\\\"userinactive\\\"],e=>{this.removeClass(\\\"force-display\\\")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(\\\" \\\")}`}createEl(){const e=Qa(\\\"button\\\",{},{type:\\\"button\\\",class:this.buildCSSClass()},Qa(\\\"span\\\"));return this.controlTextEl_=e.querySelector(\\\"span\\\"),e}show(){super.show(),this.addClass(\\\"force-display\\\"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass(\\\"force-display\\\")},this.options_.initialDisplay)}hide(){this.removeClass(\\\"force-display\\\"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const Xd=e=>{const t=e.el();if(t.hasAttribute(\\\"src\\\"))return e.triggerSourceset(t.src),!0;const i=e.$$(\\\"source\\\"),s=[];let n=\\\"\\\";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===s.indexOf(t)&&s.push(t)}return!!s.length&&(1===s.length&&(n=s[0]),e.triggerSourceset(n),!0)},Yd=Object.defineProperty({},\\\"innerHTML\\\",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=Re.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=Re.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\\\"\\\",Le.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Kd=(e,t)=>{let i={};for(let s=0;s<e.length&&(i=Object.getOwnPropertyDescriptor(e[s],t),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},Qd=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},s=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Le.Element.prototype,Yd],\\\"innerHTML\\\"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Xd(e),n};[\\\"append\\\",\\\"appendChild\\\",\\\"insertAdjacentHTML\\\"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))}),Object.defineProperty(t,\\\"innerHTML\\\",va(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,\\\"innerHTML\\\",s)},e.one(\\\"sourceset\\\",t.resetSourceWatch_)},Jd=Object.defineProperty({},\\\"src\\\",{get(){return this.hasAttribute(\\\"src\\\")?Yl(Le.Element.prototype.getAttribute.call(this,\\\"src\\\")):\\\"\\\"},set(e){return Le.Element.prototype.setAttribute.call(this,\\\"src\\\",e),e}}),Zd=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>Kd([e.el(),Le.HTMLMediaElement.prototype,Jd],\\\"src\\\"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,\\\"src\\\",va(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Xd(e)||(e.triggerSourceset(\\\"\\\"),Qd(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Xd(e)||Qd(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,\\\"src\\\",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class eu extends lc{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&\\\"VIDEO\\\"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];\\\"track\\\"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute(\\\"crossorigin\\\")||!Ql(n.src)||(s=!0)):i.push(n))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&da.warn(\\\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\\\nThis may prevent text tracks from loading.\\\"),this.restoreMetadataTracksInIOSNativePlayer_(),(qa||Ra)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),eu.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Zd(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const s=e[i];\\\"metadata\\\"===s.kind&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener(\\\"change\\\",i),this.on(\\\"dispose\\\",()=>e.removeEventListener(\\\"change\\\",i));const s=()=>{for(let e=0;e<t.length;e++){const i=t[e];\\\"disabled\\\"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener(\\\"change\\\",s)};this.on(\\\"webkitbeginfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s),e.addEventListener(\\\"change\\\",s)}),this.on(\\\"webkitendfullscreen\\\",()=>{e.removeEventListener(\\\"change\\\",i),e.addEventListener(\\\"change\\\",i),e.removeEventListener(\\\"change\\\",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_(\\\"Audio\\\",e)}overrideNativeVideoTracks(e){this.overrideNative_(\\\"Video\\\",e)}proxyNativeTracksForType_(e){const t=rc[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:\\\"change\\\",target:s,currentTarget:s,srcElement:s};s.trigger(i),\\\"text\\\"===e&&this[ac.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<s.length;t++){let n=!1;for(let e=0;e<i.length;e++)if(i[e]===s[t]){n=!0;break}n||e.push(s[t])}for(;e.length;)s.removeTrack(e.shift())};this[t.getterName+\\\"Listeners_\\\"]=n,Object.keys(n).forEach(e=>{const t=n[e];i.addEventListener(e,t),this.on(\\\"dispose\\\",s=>i.removeEventListener(e,t))}),this.on(\\\"loadstart\\\",r),this.on(\\\"dispose\\\",e=>this.off(\\\"loadstart\\\",r))}proxyNativeTracks_(){rc.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),eu.disposeMediaElement(e),e=t}else{e=Re.createElement(\\\"video\\\");const t=va({},this.options_.tag&&ro(this.options_.tag));qa&&!0===this.options_.nativeControlsForTouch||delete t.controls,no(e,Object.assign(t,{id:this.options_.techId,class:\\\"vjs-tech\\\"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&oo(e,\\\"preload\\\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=[\\\"loop\\\",\\\"muted\\\",\\\"playsinline\\\",\\\"autoplay\\\"];for(let i=0;i<t.length;i++){const s=t[i],n=this.options_[s];void 0!==n&&(n?oo(e,s,s):lo(e,s),e[s]=n)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on(\\\"loadstart\\\",t);const i=function(){e||this.trigger(\\\"loadstart\\\")};return this.on(\\\"loadedmetadata\\\",i),void this.ready(function(){this.off(\\\"loadstart\\\",t),this.off(\\\"loadedmetadata\\\",i),e||this.trigger(\\\"loadstart\\\")})}const t=[\\\"loadstart\\\"];t.push(\\\"loadedmetadata\\\"),e.readyState>=2&&t.push(\\\"loadeddata\\\"),e.readyState>=3&&t.push(\\\"canplay\\\"),e.readyState>=4&&t.push(\\\"canplaythrough\\\"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ha?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){da(e,\\\"Video is not ready. (Video.js)\\\")}}duration(){if(this.el_.duration===1/0&&xa&&Ia&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger(\\\"durationchange\\\"),this.off(\\\"timeupdate\\\",e))};return this.on(\\\"timeupdate\\\",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!(\\\"webkitDisplayingFullscreen\\\"in this.el_))return;const e=function(){this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){\\\"webkitPresentationMode\\\"in this.el_&&\\\"picture-in-picture\\\"!==this.el_.webkitPresentationMode&&(this.one(\\\"webkitendfullscreen\\\",e),this.trigger(\\\"fullscreenchange\\\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\\\"webkitbeginfullscreen\\\",t),this.on(\\\"dispose\\\",()=>{this.off(\\\"webkitbeginfullscreen\\\",t),this.off(\\\"webkitendfullscreen\\\",e)})}supportsFullScreen(){return\\\"function\\\"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Il(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\\\"fullscreenerror\\\",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\\\"fullscreenerror\\\",new Error(\\\"The video is not fullscreen\\\"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return da.error(\\\"Invalid source URL.\\\"),!1;const i={src:e};t&&(i.type=t);const s=Qa(\\\"source\\\",{},i);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return da.error(\\\"Source URL is required to remove the source element.\\\"),!1;const t=this.el_.querySelectorAll(\\\"source\\\");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return da.warn(`No matching source element found with src: ${e}`),!1}reset(){eu.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Re.createElement(\\\"track\\\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$(\\\"track\\\");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(\\\"function\\\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Le.performance&&(e.creationTime=Le.performance.now()),e}}_a(eu,\\\"TEST_VID\\\",function(){if(!Ga())return;const e=Re.createElement(\\\"video\\\"),t=Re.createElement(\\\"track\\\");return t.kind=\\\"captions\\\",t.srclang=\\\"en\\\",t.label=\\\"English\\\",e.appendChild(t),e}),eu.isSupported=function(){try{eu.TEST_VID.volume=.5}catch(e){return!1}return!(!eu.TEST_VID||!eu.TEST_VID.canPlayType)},eu.canPlayType=function(e){return eu.TEST_VID.canPlayType(e)},eu.canPlaySource=function(e,t){return eu.canPlayType(e.type)},eu.canControlVolume=function(){try{const e=eu.TEST_VID.volume;eu.TEST_VID.volume=e/2+.1;const t=e!==eu.TEST_VID.volume;return t&&za?(Le.setTimeout(()=>{eu&&eu.prototype&&(eu.prototype.featuresVolumeControl=e!==eu.TEST_VID.volume)}),!1):t}catch(e){return!1}},eu.canMuteVolume=function(){try{const e=eu.TEST_VID.muted;return eu.TEST_VID.muted=!e,eu.TEST_VID.muted?oo(eu.TEST_VID,\\\"muted\\\",\\\"muted\\\"):lo(eu.TEST_VID,\\\"muted\\\"),e!==eu.TEST_VID.muted}catch(e){return!1}},eu.canControlPlaybackRate=function(){if(xa&&Ia&&Da<58)return!1;try{const e=eu.TEST_VID.playbackRate;return eu.TEST_VID.playbackRate=e/2+.1,e!==eu.TEST_VID.playbackRate}catch(e){return!1}},eu.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"src\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"video\\\"),\\\"innerHTML\\\",{get:e,set:e}),Object.defineProperty(Re.createElement(\\\"audio\\\"),\\\"innerHTML\\\",{get:e,set:e})}catch(e){return!1}return!0},eu.supportsNativeTextTracks=function(){return Ha||za&&Ia},eu.supportsNativeVideoTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.videoTracks)},eu.supportsNativeAudioTracks=function(){return!(!eu.TEST_VID||!eu.TEST_VID.audioTracks)},eu.Events=[\\\"loadstart\\\",\\\"suspend\\\",\\\"abort\\\",\\\"error\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"canplay\\\",\\\"canplaythrough\\\",\\\"playing\\\",\\\"waiting\\\",\\\"seeking\\\",\\\"seeked\\\",\\\"ended\\\",\\\"durationchange\\\",\\\"timeupdate\\\",\\\"progress\\\",\\\"play\\\",\\\"pause\\\",\\\"ratechange\\\",\\\"resize\\\",\\\"volumechange\\\"],[[\\\"featuresMuteControl\\\",\\\"canMuteVolume\\\"],[\\\"featuresPlaybackRate\\\",\\\"canControlPlaybackRate\\\"],[\\\"featuresSourceset\\\",\\\"canOverrideAttributes\\\"],[\\\"featuresNativeTextTracks\\\",\\\"supportsNativeTextTracks\\\"],[\\\"featuresNativeVideoTracks\\\",\\\"supportsNativeVideoTracks\\\"],[\\\"featuresNativeAudioTracks\\\",\\\"supportsNativeAudioTracks\\\"]].forEach(function([e,t]){_a(eu.prototype,e,()=>eu[t](),!0)}),eu.prototype.featuresVolumeControl=eu.canControlVolume(),eu.prototype.movingMediaElementInDOM=!za,eu.prototype.featuresFullscreenResize=!0,eu.prototype.featuresProgressEvents=!0,eu.prototype.featuresTimeupdateEvents=!0,eu.prototype.featuresVideoFrameCallback=!(!eu.TEST_VID||!eu.TEST_VID.requestVideoFrameCallback),eu.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eu.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll(\\\"source\\\");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute(\\\"src\\\"),\\\"function\\\"==typeof e.load&&function(){try{e.load()}catch(e){}}()},[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"controls\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\\\"muted\\\",\\\"defaultMuted\\\",\\\"autoplay\\\",\\\"loop\\\",\\\"playsinline\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),[\\\"paused\\\",\\\"currentTime\\\",\\\"buffered\\\",\\\"volume\\\",\\\"poster\\\",\\\"preload\\\",\\\"error\\\",\\\"seeking\\\",\\\"seekable\\\",\\\"ended\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"played\\\",\\\"networkState\\\",\\\"readyState\\\",\\\"videoWidth\\\",\\\"videoHeight\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]}}),[\\\"volume\\\",\\\"src\\\",\\\"poster\\\",\\\"preload\\\",\\\"playbackRate\\\",\\\"defaultPlaybackRate\\\",\\\"disablePictureInPicture\\\",\\\"crossOrigin\\\"].forEach(function(e){eu.prototype[\\\"set\\\"+pl(e)]=function(t){this.el_[e]=t}}),[\\\"pause\\\",\\\"load\\\",\\\"play\\\"].forEach(function(e){eu.prototype[e]=function(){return this.el_[e]()}}),lc.withSourceHandlers(eu),eu.nativeSourceHandler={},eu.nativeSourceHandler.canPlayType=function(e){try{return eu.TEST_VID.canPlayType(e)}catch(e){return\\\"\\\"}},eu.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eu.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kl(e.src);return eu.nativeSourceHandler.canPlayType(`video/${t}`)}return\\\"\\\"},eu.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},eu.nativeSourceHandler.dispose=function(){},eu.registerSourceHandler(eu.nativeSourceHandler),lc.registerTech(\\\"Html5\\\",eu);const tu=[\\\"progress\\\",\\\"abort\\\",\\\"suspend\\\",\\\"emptied\\\",\\\"stalled\\\",\\\"loadedmetadata\\\",\\\"loadeddata\\\",\\\"timeupdate\\\",\\\"resize\\\",\\\"volumechange\\\",\\\"texttrackchange\\\"],iu={canplay:\\\"CanPlay\\\",canplaythrough:\\\"CanPlayThrough\\\",playing:\\\"Playing\\\",seeked:\\\"Seeked\\\"},su=[\\\"tiny\\\",\\\"xsmall\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"xlarge\\\",\\\"huge\\\"],nu={};su.forEach(e=>{const t=\\\"x\\\"===e.charAt(0)?`x-${e.substring(1)}`:e;nu[e]=`vjs-layout-${t}`});const ru={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class au extends fl{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Mo()}`,(t=Object.assign(au.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest(\\\"[lang]\\\");i&&(t.language=i.getAttribute(\\\"lang\\\"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=ua(this.id_),this.fsApi_=ra,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error(\\\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\\\");if(this.tag=e,this.tagAttributes=e&&ro(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach(function(i){e[i.toLowerCase()]=t.languages[i]}),this.languages_=e}else this.languages_=au.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||\\\"\\\",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\\\"controls\\\"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute(\\\"autoplay\\\")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if(\\\"function\\\"!=typeof this[e])throw new Error(`plugin \\\"${e}\\\" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),cl(this,{eventBusKey:\\\"el_\\\"}),this.fsApi_.requestFullscreen&&(qo(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_);const s=va(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new Le.DOMParser).parseFromString('<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\\\n  <defs>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\\\n    </symbol>\\\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\\\n    </symbol>\\\\n  </defs>\\\\n</svg>',\\\"image/svg+xml\\\");if(e.querySelector(\\\"parsererror\\\"))da.warn(\\\"Failed to load SVG Icons. Falling back to Font Icons.\\\"),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display=\\\"none\\\",this.el_.appendChild(t),this.addClass(\\\"vjs-svg-icons-enabled\\\")}}this.initChildren(),this.isAudio(\\\"audio\\\"===e.nodeName.toLowerCase()),this.controls()?this.addClass(\\\"vjs-controls-enabled\\\"):this.addClass(\\\"vjs-controls-disabled\\\"),this.el_.setAttribute(\\\"role\\\",\\\"region\\\"),this.isAudio()?this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Audio Player\\\")):this.el_.setAttribute(\\\"aria-label\\\",this.localize(\\\"Video Player\\\")),this.isAudio()&&this.addClass(\\\"vjs-audio\\\"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xc(this),this.addClass(\\\"vjs-spatial-navigation-enabled\\\")),qa&&this.addClass(\\\"vjs-touch-enabled\\\"),za||this.addClass(\\\"vjs-workinghover\\\"),au.players[this.id_]=this;const n=ta.split(\\\".\\\")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one(\\\"play\\\",e=>this.listenForUserActivity_(e)),this.on(\\\"keydown\\\",e=>this.handleKeyDown(e)),this.on(\\\"languagechange\\\",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on(\\\"ready\\\",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger(\\\"dispose\\\"),this.off(\\\"dispose\\\"),$o(Re,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),au.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\\\"\\\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,dc.hasOwnProperty(e.id())&&delete dc[e.id()],oc.names.forEach(e=>{const t=this[oc[e].getterName]();t&&t.off&&t.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute(\\\"data-vjs-player\\\");const s=\\\"video-js\\\"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl(\\\"div\\\"));const n=ro(t);if(s){for(e=this.el_=t,t=this.tag=Re.createElement(\\\"video\\\");e.children.length;)t.appendChild(e.firstChild);eo(e,\\\"video-js\\\")||to(e,\\\"video-js\\\"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(e){}})}t.setAttribute(\\\"tabindex\\\",\\\"-1\\\"),n.tabindex=\\\"-1\\\",Ia&&Na&&(t.setAttribute(\\\"role\\\",\\\"application\\\"),n.role=\\\"application\\\"),t.removeAttribute(\\\"width\\\"),t.removeAttribute(\\\"height\\\"),\\\"width\\\"in n&&delete n.width,\\\"height\\\"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(i){s&&\\\"class\\\"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])}),t.playerId=t.id,t.id+=\\\"_html5_api\\\",t.className=\\\"vjs-tech\\\",t.player=e.player=this,this.addClass(\\\"vjs-paused\\\");const r=[\\\"IS_SMART_TV\\\",\\\"IS_TIZEN\\\",\\\"IS_WEBOS\\\",\\\"IS_ANDROID\\\",\\\"IS_IPAD\\\",\\\"IS_IPHONE\\\",\\\"IS_CHROMECAST_RECEIVER\\\"].filter(e=>Va[e]).map(e=>\\\"vjs-device-\\\"+e.substring(3).toLowerCase().replace(/\\\\_/g,\\\"-\\\"));if(this.addClass(...r),!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Do(\\\"vjs-styles-dimensions\\\");const e=To(\\\".vjs-styles-defaults\\\"),t=To(\\\"head\\\");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName(\\\"a\\\");for(let e=0;e<a.length;e++){const t=a.item(e);to(t,\\\"vjs-hidden\\\"),t.setAttribute(\\\"hidden\\\",\\\"hidden\\\")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Za(t,e),this.children_.unshift(t),this.el_.setAttribute(\\\"lang\\\",this.language_),this.el_.setAttribute(\\\"translate\\\",\\\"no\\\"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_(\\\"crossOrigin\\\");null===e||\\\"anonymous\\\"===e||\\\"use-credentials\\\"===e?(this.techCall_(\\\"setCrossOrigin\\\",e),this.posterImage&&this.posterImage.crossOrigin(e)):da.warn(`crossOrigin must be null,  \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"${e}\\\"`)}width(e){return this.dimension(\\\"width\\\",e)}height(e){return this.dimension(\\\"height\\\",e)}dimension(e,t){const i=e+\\\"_\\\";if(void 0===t)return this[i]||0;if(\\\"\\\"===t||\\\"auto\\\"===t)return this[i]=void 0,void this.updateStyleEl_();const s=parseFloat(t);isNaN(s)?da.error(`Improper value \\\"${t}\\\" supplied for for ${e}`):(this[i]=s,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,tl(this)&&this.off([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_),e?(this.addClass(\\\"vjs-fluid\\\"),this.fill(!1),i=()=>{this.on([\\\"playerreset\\\",\\\"resize\\\"],this.boundUpdateStyleEl_)},tl(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass(\\\"vjs-fluid\\\"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\\\"vjs-fill\\\"),this.fluid(!1)):this.removeClass(\\\"vjs-fill\\\")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\\\\d+\\\\:\\\\d+$/.test(e))throw new Error(\\\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\\\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Le.VIDEOJS_NO_DYNAMIC_STYLE){const e=\\\"number\\\"==typeof this.width_?this.width_:this.options_.width,t=\\\"number\\\"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&\\\"auto\\\"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+\\\":\\\"+this.videoHeight():\\\"16:9\\\";const n=i.split(\\\":\\\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?\\\"dimensions-\\\"+this.id():this.id()+\\\"-dimensions\\\",this.addClass(s),Po(this.styleEl_,`\\\\n      .${s} {\\\\n        width: ${e}px;\\\\n        height: ${t}px;\\\\n      }\\\\n\\\\n      .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: ${100*r}%;\\\\n      }\\\\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=pl(e),s=e.charAt(0).toLowerCase()+e.slice(1);\\\"Html5\\\"!==i&&this.tag&&(lc.getTech(\\\"Html5\\\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(\\\"string\\\"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\\\"vtt.js\\\":this.options_[\\\"vtt.js\\\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};oc.names.forEach(e=>{const t=oc[e];r[t.getterName]=this[t.privateName]}),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=lc.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(Xo(this,this.handleTechReady_),!0),Pl(this.textTracksJson_||[],this.tech_),tu.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${pl(e)}_`](t))}),Object.keys(iu).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${iu[e]}_`].bind(this),event:t}):this[`handleTech${iu[e]}_`](t)})}),this.on(this.tech_,\\\"loadstart\\\",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,\\\"sourceset\\\",e=>this.handleTechSourceset_(e)),this.on(this.tech_,\\\"waiting\\\",e=>this.handleTechWaiting_(e)),this.on(this.tech_,\\\"ended\\\",e=>this.handleTechEnded_(e)),this.on(this.tech_,\\\"seeking\\\",e=>this.handleTechSeeking_(e)),this.on(this.tech_,\\\"play\\\",e=>this.handleTechPlay_(e)),this.on(this.tech_,\\\"pause\\\",e=>this.handleTechPause_(e)),this.on(this.tech_,\\\"durationchange\\\",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,\\\"fullscreenchange\\\",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,\\\"fullscreenerror\\\",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,\\\"enterpictureinpicture\\\",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,\\\"leavepictureinpicture\\\",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,\\\"error\\\",e=>this.handleTechError_(e)),this.on(this.tech_,\\\"posterchange\\\",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,\\\"textdata\\\",e=>this.handleTechTextData_(e)),this.on(this.tech_,\\\"ratechange\\\",e=>this.handleTechRateChange_(e)),this.on(this.tech_,\\\"loadedmetadata\\\",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_(\\\"controls\\\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\\\"Html5\\\"===i&&this.tag||Za(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){oc.names.forEach(e=>{const t=oc[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Dl(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\\\"\\\",this.trigger(\\\"posterchange\\\")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&da.warn(\\\"Using the tech directly can be dangerous. I hope you know what you're doing.\\\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\\\n\\\"),this.tech_}version(){return{\\\"video.js\\\":ta}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.on(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_),this.on(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.on(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.on(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.on(this.tech_,\\\"tap\\\",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,\\\"tap\\\",this.boundHandleTechTap_),this.off(this.tech_,\\\"touchstart\\\",this.boundHandleTechTouchStart_),this.off(this.tech_,\\\"touchmove\\\",this.boundHandleTechTouchMove_),this.off(this.tech_,\\\"touchend\\\",this.boundHandleTechTouchEnd_),this.off(this.tech_,\\\"click\\\",this.boundHandleTechClick_),this.off(this.tech_,\\\"dblclick\\\",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_(\\\"setVolume\\\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-seeking\\\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\\\"loadstart\\\")):this.trigger(\\\"loadstart\\\"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?\\\"play\\\":this.autoplay())}manualAutoplay_(e){if(!this.tech_||\\\"string\\\"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Al(i))return i.catch(e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||\\\"\\\"}`)})};let i;return\\\"any\\\"!==e||this.muted()?i=\\\"muted\\\"!==e||this.muted()?this.play():t():(i=this.play(),Al(i)&&(i=i.catch(t))),Al(i)?i.then(()=>{this.trigger({type:\\\"autoplay-success\\\",autoplay:e})}).catch(()=>{this.trigger({type:\\\"autoplay-failure\\\",autoplay:e})}):void 0}updateSourceCaches_(e=\\\"\\\"){let t=e,i=\\\"\\\";\\\"string\\\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return\\\"\\\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const s=e.$$(\\\"source\\\");for(let e=0;e<s.length;e++){const i=s[e];if(i.type&&i.src&&i.src===t)return i.type}return _c(t)})(this,t)),this.cache_.source=va({},e,{src:t,type:i});const s=this.cache_.sources.filter(e=>e.src&&e.src===t),n=[],r=this.$$(\\\"source\\\"),a=[];for(let e=0;e<r.length;e++){const i=ro(r[e]);n.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!s.length?this.cache_.sources=n:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any([\\\"sourceset\\\",\\\"loadstart\\\"],e=>{if(\\\"sourceset\\\"===e.type)return;const t=this.techGet_(\\\"currentSrc\\\");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\\\"sourceset\\\"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass(\\\"vjs-has-started\\\"):this.removeClass(\\\"vjs-has-started\\\"))}handleTechPlay_(){this.removeClass(\\\"vjs-ended\\\",\\\"vjs-paused\\\"),this.addClass(\\\"vjs-playing\\\"),this.hasStarted(!0),this.trigger(\\\"play\\\")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\\\"ratechange\\\")}handleTechWaiting_(){this.addClass(\\\"vjs-waiting\\\"),this.trigger(\\\"waiting\\\");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass(\\\"vjs-waiting\\\"),this.off(\\\"timeupdate\\\",t))};this.on(\\\"timeupdate\\\",t)}handleTechCanPlay_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplay\\\")}handleTechCanPlayThrough_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"canplaythrough\\\")}handleTechPlaying_(){this.removeClass(\\\"vjs-waiting\\\"),this.trigger(\\\"playing\\\")}handleTechSeeking_(){this.addClass(\\\"vjs-seeking\\\"),this.trigger(\\\"seeking\\\")}handleTechSeeked_(){this.removeClass(\\\"vjs-seeking\\\",\\\"vjs-ended\\\"),this.trigger(\\\"seeked\\\")}handleTechPause_(){this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.trigger(\\\"pause\\\")}handleTechEnded_(){this.addClass(\\\"vjs-ended\\\"),this.removeClass(\\\"vjs-waiting\\\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\\\"ended\\\")}handleTechDurationChange_(){this.duration(this.techGet_(\\\"duration\\\"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Il(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(\\\".vjs-control-bar, .vjs-modal-dialog\\\"),t=>t.contains(e.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\\\"function\\\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Re.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass(\\\"vjs-fullscreen\\\"):this.removeClass(\\\"vjs-fullscreen\\\")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Re[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(\\\":\\\"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass(\\\"vjs-ios-native-fs\\\"),this.tech_.one(\\\"webkitendfullscreen\\\",()=>{this.removeClass(\\\"vjs-ios-native-fs\\\")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger(\\\"fullscreenerror\\\",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass(\\\"vjs-picture-in-picture\\\"):this.removeClass(\\\"vjs-picture-in-picture\\\")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger(\\\"textdata\\\",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\\\"\\\",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gc)return function(e,t,i,s){return t[i](e.reduce(yc(i),s))}(this.middleware_,this.tech_,e,t);if(e in fc)return pc(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw da(e),e}},!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in mc)return function(e,t,i){return e.reduceRight(yc(i),t[i]())}(this.middleware_,this.tech_,e);if(e in fc)return pc(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw da(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if(\\\"TypeError\\\"===t.name)throw da(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw da(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Il){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ha||za);if(this.waitToPlay_&&(this.off([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one([\\\"ready\\\",\\\"loadstart\\\"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_(\\\"play\\\");i&&this.hasClass(\\\"vjs-ended\\\")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})}pause(){this.techCall_(\\\"pause\\\")}paused(){return!1!==this.techGet_(\\\"paused\\\")}played(){return this.techGet_(\\\"played\\\")||bl(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\\\"setScrubbing\\\",this.scrubbing_),e?this.addClass(\\\"vjs-scrubbing\\\"):this.removeClass(\\\"vjs-scrubbing\\\")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_(\\\"currentTime\\\")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\\\"setCurrentTime\\\",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off(\\\"canplay\\\",this.boundApplyInitTime_),void this.one(\\\"canplay\\\",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass(\\\"vjs-live\\\"):this.removeClass(\\\"vjs-live\\\"),isNaN(e)||this.trigger(\\\"durationchange\\\"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_(\\\"buffered\\\");return e&&e.length||(e=bl(0,0)),e}seekable(){let e=this.techGet_(\\\"seekable\\\");return e&&e.length||(e=bl(0,0)),e}seeking(){return this.techGet_(\\\"seeking\\\")}ended(){return this.techGet_(\\\"ended\\\")}networkState(){return this.techGet_(\\\"networkState\\\")}readyState(){return this.techGet_(\\\"readyState\\\")}bufferedPercent(){return El(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_(\\\"setVolume\\\",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\\\"volume\\\")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_(\\\"muted\\\")||!1;this.techCall_(\\\"setMuted\\\",e)}defaultMuted(e){return void 0!==e&&this.techCall_(\\\"setDefaultMuted\\\",e),this.techGet_(\\\"defaultMuted\\\")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_(\\\"supportsFullScreen\\\")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\\\"fullscreenchange\\\"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,s)=>{function n(){t.off(\\\"fullscreenerror\\\",a),t.off(\\\"fullscreenchange\\\",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one(\\\"fullscreenchange\\\",r),t.one(\\\"fullscreenerror\\\",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"enterFullScreen\\\"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function s(){e.off(\\\"fullscreenerror\\\",r),e.off(\\\"fullscreenchange\\\",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one(\\\"fullscreenchange\\\",n),e.one(\\\"fullscreenerror\\\",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Re[this.fsApi_.exitFullscreen]();return e&&Il(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_(\\\"exitFullScreen\\\"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Re.documentElement.style.overflow,qo(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=\\\"hidden\\\",to(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"enterFullWindow\\\")}fullWindowOnEscKey(e){\\\"Escape\\\"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$o(Re,\\\"keydown\\\",this.boundFullWindowOnEscKey_),Re.documentElement.style.overflow=this.docOrigOverflow,io(Re.body,\\\"vjs-full-window\\\"),this.trigger(\\\"exitFullWindow\\\")}disablePictureInPicture(e){if(void 0===e)return this.techGet_(\\\"disablePictureInPicture\\\");this.techCall_(\\\"setDisablePictureInPicture\\\",e),this.options_.disablePictureInPicture=e,this.trigger(\\\"disablepictureinpicturechanged\\\")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Le.documentPictureInPicture){const e=Re.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add(\\\"vjs-pip-container\\\"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qa(\\\"p\\\",{className:\\\"vjs-pip-text\\\"},{},this.localize(\\\"Playing in picture-in-picture\\\"))),Le.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(ko(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add(\\\"vjs-pip-window\\\"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:\\\"enterpictureinpicture\\\",pipWindow:t}),t.addEventListener(\\\"pagehide\\\",t=>{const i=t.target.querySelector(\\\".video-js\\\");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger(\\\"leavepictureinpicture\\\")}),t))}return\\\"pictureInPictureEnabled\\\"in Re&&!1===this.disablePictureInPicture()?this.techGet_(\\\"requestPictureInPicture\\\"):Promise.reject(\\\"No PiP mode is available\\\")}exitPictureInPicture(){return Le.documentPictureInPicture&&Le.documentPictureInPicture.window?(Le.documentPictureInPicture.window.close(),Promise.resolve()):\\\"pictureInPictureEnabled\\\"in Re?Re.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\\\"input\\\"===t)return-1===[\\\"button\\\",\\\"checkbox\\\",\\\"hidden\\\",\\\"radio\\\",\\\"reset\\\",\\\"submit\\\"].indexOf(e.type);return-1!==[\\\"textarea\\\"].indexOf(t)})(this.el_.ownerDocument.activeElement)||(\\\"function\\\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>\\\"f\\\"===e.key.toLowerCase(),muteKey:s=t=>\\\"m\\\"===e.key.toLowerCase(),playPauseKey:n=t=>\\\"k\\\"===e.key.toLowerCase()||\\\" \\\"===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=fl.getComponent(\\\"FullscreenToggle\\\");!1!==Re[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"MuteToggle\\\").prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();fl.getComponent(\\\"PlayToggle\\\").prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i<s.length;i++){const n=s[i];let r=lc.getTech(n);if(r||(r=fl.getComponent(n)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else da.error(`The \\\"${n}\\\" tech is undefined. Skipped browser support check for that tech.`)}return\\\"\\\"}selectSource(e){const t=this.options_.techOrder.map(e=>[e,lc.getTech(e)]).filter(([e,t])=>t?t.isSupported():(da.error(`The \\\"${e}\\\" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let s;return e.some(e=>t.some(t=>{if(s=i(e,t),s)return!0})),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||\\\"\\\";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Tc(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hc(this,i[0],(e,s)=>{this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach(e=>e.setTech&&e.setTech(r))}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off(\\\"error\\\",e)};this.one(\\\"error\\\",e),this.one(\\\"playing\\\",t),this.resetRetryOnError_=()=>{this.off(\\\"error\\\",e),this.off(\\\"playing\\\",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(ml(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\\\"setSource\\\")?this.techCall_(\\\"setSource\\\",e):this.techCall_(\\\"src\\\",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_(\\\"load\\\")}reset(){if(this.paused())this.doReset_();else{Il(this.play().then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks(\\\"text\\\"),this.removeClass(\\\"vjs-playing\\\"),this.addClass(\\\"vjs-paused\\\"),this.resetCache_(),this.poster(\\\"\\\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\\\"reset\\\"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),tl(this)&&this.trigger(\\\"playerreset\\\")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger(\\\"volumechange\\\")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||\\\"\\\"}currentType(){return this.currentSource()&&this.currentSource().type||\\\"\\\"}preload(e){return void 0!==e?(this.techCall_(\\\"setPreload\\\",e),void(this.options_.preload=e)):this.techGet_(\\\"preload\\\")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;\\\"string\\\"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(\\\"string\\\"==typeof e?e:\\\"play\\\"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_(\\\"setAutoplay\\\",t)}playsinline(e){return void 0!==e&&(this.techCall_(\\\"setPlaysinline\\\",e),this.options_.playsinline=e),this.techGet_(\\\"playsinline\\\")}loop(e){return void 0!==e?(this.techCall_(\\\"setLoop\\\",e),void(this.options_.loop=e)):this.techGet_(\\\"loop\\\")}poster(e){if(void 0===e)return this.poster_;e||(e=\\\"\\\"),e!==this.poster_&&(this.poster_=e,this.techCall_(\\\"setPoster\\\",e),this.isPosterFromTech_=!1,this.trigger(\\\"posterchange\\\"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||\\\"\\\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\\\"posterchange\\\"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\\\"setControls\\\",e),this.controls_?(this.removeClass(\\\"vjs-controls-disabled\\\"),this.addClass(\\\"vjs-controls-enabled\\\"),this.trigger(\\\"controlsenabled\\\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\\\"vjs-controls-enabled\\\"),this.addClass(\\\"vjs-controls-disabled\\\"),this.trigger(\\\"controlsdisabled\\\"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingnativecontrols\\\")):(this.removeClass(\\\"vjs-using-native-controls\\\"),this.trigger(\\\"usingcustomcontrols\\\")))}error(e){if(void 0===e)return this.error_||null;if(sa(\\\"beforeerror\\\").forEach(t=>{const i=t(this,e);fa(i)&&!Array.isArray(i)||\\\"string\\\"==typeof i||\\\"number\\\"==typeof i||null===i?e=i:this.log.error(\\\"please return a value that MediaError expects in beforeerror hooks\\\")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\\\"click\\\",\\\"touchstart\\\"],t),void this.one(\\\"loadstart\\\",function(){this.off([\\\"click\\\",\\\"touchstart\\\"],t)})}if(null===e)return this.error_=null,this.removeClass(\\\"vjs-error\\\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cl(e),this.addClass(\\\"vjs-error\\\"),da.error(`(CODE:${this.error_.code} ${Cl.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger(\\\"error\\\"),sa(\\\"error\\\").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\\\"vjs-user-inactive\\\"),this.addClass(\\\"vjs-user-active\\\"),void this.trigger(\\\"useractive\\\");this.tech_&&this.tech_.one(\\\"mousemove\\\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\\\"vjs-user-active\\\"),this.addClass(\\\"vjs-user-inactive\\\"),this.trigger(\\\"userinactive\\\")}}listenForUserActivity_(){let e,t,i;const s=Xo(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on(\\\"mousedown\\\",function(){s(),this.clearInterval(e),e=this.setInterval(s,250)}),this.on(\\\"mousemove\\\",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())}),this.on(\\\"mouseup\\\",n),this.on(\\\"mouseleave\\\",n);const r=this.getChild(\\\"controlBar\\\");let a;!r||za||xa||(r.on(\\\"mouseenter\\\",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),r.on(\\\"mouseleave\\\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\\\"keydown\\\",s),this.on(\\\"keyup\\\",s);this.setInterval(function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\\\"playbackRate\\\"):1;this.techCall_(\\\"setPlaybackRate\\\",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_(\\\"setDefaultPlaybackRate\\\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\\\"defaultPlaybackRate\\\"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild(\\\"ControlBar\\\");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass(\\\"vjs-audio-only-mode\\\");const e=this.children(),t=this.getChild(\\\"ControlBar\\\"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass(\\\"vjs-hidden\\\")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger(\\\"audioonlymodechange\\\")}disableAudioOnlyUI_(){this.removeClass(\\\"vjs-audio-only-mode\\\"),this.off(\\\"playerresize\\\",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger(\\\"audioonlymodechange\\\")}audioOnlyMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass(\\\"vjs-audio-poster-mode\\\"),this.trigger(\\\"audiopostermodechange\\\")}audioPosterMode(e){if(\\\"boolean\\\"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_(\\\"getVideoPlaybackQuality\\\")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),tl(this)&&this.trigger(\\\"languagechange\\\"))}languages(){return va(au.prototype.options_.languages,this.languages_)}toJSON(){const e=va(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let s=t[i];s=va(s),s.player=void 0,e.tracks[i]=s}return e}createModal(e,t){(t=t||{}).content=e||\\\"\\\";const i=new Nl(this,t);return this.addChild(i),i.on(\\\"dispose\\\",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<su.length;i++){const s=su[i];if(t<=this.breakpoints_[s]){if(e===s)return;e&&this.removeClass(nu[e]),this.addClass(nu[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_=\\\"\\\",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_=\\\"\\\",this.breakpoints_=Object.assign({},ru,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\\\"playerresize\\\",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return nu[this.breakpoint_]||\\\"\\\"}loadMedia(e,t){if(!e||\\\"object\\\"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=va(e);const{artist:s,artwork:n,description:r,poster:a,src:o,textTracks:l,title:c}=this.cache_.media;!n&&a&&(this.cache_.media.artwork=[{src:a,type:_c(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:c,description:r||s||\\\"\\\"}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_c(t.poster)}]),t}return va(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=ro(e),s=i[\\\"data-setup\\\"];if(eo(e,\\\"vjs-fill\\\")&&(i.fill=!0),eo(e,\\\"vjs-fluid\\\")&&(i.fluid=!0),null!==s)try{Object.assign(i,JSON.parse(s||\\\"{}\\\"))}catch(e){da.error(\\\"data-setup\\\",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e<s;e++){const s=i[e],n=s.nodeName.toLowerCase();\\\"source\\\"===n?t.sources.push(ro(s)):\\\"track\\\"===n&&t.tracks.push(ro(s))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\\\"debugon\\\"),this.previousLogLevel_=this.log.level,this.log.level(\\\"debug\\\"),this.debugEnabled_=!0):(this.trigger(\\\"debugoff\\\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>\\\"number\\\"==typeof e)&&(this.cache_.playbackRates=e,this.trigger(\\\"playbackrateschange\\\"))}}au.prototype.videoTracks=()=>{},au.prototype.audioTracks=()=>{},au.prototype.textTracks=()=>{},au.prototype.remoteTextTracks=()=>{},au.prototype.remoteTextTrackEls=()=>{},oc.names.forEach(function(e){const t=oc[e];au.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),au.prototype.crossorigin=au.prototype.crossOrigin,au.players={};const ou=Le.navigator;au.prototype.options_={techOrder:lc.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\\\"mediaLoader\\\",\\\"posterImage\\\",\\\"titleBar\\\",\\\"textTrackDisplay\\\",\\\"loadingSpinner\\\",\\\"bigPlayButton\\\",\\\"liveTracker\\\",\\\"controlBar\\\",\\\"errorDisplay\\\",\\\"textTrackSettings\\\",\\\"resizeManager\\\"],language:ou&&(ou.languages&&ou.languages[0]||ou.userLanguage||ou.language)||\\\"en\\\",languages:{},notSupportedMessage:\\\"No compatible source was found for this media.\\\",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:\\\"hide\\\"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},tu.forEach(function(e){au.prototype[`handleTech${pl(e)}_`]=function(){return this.trigger(e)}}),fl.registerComponent(\\\"Player\\\",au);const lu=\\\"plugin\\\",cu=\\\"activePlugins_\\\",du={},uu=e=>du.hasOwnProperty(e),hu=e=>uu(e)?du[e]:void 0,pu=(e,t)=>{e[cu]=e[cu]||{},e[cu][t]=!0},mu=(e,t,i)=>{const s=(i?\\\"before\\\":\\\"\\\")+\\\"pluginsetup\\\";e.trigger(s,t),e.trigger(s+\\\":\\\"+t.name,t)},gu=(e,t)=>(t.prototype.name=e,function(...i){mu(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,mu(this,s.getEventHash()),s});class fu{constructor(e){if(this.constructor===fu)throw new Error(\\\"Plugin must be sub-classed; not directly instantiated.\\\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),cl(this),delete this.trigger,ul(this,this.constructor.defaultState),pu(e,this.name),this.dispose=this.dispose.bind(this),e.on(\\\"dispose\\\",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return zo(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger(\\\"dispose\\\"),this.off(),t.off(\\\"dispose\\\",this.dispose),t[cu][e]=!1,this.player=this.state=null,t[e]=gu(e,du[e])}static isBasic(e){const t=\\\"string\\\"==typeof e?hu(e):e;return\\\"function\\\"==typeof t&&!fu.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(\\\"string\\\"!=typeof e)throw new Error(`Illegal plugin name, \\\"${e}\\\", must be a string, was ${typeof e}.`);if(uu(e))da.warn(`A plugin named \\\"${e}\\\" already exists. You may want to avoid re-registering plugins!`);else if(au.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, \\\"${e}\\\", cannot share a name with an existing player method!`);if(\\\"function\\\"!=typeof t)throw new Error(`Illegal plugin for \\\"${e}\\\", must be a function, was ${typeof t}.`);return du[e]=t,e!==lu&&(fu.isBasic(t)?au.prototype[e]=function(e,t){const i=function(){mu(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return pu(this,e),mu(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(e){i[e]=t[e]}),i}(e,t):au.prototype[e]=gu(e,t)),t}static deregisterPlugin(e){if(e===lu)throw new Error(\\\"Cannot de-register base plugin.\\\");uu(e)&&(delete du[e],delete au.prototype[e])}static getPlugins(e=Object.keys(du)){let t;return e.forEach(e=>{const i=hu(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=hu(e);return t&&t.VERSION||\\\"\\\"}}function yu(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||da.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}fu.getPlugin=hu,fu.BASE_PLUGIN_NAME=lu,fu.registerPlugin(lu,fu),au.prototype.usingPlugin=function(e){return!!this[cu]&&!0===this[cu][e]},au.prototype.hasPlugin=function(e){return!!uu(e)};const vu=e=>0===e.indexOf(\\\"#\\\")?e.slice(1):e;function bu(e,t,i){let s=bu.getPlayer(e);if(s)return t&&da.warn(`Player \\\"${e}\\\" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n=\\\"string\\\"==typeof e?To(\\\"#\\\"+vu(e)):e;if(!Xa(n))throw new TypeError(\\\"The element or ID supplied is not valid. (videojs)\\\");const r=\\\"getRootNode\\\"in n&&n.getRootNode()instanceof Le.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||da.warn(\\\"The element supplied is not included in the DOM\\\"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute(\\\"data-vjs-player\\\")?n.parentNode:n).cloneNode(!0)),sa(\\\"beforesetup\\\").forEach(e=>{const i=e(n,va(t));fa(i)&&!Array.isArray(i)?t=va(t,i):da.error(\\\"please return an object in beforesetup hooks\\\")});const a=fl.getComponent(\\\"Player\\\");return s=new a(n,t,i),sa(\\\"setup\\\").forEach(e=>e(s)),s}if(bu.hooks_=ia,bu.hooks=sa,bu.hook=function(e,t){sa(e,t)},bu.hookOnce=function(e,t){sa(e,[].concat(t).map(t=>{const i=(...s)=>(na(e,i),t(...s));return i}))},bu.removeHook=na,!0!==Le.VIDEOJS_NO_DYNAMIC_STYLE&&Ga()){let mb=To(\\\".vjs-styles-defaults\\\");if(!mb){mb=Do(\\\"vjs-styles-defaults\\\");const gb=To(\\\"head\\\");gb&&gb.insertBefore(mb,gb.firstChild),Po(mb,\\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\")}}Io(1,bu),bu.VERSION=ta,bu.options=au.prototype.options_,bu.getPlayers=()=>au.players,bu.getPlayer=e=>{const t=au.players;let i;if(\\\"string\\\"==typeof e){const s=vu(e),n=t[s];if(n)return n;i=To(\\\"#\\\"+s)}else i=e;if(Xa(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},bu.getAllPlayers=()=>Object.keys(au.players).map(e=>au.players[e]).filter(Boolean),bu.players=au.players,bu.getComponent=fl.getComponent,bu.registerComponent=(e,t)=>(lc.isTech(t)&&da.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),fl.registerComponent.call(fl,e,t)),bu.getTech=lc.getTech,bu.registerTech=lc.registerTech,bu.use=function(e,t){cc[e]=cc[e]||[],cc[e].push(t)},Object.defineProperty(bu,\\\"middleware\\\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bu.middleware,\\\"TERMINATOR\\\",{value:uc,writeable:!1,enumerable:!0}),bu.browser=Va,bu.obj=Ta,bu.mergeOptions=yu(9,\\\"videojs.mergeOptions\\\",\\\"videojs.obj.merge\\\",va),bu.defineLazyProperty=yu(9,\\\"videojs.defineLazyProperty\\\",\\\"videojs.obj.defineLazyProperty\\\",_a),bu.bind=yu(9,\\\"videojs.bind\\\",\\\"native Function.prototype.bind\\\",Xo),bu.registerPlugin=fu.registerPlugin,bu.deregisterPlugin=fu.deregisterPlugin,bu.plugin=(e,t)=>(da.warn(\\\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\\"),fu.registerPlugin(e,t)),bu.getPlugins=fu.getPlugins,bu.getPlugin=fu.getPlugin,bu.getPluginVersion=fu.getPluginVersion,bu.addLanguage=function(e,t){return e=(\\\"\\\"+e).toLowerCase(),bu.options.languages=va(bu.options.languages,{[e]:t}),bu.options.languages[e]},bu.log=da,bu.createLogger=ua,bu.time=xl,bu.createTimeRange=yu(9,\\\"videojs.createTimeRange\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.createTimeRanges=yu(9,\\\"videojs.createTimeRanges\\\",\\\"videojs.time.createTimeRanges\\\",bl),bu.formatTime=yu(9,\\\"videojs.formatTime\\\",\\\"videojs.time.formatTime\\\",kl),bu.setFormatTime=yu(9,\\\"videojs.setFormatTime\\\",\\\"videojs.time.setFormatTime\\\",Sl),bu.resetFormatTime=yu(9,\\\"videojs.resetFormatTime\\\",\\\"videojs.time.resetFormatTime\\\",wl),bu.parseUrl=yu(9,\\\"videojs.parseUrl\\\",\\\"videojs.url.parseUrl\\\",Xl),bu.isCrossOrigin=yu(9,\\\"videojs.isCrossOrigin\\\",\\\"videojs.url.isCrossOrigin\\\",Ql),bu.EventTarget=Zo,bu.any=Vo,bu.on=qo,bu.one=Ho,bu.off=$o,bu.trigger=zo,bu.xhr=at,bu.TrackList=Ml,bu.TextTrack=tc,bu.TextTrackList=ql,bu.AudioTrack=ic,bu.AudioTrackList=Ul,bu.VideoTrack=sc,bu.VideoTrackList=Fl,[\\\"isEl\\\",\\\"isTextNode\\\",\\\"createEl\\\",\\\"hasClass\\\",\\\"addClass\\\",\\\"removeClass\\\",\\\"toggleClass\\\",\\\"setAttributes\\\",\\\"getAttributes\\\",\\\"emptyEl\\\",\\\"appendContent\\\",\\\"insertContent\\\"].forEach(e=>{bu[e]=function(){return da.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),xo[e].apply(null,arguments)}}),bu.computedStyle=yu(9,\\\"videojs.computedStyle\\\",\\\"videojs.dom.computedStyle\\\",wo),bu.dom=xo,bu.fn=Qo,bu.num=zc,bu.str=gl,bu.url=Jl,bu.Error={NetworkBadStatus:\\\"networkbadstatus\\\",NetworkRequestFailed:\\\"networkrequestfailed\\\",NetworkRequestAborted:\\\"networkrequestaborted\\\",NetworkRequestTimeout:\\\"networkrequesttimeout\\\",NetworkBodyParserFailed:\\\"networkbodyparserfailed\\\",StreamingHlsPlaylistParserError:\\\"streaminghlsplaylistparsererror\\\",StreamingDashManifestParserError:\\\"streamingdashmanifestparsererror\\\",StreamingContentSteeringParserError:\\\"streamingcontentsteeringparsererror\\\",StreamingVttParserError:\\\"streamingvttparsererror\\\",StreamingFailedToSelectNextSegment:\\\"streamingfailedtoselectnextsegment\\\",StreamingFailedToDecryptSegment:\\\"streamingfailedtodecryptsegment\\\",StreamingFailedToTransmuxSegment:\\\"streamingfailedtotransmuxsegment\\\",StreamingFailedToAppendSegment:\\\"streamingfailedtoappendsegment\\\",StreamingCodecsChangeError:\\\"streamingcodecschangeerror\\\"};\\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\\nclass _u{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,\\\"enabled\\\",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class Tu extends bu.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,\\\"selectedIndex\\\",{get:()=>e.selectedIndex_}),Object.defineProperty(e,\\\"length\\\",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _u(e),\\\"\\\"+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:\\\"addqualitylevel\\\"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;i<s;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:\\\"removequalitylevel\\\"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tu.prototype.allowedEvents_={change:\\\"change\\\",addqualitylevel:\\\"addqualitylevel\\\",removequalitylevel:\\\"removequalitylevel\\\"};for(const fb in Tu.prototype.allowedEvents_)Tu.prototype[\\\"on\\\"+fb]=null;var Su=\\\"4.1.0\\\";const wu=function(e){return function(e){const t=e.qualityLevels,i=new Tu,s=function(){i.dispose(),e.qualityLevels=t,e.off(\\\"dispose\\\",s)};return e.on(\\\"dispose\\\",s),e.qualityLevels=()=>i,e.qualityLevels.VERSION=Su,i}(this,bu.obj.merge({},e))};bu.registerPlugin(\\\"qualityLevels\\\",wu),wu.VERSION=Su;\\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\\nconst ku=Gt,xu=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Eu=e=>bu.log.debug?bu.log.debug.bind(bu,\\\"VHS:\\\",`${e} >`):function(){};function Cu(...e){const t=bu.obj||bu;return(t.merge||t.mergeOptions).apply(t,e)}function Au(...e){const t=bu.time||bu;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Iu=1/30,ju=.1,Du=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Au(i)},Pu=function(e,t){return Du(e,function(e,i){return e-ju<=t&&i+ju>=t})},Lu=function(e,t){return Du(e,function(e){return e-Iu>=t})},Ou=e=>{const t=[];if(!e||!e.length)return\\\"\\\";for(let i=0;i<e.length;i++)t.push(e.start(i)+\\\" => \\\"+e.end(i));return t.join(\\\", \\\")},Nu=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Mu=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ru=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Uu=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){\\\"PART\\\"===t.type&&(i+=e.partTargetDuration)}),i},Bu=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Fu=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},qu=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+(\\\"PART\\\"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},$u=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Fu(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},zu=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=e.segments[s],void 0!==n.end)return{result:i+n.end,precise:!0};if(i+=Uu(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(s.precise)return s.result;const n=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],void 0!==i.start)return{result:i.start-s,precise:!0};if(s+=Uu(e,i),void 0!==i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:s.result+i},Hu=function(e,t,i){if(!e)return 0;if(\\\"number\\\"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Le.Infinity}return zu(e,t,i)},Vu=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let e=i;e<s;e++)n+=t[e].duration;return n},Wu=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return Hu(e);if(null===t)return null;t=t||0;let n=zu(e,e.mediaSequence+e.segments.length,t);return i&&(n-=s=\\\"number\\\"==typeof s?s:$u(null,e)),Math.max(0,n)},Gu=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Xu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Yu=function(e){const t=Gu(e);return!e.disabled&&!t},Ku=function(e,t){return t.attributes&&t.attributes[e]},Qu=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!Yu(e)&&(e.attributes.BANDWIDTH||0)<i).length},Ju=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),Zu=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},eh=e=>{if(!e||!e.playlists||!e.playlists.length){return Zu(e,e=>e.playlists&&e.playlists.length||e.uri)}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(\\\",\\\").every(e=>hi(e)))continue;if(!Zu(e,e=>Ju(i,e)))return!1}return!0};var th={liveEdgeDelay:$u,duration:Hu,seekable:function(e,t,i){const s=t||0;let n=Wu(e,t,!0,i);return null===n?Au():(n<s&&(n=s),Au(s,n))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Bu(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&(\\\"number\\\"!=typeof s||\\\"number\\\"!=typeof t.partIndex||s===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Iu<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const s=i.duration>Iu;if(!(0===a)&&!(s&&a+Iu>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Iu>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+Vu({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Yu,isDisabled:function(e){return e.disabled},isExcluded:Gu,isIncompatible:Xu,playlistEnd:Wu,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ku,estimateSegmentRequestTime:function(e,t,i,s=0){if(!Ku(\\\"BANDWIDTH\\\",i))return NaN;return(e*i.attributes.BANDWIDTH-8*s)/t},isLowestEnabledRendition:Qu,isAudioOnly:eh,playlistMatch:Ju,segmentDurationWithParts:Uu};const{log:ih}=bu,sh=(e,t)=>`${e}-${t}`,nh=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,rh=(e,t)=>{e.mediaGroups&&[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},ah=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},oh=(e,t,i=nh)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const s=eh(e);rh(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&\\\"AUDIO\\\"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[Vt({},t)]}t.playlists.forEach(function(t,s){const o=i(n,r,a,t),l=sh(s,o);t.uri?t.resolvedUri=t.resolvedUri||ku(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ah({playlist:i,id:sh(t,i.uri)}),i.resolvedUri=ku(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ih.warn(\\\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\\\")}})(e),(e=>{rh(e,t=>{t.uri&&(t.resolvedUri=ku(e.uri,t.uri))})})(e)};class lh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const ch=({requestType:e,request:t,error:i,parseFailure:s})=>{const n=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=n&&!r||s;if(i&&r)a.error=Vt({},i),a.errorType=bu.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=bu.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=bu.Error.NetworkRequestTimeout;else if(o){const e=s?bu.Error.NetworkBodyParserFailed:bu.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},dh=Eu(\\\"CodecUtils\\\"),uh=function(e){const t=e.attributes||{};if(t.CODECS)return ui(t.CODECS)},hh=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},ph=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(di(`${i}${s}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return dh(`multiple ${e} codecs found as attributes: ${t[e].join(\\\", \\\")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},mh=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},gh=function(e,t){const i=t.attributes||{},s=ph(uh(t)||[]);if(hh(e,t)&&!s.audio&&!((e,t)=>{if(!hh(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=ph(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return ui(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},{EventTarget:fh}=bu,yh=(e,t)=>{if(!e)return t;const i=Cu(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Cu(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},vh=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ku(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ku(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ku(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ku(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ku(t,e.uri))})},bh=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if(\\\"MAP\\\"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},_h=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Th=(e,t,i=_h)=>{const s=Cu(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=bh(t);const r=Cu(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e<n.length;e++){const t=s[e+i],o=n[e];t?(a=t.map||a,r.push(yh(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{vh(e,r.resolvedUri)});for(let e=0;e<s.playlists.length;e++)s.playlists[e].id===t.id&&(s.playlists[e]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,rh(e,(e,i,s,n)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)}),s},Sh=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},wh=(e,t,i)=>{if(!e)return;const s=[];return e.forEach(e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:n}=e.attributes;s.push({id:e.id,bandwidth:t,resolution:i,codecs:n})}),{type:t,isLive:i,renditions:s}};class kh extends fh{constructor(e,t,i={}){if(super(),!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.logger_=Eu(\\\"PlaylistLoader\\\");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new lh,this.state=\\\"HAVE_NOTHING\\\",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on(\\\"mediaupdatetimeout\\\",this.handleMediaupdatetimeout_),this.on(\\\"loadedplaylist\\\",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(\\\"HAVE_METADATA\\\"!==this.state)return;const e=this.media();let t=ku(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=qu(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?\\\"v2\\\":\\\"YES\\\"),Object.keys(i).length){const t=new Le.URL(e);[\\\"_HLS_skip\\\",\\\"_HLS_msn\\\",\\\"_HLS_part\\\"].forEach(function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])}),e=t.toString()}return e})(t,e)),this.state=\\\"HAVE_CURRENT_METADATA\\\",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),\\\"HAVE_METADATA\\\"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ch({requestType:e.requestType,request:e,error:e.error})},this.trigger(\\\"error\\\")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ni;e&&a.on(\\\"warn\\\",e),t&&a.on(\\\"info\\\",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||([\\\"preloadSegment\\\",\\\"skip\\\",\\\"serverControl\\\",\\\"renditionReports\\\",\\\"partInf\\\",\\\"partTargetDuration\\\"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(e){[\\\"parts\\\",\\\"preloadHints\\\"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=Fu(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),ih.error(\\\"LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.\\\")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:s}=t.RESOLUTION||{};if(i&&s)return!0;const n=uh(e)||[],r=ph(n);return Boolean(r.video)};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state=\\\"HAVE_METADATA\\\";const n={playlistInfo:{type:\\\"media\\\",uri:i}};this.trigger({type:\\\"playlistparsestart\\\",metadata:n});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ah({playlist:r,uri:i,id:s});const a=Th(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[s]):this.trigger(\\\"playlistunchanged\\\"),this.updateMediaUpdateTimeout_(Sh(this.media(),!!a)),n.parsedPlaylist=wh(this.main.playlists,n.playlistInfo.type,!this.media_.endList),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:n}),this.trigger(\\\"loadedplaylist\\\")}dispose(){this.trigger(\\\"dispose\\\"),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),Le.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new lh,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);if(\\\"string\\\"==typeof e){if(!this.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.main.playlists[e]}if(Le.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Le.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(s&&(this.trigger(\\\"mediachanging\\\"),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")));if(this.updateMediaUpdateTimeout_(Sh(e,!0)),!s)return;if(this.state=\\\"SWITCHING_MEDIA\\\",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\\\"mediachanging\\\"),this.pendingMedia_=e;const r={playlistInfo:{type:\\\"media\\\",uri:e.uri}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=xu(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:r}),this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),\\\"HAVE_MAIN_MANIFEST\\\"===i?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}})}pause(){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),\\\"SWITCHING_MEDIA\\\"===this.state?this.media_?this.state=\\\"HAVE_METADATA\\\":this.state=\\\"HAVE_MAIN_MANIFEST\\\":\\\"HAVE_CURRENT_METADATA\\\"===this.state&&(this.state=\\\"HAVE_METADATA\\\")}load(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e))}this.started?t&&!t.endList?this.trigger(\\\"mediaupdatetimeout\\\"):this.trigger(\\\"loadedplaylist\\\"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger(\\\"mediaupdatetimeout\\\"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,\\\"object\\\"==typeof this.src)return this.src.uri||(this.src.uri=Le.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);const e={playlistInfo:{type:\\\"multivariant\\\",uri:this.src}};this.trigger({type:\\\"playlistrequeststart\\\",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:\\\"hls-playlist\\\"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:ch({requestType:i.requestType,request:i,error:t})},\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1),this.trigger(\\\"error\\\");this.trigger({type:\\\"playlistrequestcomplete\\\",metadata:e}),this.src=xu(this.src,i),this.trigger({type:\\\"playlistparsestart\\\",metadata:e});const s=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=wh(s.playlists,e.playlistInfo.type,!1),this.trigger({type:\\\"playlistparsecomplete\\\",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return\\\"string\\\"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state=\\\"HAVE_MAIN_MANIFEST\\\",e.playlists)return this.main=e,oh(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=bh(e),e.segments.forEach(t=>{vh(t,e.resolvedUri)})}),this.trigger(\\\"loadedplaylist\\\"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Le.location.href;this.main=((e,t)=>{const i=sh(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},\\\"CLOSED-CAPTIONS\\\":{},SUBTITLES:{}},uri:Le.location.href,resolvedUri:Le.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger(\\\"loadedmetadata\\\")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;for(;n--;){const r=i.playlists[n];if(r.attributes[\\\"PATHWAY-ID\\\"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=sh(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){i.mediaGroups[e][t][s].playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=sh(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e[\\\"BASE-ID\\\"],s=this.main;[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=Vt({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],c=nh(n,t,i),d=sh(t,c);if(l&&!s.playlists[d]){const t=this.createClonePlaylist_(l,d,e),i=t.resolvedUri;s.playlists[d]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,d,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Cu(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t[\\\"URI-REPLACEMENT\\\"].HOST;const s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e of Object.keys(s))i.searchParams.set(e,s[e]);return i.href}createCloneAttributes_(e,t){const i={\\\"PATHWAY-ID\\\":e};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const xh=function(e,t,i,s){const n=\\\"arraybuffer\\\"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\\\"ETIMEDOUT\\\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\\\"XHR Failed with a response of: \\\"+(e&&(n||e.responseText)))),s(t,e)},Eh=function(){const e=function e(t,i){t=Cu({timeout:45e3},t);const s=e.beforeRequest||bu.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||bu.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||bu.Vhs.xhr._responseCallbackSet;s&&\\\"function\\\"==typeof s&&(bu.log.warn(\\\"beforeRequest is deprecated, use onRequest instead.\\\"),n.add(s));const a=!0===bu.Vhs.xhr.original?bu.xhr:bu.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i})(n,t);n.delete(s);const l=a(o||t,function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})})(r,l,e,t),xh(l,e,t,i)}),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Ch=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t=\\\"bigint\\\"==typeof e.offset||\\\"bigint\\\"==typeof e.length?Le.BigInt(e.offset)+Le.BigInt(e.length)-Le.BigInt(1):e.offset+e.length-1,\\\"bytes=\\\"+i+\\\"-\\\"+t}(e.byterange)),t},Ah=function(e,t){return e.start(t)+\\\"-\\\"+e.end(t)},Ih=function(e,t){const i=e.toString(16);return\\\"00\\\".substring(0,2-i.length)+i+(t%2?\\\" \\\":\\\"\\\")},jh=function(e){return e>=32&&e<126?String.fromCharCode(e):\\\".\\\"},Dh=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];_i(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Ph=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\\\",\\\")},Lh=function(e){return e.resolvedUri},Oh=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r=\\\"\\\";for(let e=0;e<t.length/i;e++)s=t.slice(e*i,e*i+i).map(Ih).join(\\\"\\\"),n=t.slice(e*i,e*i+i).map(jh).join(\\\"\\\"),r+=s+\\\" \\\"+n+\\\"\\\\n\\\";return r};var Nh=Object.freeze({__proto__:null,createTransferableMessage:Dh,initSegmentId:Ph,segmentKeyId:Lh,hexDump:Oh,tagDump:({bytes:e})=>Oh(e),textRanges:e=>{let t,i=\\\"\\\";for(t=0;t<e.length;t++)i+=Ah(e,t)+\\\" \\\";return i}});const Mh=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error(\\\"getProgramTime: callback must be provided\\\");if(!e||void 0===t)return i({message:\\\"getProgramTime: playlist and time must be provided\\\"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;n<t.segments.length&&(i=t.segments[n],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,!(e<=s));n++);const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"}})(t,e);if(!s)return i({message:\\\"valid programTime was not found\\\"});if(\\\"estimate\\\"===s.type)return i({message:\\\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\\\",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},Rh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error(\\\"seekToProgramTime: callback must be provided\\\");if(void 0===e||!t||!s)return a({message:\\\"seekToProgramTime: programTime, seekTo and playlist must be provided\\\"});if(!t.endList&&!r.hasStarted_)return a({message:\\\"player must be playing a live stream to start buffering\\\"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:\\\"programDateTime tags must be provided in the manifest \\\"+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(s=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?(o=n.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:n.duration+.25*n.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:th.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?\\\"accurate\\\":\\\"estimate\\\"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if(\\\"estimate\\\"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one(\\\"seeked\\\",()=>{Rh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const d=l.start+c;r.one(\\\"seeked\\\",()=>a(null,r.currentTime())),n&&r.pause(),s(d)},Uh=(e,t)=>{if(4===e.readyState)return t()},Bh=(e,t,i,s)=>{let n,r=[],a=!1;const o=function(e,t,s,n){return t.abort(),a=!0,i(e,t,s,n)},l=function(e,t){if(a)return;if(e)return e.metadata=ch({requestType:s,request:t,error:e}),o(e,t,\\\"\\\",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\\\"string\\\"!=typeof e}),t.length<=1)return Ti(t[0]);var s=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(s),r=0;return t.forEach(function(e){e=Ti(e),n.set(e,r),r+=e.byteLength}),n}(r,Ei(i,!0)),n=n||Nr(r),r.length<10||n&&r.length<n+2)return Uh(t,()=>o(e,t,\\\"\\\",r));const l=Zr(r);return\\\"ts\\\"===l&&r.length<188||!l&&r.length<376?Uh(t,()=>o(e,t,\\\"\\\",r)):o(null,t,l,r)},c={uri:e,beforeSend(e){e.overrideMimeType(\\\"text/plain; charset=x-user-defined\\\"),e.addEventListener(\\\"progress\\\",function({total:t,loaded:i}){return xh(e,null,{statusCode:e.status},l)})}},d=t(c,function(e,t){return xh(d,e,t,l)});return d},{EventTarget:Fh}=bu,qh=function(e,t){if(!_h(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},$h=(e,t,i,s)=>`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,zh=(e,t,i)=>{let s=!0,n=Cu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=Zn(r.sidx);i&&i[e]&&i[e].sidx&&Wn(r,i[e].sidx,r.sidx.resolvedUri)}const a=Th(n,r,qh);a&&(n=a,s=!1)}return rh(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Th(n,e.playlists[0],qh);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),((e,t)=>{rh(e,(i,s,n,r)=>{t.mediaGroups[s][n]&&r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},Hh=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Vh=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=Zn(n);if(!t[e])break;const s=t[e].sidxInfo;Hh(s,n)&&(i[e]=t[e])}}return i};class Wh extends Fh{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error(\\\"A non-empty playlist URL or object is required\\\");this.on(\\\"minimumUpdatePeriod\\\",()=>{this.refreshXml_()}),this.on(\\\"mediaupdatetimeout\\\",()=>{this.refreshMedia_(this.media().id)}),this.state=\\\"HAVE_NOTHING\\\",this.loadedPlaylists_={},this.logger_=Eu(\\\"DashPlaylistLoader\\\"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error=\\\"object\\\"!=typeof e||e instanceof Error?{status:t.status,message:\\\"DASH request error at URL: \\\"+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger(\\\"error\\\"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Zn(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>i(!1),0));const n=xu(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=Lr(Ti(r.response).subarray(8))}catch(e){return e.metadata=ch({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:l},Wn(e,l,e.sidx.resolvedUri),i(!0)};this.request=Bh(n,this.vhs_.xhr,(t,i,s,a)=>{if(t)return r(t,i);if(!s||\\\"mp4\\\"!==s){const t=s||\\\"unknown\\\";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${n}`,response:\\\"\\\",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:\\\"arraybuffer\\\",requestType:\\\"dash-sidx\\\",headers:Ch({byterange:e.sidx.byterange})},r)},\\\"dash-sidx\\\")}dispose(){this.isPaused_=!0,this.trigger(\\\"dispose\\\"),this.stopRequest(),this.loadedPlaylists_={},Le.clearTimeout(this.minimumUpdatePeriodTimeout_),Le.clearTimeout(this.mediaRequest_),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(\\\"HAVE_NOTHING\\\"===this.state)throw new Error(\\\"Cannot switch media playlist from \\\"+this.state);const t=this.state;if(\\\"string\\\"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error(\\\"Unknown playlist URI: \\\"+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state=\\\"HAVE_METADATA\\\",this.media_=e,void(i&&(this.trigger(\\\"mediachanging\\\"),this.trigger(\\\"mediachange\\\")));i&&(this.media_&&this.trigger(\\\"mediachanging\\\"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state=\\\"HAVE_METADATA\\\",this.loadedPlaylists_[t.id]=t,Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),\\\"HAVE_MAIN_MANIFEST\\\"===e?this.trigger(\\\"loadedmetadata\\\"):this.trigger(\\\"mediachange\\\")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off(\\\"loadedmetadata\\\",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Le.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,Le.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=Le.setTimeout(()=>this.load(),e))}this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger(\\\"minimumUpdatePeriod\\\"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger(\\\"mediaupdatetimeout\\\")):this.trigger(\\\"loadedplaylist\\\"):this.start()}start(){if(this.started=!0,!this.isMain_)return Le.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=Le.setTimeout(()=>this.haveMain_(),0));this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:\\\"manifestrequeststart\\\",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:\\\"dash-manifest\\\"},(i,s)=>{if(i){const{requestType:e}=s;i.metadata=ch({requestType:e,request:s,error:i})}if(this.requestErrored_(i,s))return void(\\\"HAVE_NOTHING\\\"===this.state&&(this.started=!1));this.trigger({type:\\\"manifestrequestcomplete\\\",metadata:t});const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=xu(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(s,n))):e(s,n)})}syncClientServerClock_(e){const t=jr(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):\\\"DIRECT\\\"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ku(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:\\\"dash-clock-sync\\\"},(i,s)=>{if(!this.request)return;if(i){const{requestType:t}=s;return this.error.metadata=ch({requestType:t,request:s,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let n;n=\\\"HEAD\\\"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state=\\\"HAVE_MAIN_MANIFEST\\\",this.isMain_?this.trigger(\\\"loadedplaylist\\\"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Le.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:\\\"manifestparsestart\\\",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Ir(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return oh(r,t,$h),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:bu.Error.StreamingDashManifestParserError,error:e},this.trigger(\\\"error\\\")}e&&(i=zh(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:s}=i,n=[];i.playlists.forEach(e=>{n.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});const r={duration:e,isLive:!s,renditions:n};t.parsedManifest=r,this.trigger({type:\\\"manifestparsecomplete\\\",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off(\\\"loadedmetadata\\\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Le.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\\\"loadedmetadata\\\",e.createMupOnMedia_))),\\\"number\\\"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Le.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger(\\\"minimumUpdatePeriod\\\"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Vh(e.playlists,t);return rh(e,(e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=Cu(i,Vh(s,t))}}),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error(\\\"refreshMedia_ must take a media id\\\");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger(\\\"playlistunchanged\\\"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Le.setTimeout(()=>{this.trigger(\\\"mediaupdatetimeout\\\"),e()},Sh(this.media(),Boolean(i))))};e()}this.trigger(\\\"loadedplaylist\\\")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack(\\\"EventStream\\\",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes[\\\"cenc:default_KID\\\"];s&&t.add(s.replace(/-/g,\\\"\\\").toLowerCase())}return t}}}var Gh={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xh=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Yh=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:\\\"application/javascript\\\"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Xh(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Kh=function(e){return`var browserWorkerPolyFill = ${Xh.toString()};\\\\nbrowserWorkerPolyFill(self);\\\\n`+e},Qh=function(e){return e.toString().replace(/^function.+?{/,\\\"\\\").slice(0,-1)},Jh=Kh(Qh(function(){var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on(\\\"data\\\",function(t){e.push(t)}),this.on(\\\"done\\\",function(t){e.flush(t)}),this.on(\\\"partialdone\\\",function(t){e.partialFlush(t)}),this.on(\\\"endedtimeline\\\",function(t){e.endTimeline(t)}),this.on(\\\"reset\\\",function(t){e.reset(t)}),e},t.prototype.push=function(e){this.trigger(\\\"data\\\",e)},t.prototype.flush=function(e){this.trigger(\\\"done\\\",e)},t.prototype.partialFlush=function(e){this.trigger(\\\"partialdone\\\",e)},t.prototype.endTimeline=function(e){this.trigger(\\\"endedtimeline\\\",e)},t.prototype.reset=function(e){this.trigger(\\\"reset\\\",e)};var i,s,n,r,a,o,l,c,d,u,h,p,m,g,f,y,v,b,_,T,S,w,k,x,E,C,A,I,j,D,P,L,O,N,M,R,U,B,F,q,$=t,z=Math.pow(2,32),H={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=H.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\\\"undefined\\\"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\\\"i\\\".charCodeAt(0),\\\"s\\\".charCodeAt(0),\\\"o\\\".charCodeAt(0),\\\"m\\\".charCodeAt(0)]),E=new Uint8Array([\\\"a\\\".charCodeAt(0),\\\"v\\\".charCodeAt(0),\\\"c\\\".charCodeAt(0),\\\"1\\\".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:A},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),O=L,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,j=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,i,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)n+=s[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return i(w.dinf,i(w.dref,P))},n=function(e){return i(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(w.hdlr,I[e])},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(w.mdhd,t)},m=function(e){return i(w.mdia,g(e),f(e.type),o(e))},a=function(e){return i(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(w.minf,\\\"video\\\"===e.type?i(w.vmhd,j):i(w.smhd,D),s(),v(e))},l=function(e,t){for(var s=[],n=t.length;n--;)s[n]=_(t[n]);return i.apply(null,[w.moof,a(e)].concat(s))},c=function(e){for(var t=e.length,s=[];t--;)s[t]=h(e[t]);return i.apply(null,[w.moov,u(4294967295)].concat(s).concat(d(e)))},d=function(e){for(var t=e.length,s=[];t--;)s[t]=T(e[t]);return i.apply(null,[w.mvex].concat(s))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(w.mvhd,t)},y=function(e){var t,s,n=e.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)t=n[s].flags,r[s+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(w.sdtp,r)},v=function(e){return i(w.stbl,b(e),i(w.stts,M),i(w.stsc,O),i(w.stsz,N),i(w.stco,L))},b=function(e){return i(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\\\"video\\\"===e.type?R(e):U(e))},R=function(e){var t,s,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(s=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),i(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];s.push(i(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return i.apply(null,s)},U=function(e){return i(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(w.tkhd,t)},_=function(e){var t,s,n,r,a,o;return t=i(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),s=i(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),\\\"audio\\\"===e.type?(n=S(e,92),i(w.traf,t,s,n)):(r=y(e),n=S(e,r.length+92),i(w.traf,t,s,n,r))},h=function(e){return e.duration=e.duration||4294967295,i(w.trak,p(e),m(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\\\"video\\\"!==e.type&&(t[t.length-1]=0),i(w.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var s,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size,n[s++]=o.flags.isLeading<<2|o.flags.dependsOn,n[s++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[s++]=61440&o.flags.degradationPriority,n[s++]=15&o.flags.degradationPriority,n[s++]=(4278190080&o.compositionTimeOffset)>>>24,n[s++]=(16711680&o.compositionTimeOffset)>>>16,n[s++]=(65280&o.compositionTimeOffset)>>>8,n[s++]=255&o.compositionTimeOffset;return i(w.trun,n)},B=function(e,t){var s,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(s=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size;return i(w.trun,s)},S=function(e,t){return\\\"audio\\\"===e.type?B(e,t):F(e,t)};var W,G,X,Y,K,Q,J,Z,ee={ftyp:r=function(){return i(w.ftyp,k,x,k,E)},mdat:function(e){return i(w.mdat,e)},moof:l,moov:c,initSegment:function(e){var t,i=r(),s=c(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)\\\"access_unit_delimiter_rbsp\\\"===(i=e[t]).nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),(s=[i]).byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):(\\\"slice_layer_without_partitioning_rbsp_idr\\\"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},groupFramesIntoGops:function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),(s=[i]).nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],o+=(n=te(a,o)).size,l.push(n);return l},concatenateNalData:function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,c=e.nalCount,d=new Uint8Array(l+4*c),u=new DataView(d.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],u.setUint32(o,a.data.byteLength),o+=4,d.set(a.data,o),o+=a.data.byteLength;return d},generateSampleTableForFrame:function(e,t){var i,s=[];return i=te(e,t||0),s.push(i),s},concatenateNalDataForFrame:function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=new Uint8Array(n+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(s,i.data.byteLength),s+=4,a.set(i.data,s),s+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;Q=function(e,t){return G(K(e,t))},J=function(e,t){return X(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:G=function(e){return e*ae},secondsToAudioTs:X=function(e,t){return e*t},videoTsToSeconds:Y=function(e){return e/ae},audioTsToSeconds:K=function(e,t){return e/t},audioTsToVideoTs:Q,videoTsToAudioTs:J,metadataTsToSeconds:Z},le=function(){if(!W){var e={96e3:[se,[227,64],re(154),[56]],88200:[se,[231],re(170),[56]],64e3:[se,[248,192],re(240),[56]],48e3:[se,[255,192],re(268),[55,148,128],re(54),[112]],44100:[se,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[se,[255,192],re(268),[55,234],re(226),[112]],24e3:[se,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[se,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]};t=e,W=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return W},ce=oe,de={prefixWithSilence:function(e,t,i,s){var n,r,a,o,l,c=0,d=0,u=0;if(t.length&&(n=ce.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ce.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(c=n-Math.max(i,s),u=(d=Math.floor(c/r))*r),!(d<1||u>ce.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<d;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ce.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},concatenateFrameData:function(e){var t,i,s=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),\\\"audio\\\"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){\\\"number\\\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\\\"number\\\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)s+=255,t++;for(s+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===s){if(\\\"GA94\\\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||\\\"GA94\\\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)r={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},me=$,ge=pe,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_=\\\"boolean\\\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),e.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),e.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),this.cc708Stream_.on(\\\"partialdone\\\",this.trigger.bind(this,\\\"partialdone\\\")),this.cc708Stream_.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")))};fe.prototype=new me,fe.prototype.push=function(e){var t,i,s;if(\\\"sei_rbsp\\\"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return\\\"flush\\\"===e?t.flush():t.partialFlush()},this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream(\\\"flush\\\")},fe.prototype.partialFlush=function(){return this.flushStream(\\\"partialFlush\\\")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join(\\\"\\\\n\\\")},be.prototype.clearText=function(){this.rows=[\\\"\\\"],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\\\"function\\\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(\\\"\\\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\\\"\\\"===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text=\\\"\\\",this.currentWindow=new be(-1),this.windows=[],this.stream=i,\\\"string\\\"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),\\\"function\\\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if(\\\"undefined\\\"==typeof TextDecoder)this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"The `encoding` option is unsupported without TextDecoder support\\\"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"TextDecoder could not be created with \\\"+e+\\\" encoding. \\\"+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)s=31&(r=t[n++]),7===(i=r>>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],ve(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return ve(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,s,n=this;return(i=\\\"SERVICE\\\"+e)in this.serviceEncodings&&(s=this.serviceEncodings[i]),this.services[e]=new _e(e,s,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Te.prototype.handleText=function(e,t,i){var s,n,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,c=this.current708Packet.data,d=o?4096:0,u=c[e],h=c[e+1],p=t.currentWindow;if(l?(n=[u,h],e++):n=[u],t.textDecoder_&&!o)s=t.textDecoder_.decode(new Uint8Array(n));else if(l){const e=n.map(e=>(\\\"0\\\"+(255&e).toString(16)).slice(-2)).join(\\\"\\\");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|u]||r,s=4096&r&&r===a?\\\"\\\":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join(\\\"\\\\n\\\\n\\\"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){\\\"\\\"!==e.text&&(this.trigger(\\\"data\\\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\\\"cc708_\\\"+e.serviceNum}),e.text=\\\"\\\",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?\\\"\\\":(e=Se[e]||e,String.fromCharCode(e))},ke=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(var e=[],t=15;t--;)e.push({text:\\\"\\\",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_=\\\"CC\\\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\\\"popOn\\\";else if(t===this.END_OF_CAPTION_)this.mode_=\\\"popOn\\\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)\\\"paintOn\\\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_=\\\"paintOn\\\",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))\\\"popOn\\\"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts,\\\" \\\"),this.column_++,14&~n||this.addFormatting(e.pts,[\\\"i\\\"]),1&~n||this.addFormatting(e.pts,[\\\"u\\\"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=ke.indexOf(7968&t);if(\\\"rollUp\\\"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf(\\\"u\\\")&&this.addFormatting(e.pts,[\\\"u\\\"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,[\\\"i\\\"]))}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new me,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping a malformed 608 caption at index \\\"+e+\\\".\\\"})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)}),i.length&&this.trigger(\\\"data\\\",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_=\\\"popOn\\\",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if(\\\"rollUp\\\"!==this.mode_&&(this.row_=14,this.mode_=\\\"rollUp\\\",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:\\\"\\\",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\\\"<\\\"+t+\\\">\\\"},\\\"\\\");this[this.mode_](e,i)},Ee.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\\\"</\\\"+t+\\\">\\\"},\\\"\\\");this.formatting_=[],this[this.mode_](e,t)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:\\\"\\\",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:\\\"\\\",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ce={CaptionStream:fe,Cea608Stream:Ee,Cea708Stream:Te},Ae={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ie=$,je=\\\"shared\\\",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Pe=function(e){var t,i;Pe.prototype.init.call(this),this.type_=e||je,this.push=function(e){\\\"metadata\\\"!==e.type?this.type_!==je&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger(\\\"data\\\",e)):this.trigger(\\\"data\\\",e)},this.flush=function(){i=t,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger(\\\"reset\\\")}};Pe.prototype=new Ie;var Le,Oe={TimestampRolloverStream:Pe,handleRollover:De},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},Me=Ne,Re=3,Ue=function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n},Be=function(e,t,i){return decodeURIComponent(Ue(e,t,i))},Fe=function(e,t,i){return unescape(Ue(e,t,i))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},$e={APIC:function(e){var t,i,s=1;e.data[0]===Re&&((t=Me(e.data,0,s))<0||(e.mimeType=Fe(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,(i=Me(e.data,0,s))<0||(e.description=Be(e.data,s,i),s=i+1,\\\"--\\\\x3e\\\"===e.mimeType?e.url=Fe(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},\\\"T*\\\":function(e){e.data[0]===Re&&(e.value=Be(e.data,1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.values=e.value.split(\\\"\\\\0\\\"))},TXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\\\\0*$/,\\\"\\\"),e.data=e.value)},\\\"W*\\\":function(e){e.url=Fe(e.data,0,e.data.length).replace(/\\\\0.*$/,\\\"\\\")},WXXX:function(e){var t;e.data[0]===Re&&-1!==(t=Me(e.data,0,1))&&(e.description=Be(e.data,1,t),e.url=Fe(e.data,t+1,e.data.length).replace(/\\\\0.*$/,\\\"\\\"))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Fe(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},ze={parseId3Frames:function(e){var t,i=10,s=0,n=[];if(!(e.length<10||e[0]!==\\\"I\\\".charCodeAt(0)||e[1]!==\\\"D\\\".charCodeAt(0)||e[2]!==\\\"3\\\".charCodeAt(0))){s=qe(e.subarray(6,10)),s+=10,64&e[5]&&(i+=4,i+=qe(e.subarray(10,14)),s-=qe(e.subarray(16,20)));do{if((t=qe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,$e[r.id]?$e[r.id](r):\\\"T\\\"===r.id[0]?$e[\\\"T*\\\"](r):\\\"W\\\"===r.id[0]&&$e[\\\"W*\\\"](r),n.push(r),i+=10,i+=t}while(i<s);return n}},parseSyncSafeInteger:qe,frameParsers:$e},He=Ae,Ve=ze;(Le=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(Le.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=(\\\"00\\\"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if(\\\"timed-metadata\\\"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!==\\\"I\\\".charCodeAt(0)||e.data[1]!==\\\"D\\\".charCodeAt(0)||e.data[2]!==\\\"3\\\".charCodeAt(0)))this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Skipping unrecognized metadata packet\\\"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=Ve.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=Ve.parseSyncSafeInteger(t.data.subarray(10,14)),s-=Ve.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=Ve.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:\\\"Malformed ID3 frame encountered. Skipping remaining metadata parsing.\\\"});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve.frameParsers[o.id]?Ve.frameParsers[o.id](o):\\\"T\\\"===o.id[0]?Ve.frameParsers[\\\"T*\\\"](o):\\\"W\\\"===o.id[0]&&Ve.frameParsers[\\\"W*\\\"](o),\\\"com.apple.streaming.transportStreamTimestamp\\\"===o.owner){var c=o.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger(\\\"timestamp\\\",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger(\\\"data\\\",t)}}}).prototype=new $;var We,Ge,Xe,Ye=Le,Ke=$,Qe=Ce,Je=Ae,Ze=Oe.TimestampRolloverStream,et=188;(We=function(){var e=new Uint8Array(et),t=0;We.prototype.init.call(this),this.push=function(i){var s,n=0,r=et;for(t?((s=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),s.set(i,t),t=0):s=i;r<s.byteLength;)71!==s[n]||71!==s[r]?(n++,r++):(this.trigger(\\\"data\\\",s.subarray(n,r)),n+=et,r+=et);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===et&&71===e[0]&&(this.trigger(\\\"data\\\",e),t=0),this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")},this.reset=function(){t=0,this.trigger(\\\"reset\\\")}}).prototype=new Ke,Ge=function(){var e,t,i,s;Ge.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),\\\"pat\\\"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\\\"timed-metadata\\\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Je.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Je.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Je.METADATA_STREAM_TYPE&&(s.programMapTable[\\\"timed-metadata\\\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type=\\\"pat\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);else if(i.pid===this.pmtPid)for(i.type=\\\"pmt\\\",e(t.subarray(s),i),this.trigger(\\\"data\\\",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Je.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Je.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\\\"timed-metadata\\\"][i.pid],i.type=\\\"pes\\\",i.data=e.subarray(t),this.trigger(\\\"data\\\",i)}},Ge.prototype=new Ke,Ge.STREAM_TYPES={h264:27,adts:15},Xe=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,c),c+=r.data.byteLength;!function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n=\\\"video\\\"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger(\\\"data\\\",o)}};Xe.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Je.H264_STREAM_TYPE:e=s,t=\\\"video\\\";break;case Je.ADTS_STREAM_TYPE:e=n,t=\\\"audio\\\";break;case Je.METADATA_STREAM_TYPE:e=r,t=\\\"timed-metadata\\\";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:\\\"metadata\\\",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),i=!0,t.trigger(\\\"data\\\",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger(\\\"reset\\\")},this.flushStreams_=function(){a(s,\\\"video\\\"),a(n,\\\"audio\\\"),a(r,\\\"timed-metadata\\\")},this.flush=function(){if(!i&&e){var s={type:\\\"metadata\\\",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:\\\"avc\\\",type:\\\"video\\\"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:\\\"adts\\\",type:\\\"audio\\\"}),t.trigger(\\\"data\\\",s)}i=!1,this.flushStreams_(),this.trigger(\\\"done\\\")}},Xe.prototype=new Ke;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:et,TransportPacketStream:We,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:Ze,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ye};for(var it in Je)Je.hasOwnProperty(it)&&(tt[it]=Je[it]);var st,nt=tt,rt=oe.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,i=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger(\\\"log\\\",{level:\\\"warn\\\",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),\\\"audio\\\"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),r=2*(1&~t[c+1]),n=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c<n)break;this.trigger(\\\"data\\\",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else\\\"number\\\"!=typeof d&&(d=c),c++;\\\"number\\\"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger(\\\"done\\\")},this.reset=function(){t=void 0,this.trigger(\\\"reset\\\")},this.endTimeline=function(){t=void 0,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var ot,lt=st;ot=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error(\\\"no bytes available\\\");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(i&2147483648>>>e)return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var ct,dt,ut,ht=$,pt=ot;(dt=function(){var e,t,i=0;dt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger(\\\"data\\\",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger(\\\"data\\\",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger(\\\"reset\\\")},this.flush=function(){t&&t.byteLength>3&&this.trigger(\\\"data\\\",t.subarray(i+3)),t=null,i=0,this.trigger(\\\"done\\\")},this.endTimeline=function(){this.flush(),this.trigger(\\\"endedtimeline\\\")}}).prototype=new ht,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,i,s,n,r,a,o=new dt;ct.prototype.init.call(this),e=this,this.push=function(e){\\\"video\\\"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on(\\\"data\\\",function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType=\\\"slice_layer_without_partitioning_rbsp_idr\\\";break;case 6:o.nalUnitType=\\\"sei_rbsp\\\",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType=\\\"seq_parameter_set_rbsp\\\",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType=\\\"pic_parameter_set_rbsp\\\";break;case 9:o.nalUnitType=\\\"access_unit_delimiter_rbsp\\\"}e.trigger(\\\"data\\\",o)}),o.on(\\\"done\\\",function(){e.trigger(\\\"done\\\")}),o.on(\\\"partialdone\\\",function(){e.trigger(\\\"partialdone\\\")}),o.on(\\\"reset\\\",function(){e.trigger(\\\"reset\\\")}),o.on(\\\"endedtimeline\\\",function(){e.trigger(\\\"endedtimeline\\\")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(s+t.readExpGolomb()+256)%256),s=0===n?s:n},n=function(e){for(var t,i,s=e.byteLength,n=[],r=1;r<s-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,c,d,u,h,p,m=0,g=0,f=0,y=0,v=[1,1];if(i=(t=new pt(e)).readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(c+1)-2*m-2*g,height:(2-u)*(d+1)*16-2*f-2*y,sarRatio:v}}},ct.prototype=new ht;var mt,gt={H264Stream:ct},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},vt=function(e,t){return e.length-t<10||e[t]!==\\\"I\\\".charCodeAt(0)||e[t+1]!==\\\"D\\\".charCodeAt(0)||e[t+2]!==\\\"3\\\".charCodeAt(0)?t:(t+=yt(e,t),vt(e,t))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t=function(e,t,i){return unescape(function(e,t,i){var s,n=\\\"\\\";for(s=t;s<i;s++)n+=\\\"%\\\"+(\\\"00\\\"+e[s].toString(16)).slice(-2);return n}(e,t,i))},Tt={isLikelyAacData:function(e){var t=vt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]===\\\"I\\\".charCodeAt(0)&&e[t+1]===\\\"D\\\".charCodeAt(0)&&e[t+2]===\\\"3\\\".charCodeAt(0)?\\\"timed-metadata\\\":!0&e[t]&&!(240&~e[t+1])?\\\"audio\\\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((i=bt(e.subarray(t+4,t+8)))<1)return null;if(\\\"PRIV\\\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n<s.byteLength;n++)if(0===s[n]){if(\\\"com.apple.streaming.transportStreamTimestamp\\\"===_t(s,0,n)){var r=s.subarray(n+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},St=Tt;(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!==\\\"I\\\".charCodeAt(0)||e[l+1]!==\\\"D\\\".charCodeAt(0)||e[l+2]!==\\\"3\\\".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=St.parseAdtsSize(e,l))>e.length)break;r={type:\\\"audio\\\",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger(\\\"data\\\",r),l+=o}else{if(e.length-l<10)break;if(l+(o=St.parseId3TagSize(e,l))>e.length)break;n={type:\\\"timed-metadata\\\",data:e.subarray(l,l+o)},this.trigger(\\\"data\\\",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger(\\\"reset\\\")},this.endTimeline=function(){e=new Uint8Array,this.trigger(\\\"endedtimeline\\\")}}).prototype=new $;var wt,kt,xt,Et,Ct=$,At=ee,It=ie,jt=de,Dt=he,Pt=nt,Lt=oe,Ot=lt,Nt=gt.H264Stream,Mt=mt,Rt=Tt.isLikelyAacData,Ut=oe.ONE_SECOND_IN_TS,Bt=[\\\"audioobjecttype\\\",\\\"channelcount\\\",\\\"samplerate\\\",\\\"samplingfrequencyindex\\\",\\\"samplesize\\\"],Ft=[\\\"width\\\",\\\"height\\\",\\\"profileIdc\\\",\\\"levelIdc\\\",\\\"profileCompatibility\\\",\\\"sarRatio\\\"],qt=function(e,t){t.stream=e,this.trigger(\\\"log\\\",t)},$t=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];\\\"headOfPipeline\\\"!==n&&t[n].on&&t[n].on(\\\"log\\\",qt.bind(e,n))}},zt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ht=function(e,t,i,s,n,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(s-t),pts:e+(n-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};kt=function(e,t){var i,s=[],n=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){Dt.collectDtsInfo(e,t),e&&Bt.forEach(function(i){e[i]=t[i]}),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,c,d,u,h,p;0!==s.length?(o=jt.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=jt.prefixWithSilence(e,o,r,a),e.samples=jt.generateSampleTable(o),c=At.mdat(jt.concatenateFrameData(o)),s=[],l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),Dt.clearDtsInfo(e),u=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*u,this.trigger(\\\"segmentTimingInfo\\\",Ht(Lt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[0].pts+h})),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")):this.trigger(\\\"done\\\",\\\"AudioSegmentStream\\\")},this.reset=function(){Dt.clearDtsInfo(e),s=[],this.trigger(\\\"reset\\\")}},kt.prototype=new Ct,wt=function(e,t){var i,s,n,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Dt.collectDtsInfo(e,t),\\\"seq_parameter_set_rbsp\\\"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Ft.forEach(function(t){e[t]=s[t]},this)),\\\"pic_parameter_set_rbsp\\\"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var s,n,o,l,c,d,u,h,p=0;r.length&&\\\"access_unit_delimiter_rbsp\\\"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");if(s=It.groupNalsIntoFrames(r),(o=It.groupFramesIntoGops(s))[0][0].keyFrame||((n=this.getGopForFusion_(r[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=It.extendFirstKeyFrame(o)),a.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\");Dt.clearDtsInfo(e),o=m}Dt.collectDtsInfo(e,o),e.samples=It.generateSampleTable(o),c=At.mdat(It.concatenateNalData(o)),e.baseMediaDecodeTime=Dt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger(\\\"processedGopsInfo\\\",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),u=o[0],h=o[o.length-1],this.trigger(\\\"segmentTimingInfo\\\",Ht(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger(\\\"timingInfo\\\",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger(\\\"baseMediaDecodeTime\\\",e.baseMediaDecodeTime),this.trigger(\\\"timelineStartInfo\\\",e.timelineStartInfo),l=At.moof(i,[e]),d=new Uint8Array(l.byteLength+c.byteLength),i++,d.set(l),d.set(c,l.byteLength),this.trigger(\\\"data\\\",{track:e,boxes:d}),this.resetStream_(),this.trigger(\\\"done\\\",\\\"VideoSegmentStream\\\")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger(\\\"reset\\\")},this.resetStream_=function(){Dt.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,e.pps&&zt(e.pps[0],r.pps[0])&&e.sps&&zt(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(s=a[t],n=e[i],s.pts!==n.pts);)n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},wt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\\\"boolean\\\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\\\"video\\\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\\\"audio\\\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\\\"VideoSegmentStream\\\"!==e&&\\\"AudioSegmentStream\\\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ft.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Bt.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type=\\\"combined\\\",this.emittedTracks+=this.pendingTracks.length,s=At.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=Lt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Lt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=Lt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\\\"data\\\",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger(\\\"caption\\\",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger(\\\"id3Frame\\\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\\\"done\\\"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(xt=function(e){var t,i,s=this,n=!0;xt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"aac\\\",n.metadataStream=new Pt.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"audio\\\"),n.timedMetadataTimestampRolloverStream=new Pt.TimestampRolloverStream(\\\"timed-metadata\\\"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on(\\\"timestamp\\\",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on(\\\"data\\\",function(r){\\\"timed-metadata\\\"!==r.type&&\\\"audio\\\"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\\\"adts\\\",type:\\\"audio\\\"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type=\\\"ts\\\",n.metadataStream=new Pt.MetadataStream,n.packetStream=new Pt.TransportPacketStream,n.parseStream=new Pt.TransportParseStream,n.elementaryStream=new Pt.ElementaryStream,n.timestampRolloverStream=new Pt.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Nt,n.captionStream=new Pt.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on(\\\"data\\\",function(r){var a;if(\\\"metadata\\\"===r.type){for(a=r.tracks.length;a--;)t||\\\"video\\\"!==r.tracks[a].type?i||\\\"audio\\\"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new wt(t,e),n.videoSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"videoSegmentStream\\\")),n.videoSegmentStream.on(\\\"timelineStartInfo\\\",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))}),n.videoSegmentStream.on(\\\"processedGopsInfo\\\",s.trigger.bind(s,\\\"gopInfo\\\")),n.videoSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"videoSegmentTimingInfo\\\")),n.videoSegmentStream.on(\\\"baseMediaDecodeTime\\\",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"videoTimingInfo\\\")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new kt(i,e),n.audioSegmentStream.on(\\\"log\\\",s.getLogTrigger_(\\\"audioSegmentStream\\\")),n.audioSegmentStream.on(\\\"timingInfo\\\",s.trigger.bind(s,\\\"audioTimingInfo\\\")),n.audioSegmentStream.on(\\\"segmentTimingInfo\\\",s.trigger.bind(s,\\\"audioSegmentTimingInfo\\\")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger(\\\"trackinfo\\\",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on(\\\"data\\\",this.trigger.bind(this,\\\"data\\\")),n.coalesceStream.on(\\\"id3Frame\\\",function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger(\\\"id3Frame\\\",e)}),n.coalesceStream.on(\\\"caption\\\",this.trigger.bind(this,\\\"caption\\\")),n.coalesceStream.on(\\\"done\\\",this.trigger.bind(this,\\\"done\\\")),$t(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Dt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger(\\\"log\\\",i)}},this.push=function(e){if(n){var t=Rt(e);t&&\\\"aac\\\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\\\"ts\\\"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Ct;var Vt,Wt,Gt,Xt,Yt,Kt,Qt,Jt={Transmuxer:xt},Zt=function(e){return e>>>0},ei=function(e){var t=\\\"\\\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=Zt,ii=ei,si=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=ii(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=si(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},ni=si,ri=Zt,ai=H.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},di=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),u=8;for(n&&(i.dataOffset=s.getInt32(u),u+=4),r&&d&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(u),u+=4),o&&(t.size=s.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(u):t.compositionTimeOffset=s.getUint32(u),u+=4),i.samples.push(t);return i},ui={tfdt:oi,trun:di},hi={parseTfdt:ui.tfdt,parseTrun:ui.trun},pi=function(e){for(var t=0,i=String.fromCharCode(e[t]),s=\\\"\\\";\\\"\\\\0\\\"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},mi=H.getUint64,gi=function(e,t){var i=\\\"\\\\0\\\"!==t.scheme_id_uri,s=0===e&&fi(t.presentation_time_delta)&&i,n=1===e&&fi(t.presentation_time)&&i;return!(e>1)&&s||n},fi=function(e){return void 0!==e||null!==e},yi={parseEmsgBox:function(e){var t,i,s,n,r,a,o,l=4,c=e[0];if(0===c)l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length,s=(d=new DataView(e.buffer)).getUint32(l),l+=4,r=d.getUint32(l),l+=4,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4;else if(1===c){var d;s=(d=new DataView(e.buffer)).getUint32(l),l+=4,n=mi(e.subarray(l)),l+=8,a=d.getUint32(l),l+=4,o=d.getUint32(l),l+=4,l+=(t=pi(e.subarray(l))).length,l+=(i=pi(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return gi(c,u)?u:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=\\\"undefined\\\"!=typeof window?window:void 0!==e?e:\\\"undefined\\\"!=typeof self?self:{},bi=Zt,_i=function(e){return(\\\"00\\\"+e.toString(16)).slice(-2)},Ti=ni,Si=ei,wi=yi,ki=li,xi=di,Ei=oi,Ci=H.getUint64,Ai=vi,Ii=ze.parseId3Frames;Vt=function(e){return Ti(e,[\\\"moov\\\",\\\"trak\\\"]).reduce(function(e,t){var i,s,n,r,a;return(i=Ti(t,[\\\"tkhd\\\"])[0])?(s=i[0],r=bi(i[n=0===s?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(a=Ti(t,[\\\"mdia\\\",\\\"mdhd\\\"])[0])?(n=0===(s=a[0])?12:20,e[r]=bi(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null},{})},Wt=function(e,t){var i=Ti(t,[\\\"moof\\\",\\\"traf\\\"]).reduce(function(t,i){var s,n=Ti(i,[\\\"tfhd\\\"])[0],r=bi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Ti(i,[\\\"tfdt\\\"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return\\\"bigint\\\"==typeof(s=1===o[0]?Ci(o.subarray(4,12)):l.getUint32(4))?c=s/Ai.BigInt(a):\\\"number\\\"!=typeof s||isNaN(s)||(c=s/a),c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),c<t&&(t=c),t},1/0);return\\\"bigint\\\"==typeof i||isFinite(i)?i:0},Gt=function(e,t){var i,s=Ti(t,[\\\"moof\\\",\\\"traf\\\"]),n=0,r=0;if(s&&s.length){var a=Ti(s[0],[\\\"tfhd\\\"])[0],o=Ti(s[0],[\\\"trun\\\"])[0],l=Ti(s[0],[\\\"tfdt\\\"])[0];if(a)i=ki(a).trackId;if(l)n=Ei(l).baseMediaDecodeTime;if(o){var c=xi(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;\\\"bigint\\\"==typeof n&&(r=Ai.BigInt(r),d=Ai.BigInt(d));var u=(n+r)/d;return\\\"bigint\\\"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Xt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"]),s=Ti(e,[\\\"tkhd\\\"]);t.forEach(function(e,t){var n,r,a=Si(e.subarray(8,12)),o=s[t];\\\"vide\\\"===a&&(r=0===(n=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(r))})}),i},Kt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Yt=function(e){var t=Ti(e,[\\\"moov\\\",\\\"trak\\\"]),i=[];return t.forEach(function(e){var t,s,n={},r=Ti(e,[\\\"tkhd\\\"])[0];r&&(s=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Ti(e,[\\\"mdia\\\",\\\"hdlr\\\"])[0];if(a){var o=Si(a.subarray(8,12));n.type=\\\"vide\\\"===o?\\\"video\\\":\\\"soun\\\"===o?\\\"audio\\\":o}var l=Ti(e,[\\\"mdia\\\",\\\"minf\\\",\\\"stbl\\\",\\\"stsd\\\"])[0];if(l){var c=l.subarray(8);n.codec=Si(c.subarray(4,8));var d,u=Ti(c,[n.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(n.codec)?(d=u.subarray(78),\\\"avcC\\\"===Si(d.subarray(4,8))&&d.length>11?(n.codec+=\\\".\\\",n.codec+=_i(d[9]),n.codec+=_i(d[10]),n.codec+=_i(d[11])):n.codec=\\\"avc1.4d400d\\\"):/^mp4[a,v]$/i.test(n.codec)?(d=u.subarray(28),\\\"esds\\\"===Si(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+=\\\".\\\"+_i(d[19]),n.codec+=\\\".\\\"+_i(d[20]>>>2&63).replace(/^0/,\\\"\\\")):n.codec=\\\"mp4a.40.2\\\"):n.codec=n.codec.toLowerCase())}var h=Ti(e,[\\\"mdia\\\",\\\"mdhd\\\"])[0];h&&(n.timescale=Kt(h)),i.push(n)}),i},Qt=function(e,t=0){return Ti(e,[\\\"emsg\\\"]).map(e=>{var i=wi.parseEmsgBox(new Uint8Array(e)),s=Ii(i.message_data);return{cueTime:wi.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:wi.scaleTime(i.event_duration,i.timescale),frames:s}})};var ji={findBox:Ti,parseType:Si,timescale:Vt,startTime:Wt,compositionStartTime:Gt,videoTrackIds:Xt,tracks:Yt,getTimescaleFromMediaHeader:Kt,getEmsgID3:Qt};const{parseTrun:Di}=hi,{findBox:Pi}=ji;var Li=vi,Oi={getMdatTrafPairs:function(e){var t=Pi(e,[\\\"moof\\\",\\\"traf\\\"]),i=Pi(e,[\\\"mdat\\\"]),s=[];return i.forEach(function(e,i){var n=t[i];s.push({mdat:e,traf:n})}),s},parseSamples:function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){var t=Di(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),\\\"bigint\\\"==typeof s?(e.pts=s+Li.BigInt(e.compositionTimeOffset),s+=Li.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(t)}),o}},Ni=pe.discardEmulationPreventionBytes,Mi=Ce.CaptionStream,Ri=ni,Ui=oi,Bi=li,{getMdatTrafPairs:Fi,parseSamples:qi}=Oi,$i=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},zi=function(e,t){var i={};return Fi(e).forEach(function(e){var s,n=e.mdat,r=e.traf,a=Ri(r,[\\\"tfhd\\\"]),o=Bi(a[0]),l=o.trackId,c=Ri(r,[\\\"tfdt\\\"]),d=c.length>0?Ui(c[0]).baseMediaDecodeTime:0,u=Ri(r,[\\\"trun\\\"]);t===l&&u.length>0&&(s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var c=e.subarray(n+1,n+1+r),d=$i(n,t);if(s={nalUnitType:\\\"sei_rbsp\\\",size:r,data:c,escapedRBSP:Ni(c),trackId:i},d)s.pts=d.pts,s.dts=d.dts,a=d;else{if(!a){l.logs.push({level:\\\"warn\\\",message:\\\"We've encountered a nal unit without data at \\\"+n+\\\" for trackId \\\"+i+\\\". See mux.js#223.\\\"});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s)}return l}(n,qi(u,d,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(s.seiNals),i[l].logs=i[l].logs.concat(s.logs))}),i},Hi=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Mi,a=!0,r=!!t&&t.isPartial,e.on(\\\"data\\\",function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on(\\\"log\\\",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\\\"object\\\"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=zi(e,t)[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}}(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Vi}=hi,Wi=ni,{getTimescaleFromMediaHeader:Gi}=ji,{parseSamples:Xi,getMdatTrafPairs:Yi}=Oi;var Ki=function(){let e=9e4;this.init=function(t){const i=Wi(t,[\\\"moov\\\",\\\"trak\\\",\\\"mdia\\\",\\\"mdhd\\\"])[0];i&&(e=Gi(i))},this.parseSegment=function(t){const i=[],s=Yi(t);let n=0;return s.forEach(function(t){const s=t.mdat,r=t.traf,a=Wi(r,[\\\"tfdt\\\"])[0],o=Wi(r,[\\\"tfhd\\\"])[0],l=Wi(r,[\\\"trun\\\"]);if(a){const e=Vi(a);n=e.baseMediaDecodeTime}if(l.length&&o){const t=Xi(l,n,o);let r=0;t.forEach(function(t){const n=new TextDecoder(\\\"utf-8\\\"),a=s.slice(r,r+t.size);if(Wi(a,[\\\"vtte\\\"])[0])return void(r+=t.size);Wi(a,[\\\"vttc\\\"]).forEach(function(s){const r=Wi(s,[\\\"payl\\\"])[0],a=Wi(s,[\\\"sttg\\\"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let c,d;if(r)try{c=n.decode(r)}catch(e){console.error(e)}if(a)try{d=n.decode(a)}catch(e){console.error(e)}t.duration&&c&&i.push({cueText:c,start:o,end:l,settings:d})}),r+=t.size})}}),i}},Qi=Ae,Ji=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Zi=function(e){return!!(64&e[1])},es=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},ts=function(e){switch(e){case 5:return\\\"slice_layer_without_partitioning_rbsp_idr\\\";case 6:return\\\"sei_rbsp\\\";case 7:return\\\"seq_parameter_set_rbsp\\\";case 8:return\\\"pic_parameter_set_rbsp\\\";case 9:return\\\"access_unit_delimiter_rbsp\\\";default:return null}},is={parseType:function(e,t){var i=Ji(e);return 0===i?\\\"pat\\\":i===t?\\\"pmt\\\":t?\\\"pes\\\":null},parsePat:function(e){var t=Zi(e),i=4+es(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Zi(e),s=4+es(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r<n;){var a=s+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Zi,parsePesType:function(e,t){switch(t[Ji(e)]){case Qi.H264_STREAM_TYPE:return\\\"video\\\";case Qi.ADTS_STREAM_TYPE:return\\\"audio\\\";case Qi.METADATA_STREAM_TYPE:return\\\"timed-metadata\\\";default:return null}},parsePesTime:function(e){if(!Zi(e))return null;var t=4+es(e);if(t>=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+es(e),i=e.subarray(t),s=0,n=0,r=!1;n<i.byteLength-3;n++)if(1===i[n+2]){s=n+5;break}for(;s<i.byteLength;)switch(i[s]){case 0:if(0!==i[s-1]){s+=2;break}if(0!==i[s-2]){s++;break}n+3!==s-2&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0);do{s++}while(1!==i[s]&&s<i.length);n=s-2,s+=3;break;case 1:if(0!==i[s-1]||0!==i[s-2]){s+=3;break}\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),n=s-2,s+=3;break;default:s+=3}return i=i.subarray(n),s-=n,n=0,i&&i.byteLength>3&&\\\"slice_layer_without_partitioning_rbsp_idr\\\"===ts(31&i[n+3])&&(r=!0),r}},ss=Ae,ns=Oe.handleRollover,rs={};rs.ts=is,rs.aac=Tt;var as=oe.ONE_SECOND_IN_TS,os=188,ls=71,cs=function(e,t,i){for(var s,n,r,a,o=0,l=os,c=!1;l<=e.byteLength;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o+=os,l+=os}for(o=(l=e.byteLength)-os,c=!1;o>=0;)if(e[o]!==ls||e[l]!==ls&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"audio\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"audio\\\",i.audio.push(a),c=!0);if(c)break;o-=os,l-=os}},ds=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,u=os,h=!1,p={data:[],size:0};u<e.byteLength;)if(e[d]!==ls||e[u]!==ls)d++,u++;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))if(n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&(r&&!h&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;if(rs.ts.videoPacketContainsKeyFrame(o)){var m=rs.ts.parsePesTime(o);m?(i.firstKeyFrame=m,i.firstKeyFrame.type=\\\"video\\\"):console.warn(\\\"Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.\\\")}p.size=0}p.data.push(s),p.size+=s.byteLength}if(h&&i.firstKeyFrame)break;d+=os,u+=os}for(d=(u=e.byteLength)-os,h=!1;d>=0;)if(e[d]!==ls||e[u]!==ls)d--,u--;else{if(s=e.subarray(d,u),\\\"pes\\\"===rs.ts.parseType(s,t.pid))n=rs.ts.parsePesType(s,t.table),r=rs.ts.parsePayloadUnitStartIndicator(s),\\\"video\\\"===n&&r&&(a=rs.ts.parsePesTime(s))&&(a.type=\\\"video\\\",i.video.push(a),h=!0);if(h)break;d-=os,u-=os}},us=function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=os;n<e.byteLength;)if(e[s]!==ls||e[n]!==ls)s++,n++;else{switch(i=e.subarray(s,n),rs.ts.parseType(i,t.pid)){case\\\"pat\\\":t.pid=rs.ts.parsePat(i);break;case\\\"pmt\\\":var r=rs.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach(function(e){t.table[e]=r[e]})}s+=os,n+=os}}(e,t),t.table){if(t.table.hasOwnProperty(s))switch(t.table[s]){case ss.H264_STREAM_TYPE:i.video=[],ds(e,t,i),0===i.video.length&&delete i.video;break;case ss.ADTS_STREAM_TYPE:i.audio=[],cs(e,t,i),0===i.audio.length&&delete i.audio}}return i},hs=function(e,t){var i;return i=rs.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(rs.aac.parseType(e,o)){case\\\"timed-metadata\\\":if(e.length-o<10){i=!0;break}if((a=rs.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=rs.aac.parseAacTimestamp(t)),o+=a;break;case\\\"audio\\\":if(e.length-o<7){i=!0;break}if((a=rs.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=rs.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=as/n;return{audio:[{type:\\\"audio\\\",dts:r,pts:r},{type:\\\"audio\\\",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):us(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=ns(e.dts,i),e.pts=ns(e.pts,i),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as})}if(e.video&&e.video.length){var s=t;if((void 0===s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach(function(e){e.dts=ns(e.dts,s),e.pts=ns(e.pts,s),e.dtsTime=e.dts/as,e.ptsTime=e.pts/as}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=ns(n.dts,s),n.pts=ns(n.pts,s),n.dtsTime=n.dts/as,n.ptsTime=n.pts/as}}}(i,t),i):null};class ps{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Jt.Transmuxer(this.options),function(e,t){t.on(\\\"data\\\",function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:\\\"data\\\",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])}),t.on(\\\"done\\\",function(t){e.postMessage({action:\\\"done\\\"})}),t.on(\\\"gopInfo\\\",function(t){e.postMessage({action:\\\"gopInfo\\\",gopInfo:t})}),t.on(\\\"videoSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"videoSegmentTimingInfo\\\",videoSegmentTimingInfo:i})}),t.on(\\\"audioSegmentTimingInfo\\\",function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:\\\"audioSegmentTimingInfo\\\",audioSegmentTimingInfo:i})}),t.on(\\\"id3Frame\\\",function(t){e.postMessage({action:\\\"id3Frame\\\",id3Frame:t})}),t.on(\\\"caption\\\",function(t){e.postMessage({action:\\\"caption\\\",caption:t})}),t.on(\\\"trackinfo\\\",function(t){e.postMessage({action:\\\"trackinfo\\\",trackInfo:t})}),t.on(\\\"audioTimingInfo\\\",function(t){e.postMessage({action:\\\"audioTimingInfo\\\",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"videoTimingInfo\\\",function(t){e.postMessage({action:\\\"videoTimingInfo\\\",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})}),t.on(\\\"log\\\",function(t){e.postMessage({action:\\\"log\\\",log:t})})}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new Hi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\\\"mp4Captions\\\",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ki);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:\\\"getMp4WebVttText\\\",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=ji.startTime(e,t);this.self.postMessage({action:\\\"probeMp4StartTime\\\",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=ji.tracks(e);this.self.postMessage({action:\\\"probeMp4Tracks\\\",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=ji.getEmsgID3(e,t);this.self.postMessage({action:\\\"probeEmsgID3\\\",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i=\\\"number\\\"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,s=hs(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:\\\"probeTs\\\",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:\\\"done\\\",type:\\\"transmuxed\\\"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:\\\"endedtimeline\\\",type:\\\"transmuxed\\\"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){\\\"init\\\"===e.data.action&&e.data.options?this.messageHandlers=new ps(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ps(self)),e.data&&e.data.action&&\\\"init\\\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}));var Zh=Yh(Jh);const ep=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:v,triggerSegmentEventFn:b}=e,_={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&(\\\"data\\\"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},u={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==c&&(u.videoFramePtsTime=c),i(u)})(i,_,a),\\\"trackinfo\\\"===i.data.action&&o(i.data.trackInfo),\\\"gopInfo\\\"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,_),\\\"audioTimingInfo\\\"===i.data.action&&l(i.data.audioTimingInfo),\\\"videoTimingInfo\\\"===i.data.action&&c(i.data.videoTimingInfo),\\\"videoSegmentTimingInfo\\\"===i.data.action&&d(i.data.videoSegmentTimingInfo),\\\"audioSegmentTimingInfo\\\"===i.data.action&&u(i.data.audioSegmentTimingInfo),\\\"id3Frame\\\"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),\\\"caption\\\"===i.data.action&&p(i.data.caption),\\\"endedtimeline\\\"===i.data.action&&(T=!1,g()),\\\"log\\\"===i.data.action&&f(i.data.log),\\\"transmuxed\\\"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:_,callback:m}),tp(t))))},t.onerror=()=>{const e={message:\\\"Received an error message from the transmuxer worker\\\",metadata:{errorType:bu.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hp({segment:v})}};m(null,e)},s&&t.postMessage({action:\\\"setAudioAppendStart\\\",appendStart:s}),Array.isArray(n)&&t.postMessage({action:\\\"alignGopsWith\\\",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:\\\"setRemux\\\",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;b({type:\\\"segmenttransmuxingstart\\\",segment:v}),t.postMessage({action:\\\"push\\\",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:\\\"endTimeline\\\"}),t.postMessage({action:\\\"flush\\\"})},tp=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\\\"function\\\"==typeof e.currentTransmux?e.currentTransmux():ep(e.currentTransmux))},ip=(e,t)=>{e.postMessage({action:t}),tp(e)},sp=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void ip(t,e);t.transmuxQueue.push(ip.bind(null,t,e))},np=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ep(e);e.transmuxer.transmuxQueue.push(e)};var rp=e=>{sp(\\\"reset\\\",e)},ap=e=>{const t=new Zh;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:\\\"init\\\",options:e}),t};const op=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=Vt({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener(\\\"message\\\",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener(\\\"message\\\",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},lp=2,cp=-101,dp=-102,up=\\\"wvtt\\\",hp=e=>{e.forEach(e=>{e.abort()})},pp=(e,t)=>{const{requestType:i}=t,s=ch({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:\\\"HLS request timed-out at URL: \\\"+t.uri,code:cp,xhr:t,metadata:s}:t.aborted?{status:t.status,message:\\\"HLS request aborted at URL: \\\"+t.uri,code:dp,xhr:t,metadata:s}:e?{status:t.status,message:\\\"HLS request errored at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:\\\"arraybuffer\\\"===t.responseType&&0===t.response.byteLength?{status:t.status,message:\\\"Empty HLS response at URL: \\\"+t.uri,code:lp,xhr:t,metadata:s}:null},mp=(e,t,i,s)=>(n,r)=>{const a=r.response,o=pp(n,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:\\\"Invalid HLS key at URL: \\\"+r.uri,code:lp,xhr:r},e);const l=new DataView(a),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=c;const d={uri:r.uri};return s({type:\\\"segmentkeyloadcomplete\\\",segment:e,keyInfo:d}),i(null,e)},gp=(e,t)=>{const i=Zr(e.map.bytes);if(\\\"mp4\\\"!==i){const s=e.map.resolvedUri||e.map.uri,n=i||\\\"unknown\\\";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:lp,metadata:{mediaType:n}})}op({action:\\\"probeMp4Tracks\\\",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,\\\"number\\\"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),\\\"text\\\"===t.type&&((e,t)=>{t===up&&e.transmuxer.postMessage({action:\\\"initMp4WebVttParser\\\",data:e.map.bytes})})(e,t.codec))}),t(null))})},fp=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:s})=>(n,r)=>{const a=pp(n,r);if(a)return t(a,e);s({type:\\\"segmentloaded\\\",segment:e});const o=\\\"arraybuffer\\\"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},yp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{const m=e.map&&e.map.tracks||{},g=Boolean(m.audio&&m.video);let f=s.bind(null,e,\\\"audio\\\",\\\"start\\\");const y=s.bind(null,e,\\\"audio\\\",\\\"end\\\");let v=s.bind(null,e,\\\"video\\\",\\\"start\\\");const b=s.bind(null,e,\\\"video\\\",\\\"end\\\");op({action:\\\"probeTs\\\",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const m=s.result;m&&(i(e,{hasAudio:m.hasAudio,hasVideo:m.hasVideo,isMuxed:g}),i=null),np({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,d(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),n(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:\\\"segmenttransmuxingtiminginfoavailable\\\",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type=\\\"combined\\\"===t.type?\\\"video\\\":t.type,p({type:\\\"segmenttransmuxingcomplete\\\",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},vp=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=new Uint8Array(t);if(function(e){return Rr(e,[\\\"moof\\\"]).length>0}(m)){e.isFmp4=!0;const{tracks:n}=e.map;if(n.text&&(!n.audio||!n.video))return d(e,{data:m,type:\\\"text\\\"}),void((e,t,i)=>{t===up&&op({action:\\\"getMp4WebVttText\\\",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:s})=>{e.bytes=t,i(null,e,{mp4VttCues:s})}})})(e,n.text.codec,u);const r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&\\\"enca\\\"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&\\\"encv\\\"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:m,type:r.hasAudio&&!r.isMuxed?\\\"audio\\\":\\\"video\\\"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};return void op({action:\\\"probeMp4StartTime\\\",timescales:e.map.timescales,data:m,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=m=i,r.hasAudio&&!r.isMuxed&&s(e,\\\"audio\\\",\\\"start\\\",a),r.hasVideo&&s(e,\\\"video\\\",\\\"start\\\",a),op({action:\\\"probeEmsgID3\\\",data:m,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=m=i,n.video&&i.byteLength&&e.transmuxer?op({action:\\\"pushMp4Captions\\\",endAction:\\\"mp4Captions\\\",transmuxer:e.transmuxer,data:m,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=m=i.data,i.logs.forEach(function(e){h(Cu(e,{stream:\\\"mp4CaptionParser\\\"}))}),l(i.captions,s)}}):l(void 0,s)}})}})}if(e.transmuxer){if(void 0===e.container&&(e.container=Zr(m)),\\\"ts\\\"!==e.container&&\\\"aac\\\"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});yp({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})}else u(null,e,{})},bp=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s,segment:n,doneFn:r},a){const o=t=>{if(t.data.source===e){s.removeEventListener(\\\"message\\\",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;s.onerror=()=>{const e=\\\"An error occurred in the decryption worker\\\",t=Hp({segment:n}),i={message:e,metadata:{error:new Error(e),errorType:bu.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};r(i,n)},s.addEventListener(\\\"message\\\",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Dh({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},_p=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{let m=0,g=!1;return(f,y)=>{if(!g){if(f)return g=!0,hp(e),u(f,y);if(m+=1,m===e.length){const m=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})=>{p({type:\\\"segmentdecryptionstart\\\"}),bp({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:\\\"segmentdecryptioncomplete\\\",segment:t}),vp({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})})})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p});vp({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:\\\"segmentdecryptionstart\\\",segment:y}),bp({decryptionWorker:t,id:y.requestId+\\\"-init\\\",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:u},t=>{y.map.bytes=t,p({type:\\\"segmentdecryptioncomplete\\\",segment:y}),gp(y,t=>{if(t)return hp(e),u(t,y);m()})});m()}}}},Tp=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=Cu(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Sp=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{const v=[],b=_p({activeXhrs:v,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Cu(t,{uri:s.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),r=mp(s,i,b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.key.resolvedUri}});const a=e(n,r);v.push(a)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=Cu(t,{uri:s.map.key.resolvedUri,responseType:\\\"arraybuffer\\\",requestType:\\\"segment-key\\\"}),n=mp(s,[s.map.key],b,y);y({type:\\\"segmentkeyloadstart\\\",segment:s,keyInfo:{uri:s.map.key.resolvedUri}});const r=e(i,n);v.push(r)}const i=Cu(t,{uri:s.map.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s.map),requestType:\\\"segment-media-initialization\\\"}),n=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(s,n)=>{const r=pp(s,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(i({type:\\\"segmentloaded\\\",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,gp(e,function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)})})({segment:s,finishProcessingFn:b,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const r=e(i,n);v.push(r)}const _=Cu(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:\\\"arraybuffer\\\",headers:Ch(s),requestType:\\\"segment\\\"}),T=fp({segment:s,finishProcessingFn:b,responseType:_.responseType,triggerSegmentEventFn:y});y({type:\\\"segmentloadstart\\\",segment:s});const S=e(_,T);S.addEventListener(\\\"progress\\\",Tp({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:p,dataFn:m})),v.push(S);const w={};return v.forEach(e=>{e.addEventListener(\\\"loadend\\\",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:w,abortFn:n}))}),()=>hp(v)},wp=Eu(\\\"PlaylistSelector\\\"),kp=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\\\"\\\"})},xp=function(e,t){if(!e)return\\\"\\\";const i=Le.getComputedStyle(e);return i?i[t]:\\\"\\\"},Ep=function(e,t){const i=e.slice();e.sort(function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n})},Cp=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Le.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Le.Number.MAX_VALUE,i-s};let Ap=function(e){const{main:t,bandwidth:i,playerWidth:s,playerHeight:n,playerObjectFit:r,limitRenditionByPlayerDimensions:a,playlistController:o}=e;if(!t)return;const l={bandwidth:i,width:s,height:n,limitRenditionByPlayerDimensions:a};let c=t.playlists;th.isAudioOnly(t)&&(c=o.getAudioTrackPlaylists_(),l.audioOnly=!0);let d=c.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Le.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Ep(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!th.isIncompatible(e.playlist));let u=d.filter(e=>th.isEnabled(e.playlist));u.length||(u=d.filter(e=>!th.isDisabled(e.playlist)));const h=u.filter(e=>e.bandwidth*Gh.BANDWIDTH_VARIANCE<i);let p=h[h.length-1];const m=h.filter(e=>e.bandwidth===p.bandwidth)[0];if(!1===a){const e=m||u[0]||d[0];if(e&&e.playlist){let t=\\\"sortedPlaylistReps\\\";return m&&(t=\\\"bandwidthBestRep\\\"),u[0]&&(t=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(e)} using ${t} with options`,l),e.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null}const g=h.filter(e=>e.width&&e.height);Ep(g,(e,t)=>e.width-t.width);const f=g.filter(e=>e.width===s&&e.height===n);p=f[f.length-1];const y=f.filter(e=>e.bandwidth===p.bandwidth)[0];let v,b,_,T;if(y||(v=g.filter(e=>\\\"cover\\\"===r?e.width>s&&e.height>n:e.width>s||e.height>n),b=v.filter(e=>e.width===v[0].width&&e.height===v[0].height),p=b[b.length-1],_=b.filter(e=>e.bandwidth===p.bandwidth)[0]),o.leastPixelDiffSelector){const e=g.map(e=>(e.pixelDiff=Math.abs(e.width-s)+Math.abs(e.height-n),e));Ep(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),T=e[0]}const S=T||_||y||m||u[0]||d[0];if(S&&S.playlist){let e=\\\"sortedPlaylistReps\\\";return T?e=\\\"leastPixelDiffRep\\\":_?e=\\\"resolutionPlusOneRep\\\":y?e=\\\"resolutionBestRep\\\":m?e=\\\"bandwidthBestRep\\\":u[0]&&(e=\\\"enabledPlaylistReps\\\"),wp(`choosing ${kp(S)} using ${e} with options`,l),S.playlist}return wp(\\\"could not choose a playlist with options\\\",l),null};const Ip=function(){let e=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Ap({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*e,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*e,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function jp(e){try{return new URL(e).pathname.split(\\\"/\\\").slice(-2).join(\\\"/\\\")}catch(e){return\\\"\\\"}}const Dp=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Le.WebKitDataCue||Le.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach(e=>{const t=e.cueTime+i;!(\\\"number\\\"!=typeof t||Le.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||\\\"\\\");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(bu.log.warn(\\\"cue.frame.id is deprecated. Use cue.value.key instead.\\\"),e.value.key)},value:{get:()=>(bu.log.warn(\\\"cue.frame.value is deprecated. Use cue.value.data instead.\\\"),e.value.data)},privateData:{get:()=>(bu.log.warn(\\\"cue.frame.privateData is deprecated. Use cue.value.data instead.\\\"),e.value.data)}})}(i),r.addCue(i)})}),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e<a.length;e++)a[e]&&o.push(a[e]);const l=o.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=l[e],n=isFinite(s)?s:e,r=Number(c[t+1])||n;i.forEach(e=>{e.endTime=r})})},Pp={id:\\\"ID\\\",class:\\\"CLASS\\\",startDate:\\\"START-DATE\\\",duration:\\\"DURATION\\\",endDate:\\\"END-DATE\\\",endOnNext:\\\"END-ON-NEXT\\\",plannedDuration:\\\"PLANNED-DURATION\\\",scte35Out:\\\"SCTE35-OUT\\\",scte35In:\\\"SCTE35-IN\\\"},Lp=new Set([\\\"id\\\",\\\"class\\\",\\\"startDate\\\",\\\"duration\\\",\\\"endDate\\\",\\\"endOnNext\\\",\\\"startTime\\\",\\\"endTime\\\",\\\"processDateRange\\\"]),Op=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"Timed Metadata\\\"},!1).track,bu.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Np=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},Mp=e=>\\\"number\\\"==typeof e&&isFinite(e),Rp=1/60,Up=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,u=o.length-1;let h=\\\"mediaIndex/partIndex increment\\\";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h=\\\"getSyncSegmentCandidate (isSyncRequest)\\\"),e.independent&&(h+=` with independent ${e.independent}`);const p=\\\"number\\\"==typeof c,m=e.segment.uri?\\\"segment\\\":\\\"pre-segment\\\",g=p?qu({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+u}]`+(p?` part [${c}/${g}]`:\\\"\\\")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:\\\"\\\")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${h}]`+` playlist [${a}]`},Bp=e=>`${e}TimingInfo`,Fp=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if(\\\"audio\\\"===s){const t=e.lastTimelineChange({type:\\\"main\\\"});return!t||t.to!==i}if(\\\"main\\\"===s&&n){const t=e.pendingTimelineChange({type:\\\"audio\\\"});return!t||t.to!==i}return!1},qp=e=>{const t=e.pendingSegment_;if(!t)return;if(Fp({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:\\\"audio\\\"}),i=e.pendingTimelineChange({type:\\\"main\\\"}),s=t&&i,n=s&&t.to!==i.to;return!(!s||-1===t.from||-1===i.from||!n)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:\\\"audio\\\"}),i=e.timelineChangeController_.pendingTimelineChange({type:\\\"main\\\"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger(\\\"audioTimelineBehind\\\");e.timelineChangeController_.trigger(\\\"fixBadTimelineChange\\\")}},$p=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Iu,zp=(e,t)=>{if(\\\"hls\\\"!==t)return null;const i=(e=>{let t=0;return[\\\"video\\\",\\\"audio\\\"].forEach(function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;\\\"bigint\\\"==typeof n||\\\"bigint\\\"==typeof r?a=Le.BigInt(r)-Le.BigInt(n):\\\"number\\\"==typeof n&&\\\"number\\\"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)}),\\\"bigint\\\"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=$p({segmentDuration:i,maxDuration:2*s}),r=$p({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?\\\"warn\\\":\\\"info\\\",message:a}:null},Hp=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),n=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:n,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class Vp extends bu.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError(\\\"Initialization settings are required\\\");if(\\\"function\\\"!=typeof e.currentTime)throw new TypeError(\\\"No currentTime getter specified\\\");if(!e.mediaSource)throw new TypeError(\\\"No MediaSource specified\\\");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_=\\\"INIT\\\",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger(\\\"syncinfoupdate\\\"),this.syncController_.on(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener(\\\"sourceopen\\\",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Eu(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,\\\"state\\\",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger(\\\"statechange\\\"))}}),this.sourceUpdater_.on(\\\"ready\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),this.sourceUpdater_.on(\\\"codecschange\\\",e=>{this.trigger(Vt({type:\\\"codecschange\\\"},e))}),\\\"main\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"pendingtimelinechange\\\",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}),\\\"audio\\\"===this.loaderType_&&this.timelineChangeController_.on(\\\"timelinechange\\\",e=>{this.trigger(Vt({type:\\\"timelinechange\\\"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qp(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ap({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger(\\\"dispose\\\"),this.state=\\\"DISPOSED\\\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\\\"syncinfoupdate\\\",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(\\\"WAITING\\\"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Le.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return\\\"APPENDING\\\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\\\"READY\\\",!0)}error(e){return void 0!==e&&(this.logger_(\\\"error occurred:\\\",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&rp(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\\\"ended\\\")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Au();if(\\\"main\\\"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Lh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return\\\"INIT\\\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\\\"READY\\\"!==this.state&&\\\"INIT\\\"!==this.state||(this.state=\\\"READY\\\"))}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\\\"INIT\\\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\\\"main\\\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\\\\ncurrentTime: ${this.currentTime_()}\\\\nbufferedEnd: ${Mu(this.buffered_())}\\\\n`,this.mediaSequenceSync_.diagnostics)),this.trigger(\\\"syncinfoupdate\\\"),\\\"INIT\\\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&\\\"number\\\"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger(\\\"playlistupdate\\\")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),this.transmuxer_.postMessage({action:\\\"reset\\\"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&rp(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;\\\"hls\\\"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}remove(e,t,i=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_(\\\"skipping remove because end ${end} is <= start ${start}\\\");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_(\\\"skipping remove because no source updater or starting media info\\\");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||\\\"main\\\"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*ea.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*ea.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)Np(e,t,this.inbandTextTracks_[i]);Np(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){\\\"READY\\\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Le.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Le.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentselected\\\",metadata:t}),\\\"number\\\"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=\\\"number\\\"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&\\\"open\\\"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Mu(e)||0,i=Ru(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i=\\\"number\\\"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,s;const n=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\\\\nFor TargetTime: ${n}.\\\\nCurrentTime: ${this.currentTime_()}\\\\nBufferedEnd: ${t}\\\\nFetch At Buffer: ${this.fetchAtBuffer_}\\\\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(n);if(!t){const e=\\\"No sync info found while using media sequence sync\\\";return this.error({message:e,metadata:{errorType:bu.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_(\\\"chooseNextRequest_ - no sync info found using media sequence sync\\\"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\\\\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,s=t.start}else{this.logger_(\\\"chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.\\\");const t=th.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,s=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${n}`:`currentTime ${n}`,a.mediaIndex=e,a.startOfSegment=s,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&\\\"number\\\"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||\\\"number\\\"==typeof a.partIndex&&!l)return null;\\\"number\\\"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent=\\\"previous segment\\\")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent=\\\"previous part\\\");const d=this.mediaSource_&&\\\"ended\\\"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_(\\\"choose next request. Force timestamp offset after loader resync\\\")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const s=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return s?(s.isAppended&&this.logger_(\\\"getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!\\\"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d=\\\"number\\\"==typeof a&&c.parts[a],u={requestId:\\\"segment-loader-\\\"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Mu(this.sourceUpdater_.audioBuffered());return\\\"number\\\"==typeof p&&(u.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*ea.ONE_SECOND_IN_TS);let n;for(n=0;n<e.length&&!(e[n].pts>s);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=th.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,c=t.playlists.filter(e=>!th.isIncompatible(e));let d=c.filter(th.isEnabled);d.length||(d=c.filter(e=>!th.isDisabled(e)));const u=d.filter(th.hasAttribute.bind(null,\\\"BANDWIDTH\\\")).map(e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:th.estimateSegmentRequestTime(r,s,e)*t-a}}),h=u.filter(e=>e.rebufferingImpact<=0);return Ep(h,(e,t)=>Cp(t.playlist,e.playlist)),h.length?h[0]:(Ep(u,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=Iu&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Gh.BANDWIDTH_VARIANCE+1,this.trigger(\\\"earlyabort\\\"))}handleAbort_(e){this.logger_(`Aborting ${Up(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\\\"progress\\\")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:s}=t,n={segmentInfo:Hp({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:s}};this.trigger({type:\\\"segmenttransmuxingtrackinfoavailable\\\",metadata:n}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\\\"trackinfo update\\\",t),this.trigger(\\\"trackinfo\\\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Bp(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qp(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_(\\\"SegmentLoader received no captions from a caption event\\\");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:\\\"usage\\\",name:\\\"vhs-608\\\"});let s=i;/^cc708_/.test(i)&&(s=\\\"SERVICE\\\"+i.split(\\\"_\\\")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:\\\"captions\\\",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),Np(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align=\\\"left\\\",a.position=r.position,a.positionAlign=\\\"line-left\\\",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})}({captionArray:r,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearParsedMp4Captions\\\"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if(\\\"audio\\\"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Fp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return qp(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),\\\"closed\\\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\\\"fmp4\\\"),i.timingInfo.start=i[Bp(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t=\\\"main\\\"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_(\\\"sync segment was incorrect, not appending\\\");this.logger_(\\\"sync segment was correct, appending\\\")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){\\\"main\\\"!==this.loaderType_||\\\"number\\\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Ph(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \\\"+Nu(n).join(\\\", \\\")),r.length>1&&this.logger_(\\\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \\\"+Nu(r).join(\\\", \\\"));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Nu(n).join(\\\", \\\")}, video buffer: ${Nu(r).join(\\\", \\\")}, `),this.error({message:\\\"Quota exceeded error with append of a single segment of content\\\",excludeUntil:1/0}),void this.trigger(\\\"error\\\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\\\"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Le.setTimeout(()=>{this.logger_(\\\"On QUOTA_EXCEEDED_ERR, re-processing call queue\\\"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_(\\\"Received non QUOTA_EXCEEDED_ERR on append\\\",s),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:bu.Error.StreamingFailedToAppendSegment}}),this.trigger(\\\"appenderror\\\")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t})({bytes:t,segments:e})}const r={segmentInfo:Hp({type:this.loaderType_,segment:e})};this.trigger({type:\\\"segmentappendstart\\\",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if(\\\"audio\\\"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){if(this.state=\\\"WAITING\\\",this.pendingSegment_=e,this.trimBackBuffer_(e),\\\"number\\\"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\\\"clearAllMp4Captions\\\"}),!this.hasEnoughInfoToLoad_())return qp(this),void this.loadQueue_.push(()=>{const t=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\\\"reset\\\"}),this.transmuxer_.postMessage({action:\\\"setTimestampOffset\\\",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting\\\\n${jp(e.uri)}\\\\n${Up(e)}`),t.map&&!t.map.bytes&&(this.logger_(\\\"going to request init segment.\\\"),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sp({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"video\\\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\\\"audio\\\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_(\\\"received endedtimeline callback\\\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Up(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:n})=>{const r={segmentInfo:Hp({segment:t})};i&&(r.keyInfo=i),s&&(r.trackInfo=s),n&&(r.timingInfo=n),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-Gh.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,n=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:n},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Rp)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:\\\"bandwidthupdated\\\",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"timeout\\\")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state=\\\"READY\\\",e.code===dp)return;return this.pause(),e.code===cp?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\\\"error\\\"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n<e.length&&!(e[n].pts>=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){\\\"number\\\"==typeof e.start&&\\\"number\\\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&(\\\"main\\\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:\\\"No starting media returned, likely due to an unsupported media format.\\\",playlistExclusionDuration:1/0}),void this.trigger(\\\"error\\\");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r=\\\"main\\\"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\\\"number\\\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>\\\"main\\\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\\\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\\\":!t.hasVideo&&i.hasVideo?\\\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\\\":null:\\\"Neither audio nor video found in segment.\\\":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger(\\\"error\\\"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||\\\"number\\\"!=typeof e.timingInfo.start||e.changedTimestampOffset||\\\"main\\\"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\\\"timestampoffset\\\")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&\\\"number\\\"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&\\\"number\\\"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i=\\\"main\\\"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=\\\"number\\\"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Hp({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:\\\"appendsdone\\\",metadata:e})}if(!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\\\"main\\\"===this.loaderType_});const t=zp(e,this.sourceType_);if(t&&(\\\"warn\\\"===t.severity?bu.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\\\"READY\\\",e.isSyncRequest&&(this.trigger(\\\"syncinfoupdate\\\"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Up(e)}`);this.logger_(`Appended ${Up(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\\\"main\\\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\\\"audio\\\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\\\"syncinfoupdate\\\");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?\\\"segment\\\":\\\"part\\\"} ${Up(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger(\\\"bandwidthupdate\\\"),this.trigger(\\\"progress\\\"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger(\\\"appended\\\"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Rp)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Mp(i)||!Mp(s))return;Np(i,s,this.segmentMetadataTrack_);const n=Le.WebKitDataCue||Le.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},a=new n(i,s,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Wp(){}const Gp=function(e){return\\\"string\\\"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xp=[\\\"video\\\",\\\"audio\\\"],Yp=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kp=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if(\\\"mediaSource\\\"!==s.type){if(\\\"mediaSource\\\"!==e&&t.ready()&&\\\"closed\\\"!==t.mediaSource.readyState&&!Yp(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if(\\\"mediaSource\\\"===s.type)return null;if(s.type===e)return i}return null})(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void Kp(e,t))}}else t.updating()||\\\"closed\\\"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),Kp(\\\"audio\\\",t),Kp(\\\"video\\\",t))},Qp=(e,t)=>{const i=t[`${e}Buffer`],s=Gp(e);i&&(i.removeEventListener(\\\"updateend\\\",t[`on${s}UpdateEnd_`]),i.removeEventListener(\\\"error\\\",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Jp=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Zp=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(Jp(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?\\\"(QUOTA_EXCEEDED_ERR) \\\":\\\"\\\")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},em=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(Jp(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},tm=e=>(t,i)=>{const s=i[`${t}Buffer`];Jp(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},im=e=>(t,i)=>{e()},sm=e=>t=>{if(\\\"open\\\"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||\\\"\\\"})`);try{t.mediaSource.endOfStream(e)}catch(e){bu.log.warn(\\\"Failed to call media source endOfStream\\\",e)}}},nm=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){bu.log.warn(\\\"Failed to set media source duration\\\",e)}},rm=()=>(e,t)=>{if(\\\"open\\\"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Jp(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){bu.log.warn(`Failed to abort on ${e}Buffer`,t)}}},am=(e,t)=>i=>{const s=Gp(e),n=pi(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener(\\\"updateend\\\",i[`on${s}UpdateEnd_`]),r.addEventListener(\\\"error\\\",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},om=e=>t=>{const i=t[`${e}Buffer`];if(Qp(e,t),Jp(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){bu.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},lm=e=>(t,i)=>{const s=i[`${t}Buffer`],n=pi(e);if(!Jp(i.mediaSource,s))return;const r=e.substring(0,e.indexOf(\\\".\\\")),a=i.codecs[t];if(a.substring(0,a.indexOf(\\\".\\\"))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:\\\"codecschange\\\",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(e){o.errorType=bu.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger(\\\"error\\\"),bu.log.warn(`Failed to changeType on ${t}Buffer`,e)}},cm=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),Kp(e,t)},dm=(e,t)=>i=>{const s=function(e){if(0===e.length)return\\\"Buffered Ranges are empty\\\";let t=\\\"Buffered Ranges: \\\\n\\\";for(let i=0;i<e.length;i++){const s=e.start(i),n=e.end(i);t+=`${s} --\\\\x3e ${n}. Duration (${n-s})\\\\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received \\\"updateend\\\" event for ${e} Source Buffer: `,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kp(e,t)};class um extends bu.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kp(\\\"mediaSource\\\",this),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.logger_=Eu(\\\"SourceUpdater\\\"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=dm(\\\"video\\\",this),this.onAudioUpdateEnd_=dm(\\\"audio\\\",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\\\"createdsourcebuffers\\\"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\\\"ready\\\"))}addSourceBuffer(e,t){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:am(e,t),name:\\\"addSourceBuffer\\\"})}abort(e){cm({type:e,sourceUpdater:this,action:rm(e),name:\\\"abort\\\"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:om(e),name:\\\"removeSourceBuffer\\\"}):bu.log.error(\\\"removeSourceBuffer is not supported!\\\")}canRemoveSourceBuffer(){return!bu.browser.IS_FIREFOX&&Le.MediaSource&&Le.MediaSource.prototype&&\\\"function\\\"==typeof Le.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Le.SourceBuffer&&Le.SourceBuffer.prototype&&\\\"function\\\"==typeof Le.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cm({type:e,sourceUpdater:this,action:lm(t),name:\\\"changeType\\\"}):bu.log.error(\\\"changeType is not supported!\\\")}addOrChangeSourceBuffers(e){if(!e||\\\"object\\\"!=typeof e||0===Object.keys(e).length)throw new Error(\\\"Cannot addOrChangeSourceBuffers to undefined codecs\\\");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,\\\"audio\\\"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(cm({type:s,sourceUpdater:this,action:Zp(n,i||{mediaIndex:-1},t),doneFn:t,name:\\\"appendBuffer\\\"}),\\\"video\\\"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Jp(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Au()}videoBuffered(){return Jp(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Au()}buffered(){const e=Jp(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Jp(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Au();let o=e.length;for(;o--;)r.push({time:e.start(o),type:\\\"start\\\"}),r.push({time:e.end(o),type:\\\"end\\\"});for(o=t.length;o--;)r.push({time:t.start(o),type:\\\"start\\\"}),r.push({time:t.end(o),type:\\\"end\\\"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)\\\"start\\\"===r[o].type?(n++,2===n&&(i=r[o].time)):\\\"end\\\"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Au(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Wp){cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:nm(e),name:\\\"duration\\\",doneFn:t})}endOfStream(e=null,t=Wp){\\\"string\\\"!=typeof e&&(e=void 0),cm({type:\\\"mediaSource\\\",sourceUpdater:this,action:sm(e),name:\\\"endOfStream\\\",doneFn:t})}removeAudio(e,t,i=Wp){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?cm({type:\\\"audio\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}removeVideo(e,t,i=Wp){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?cm({type:\\\"video\\\",sourceUpdater:this,action:em(e,t),doneFn:i,name:\\\"remove\\\"}):i()}updating(){return!(!Yp(\\\"audio\\\",this)&&!Yp(\\\"video\\\",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(cm({type:\\\"audio\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(cm({type:\\\"video\\\",sourceUpdater:this,action:tm(e),name:\\\"timestampOffset\\\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&cm({type:\\\"audio\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}videoQueueCallback(e){this.videoBuffer&&cm({type:\\\"video\\\",sourceUpdater:this,action:im(e),name:\\\"callback\\\"})}dispose(){this.trigger(\\\"dispose\\\"),Xp.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Qp(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.sourceopenListener_),this.off()}}const hm=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),pm=new Uint8Array(\\\"\\\\n\\\\n\\\".split(\\\"\\\").map(e=>e.charCodeAt(0)));class mm extends Error{constructor(){super(\\\"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.\\\")}}class gm extends Vp{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Au();const e=this.subtitlesTrack_.cues;return Au([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ph(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=pm.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(pm,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state=\\\"READY\\\",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,\\\"INIT\\\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Np(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state=\\\"READY\\\",this.paused()||this.monitorBuffer_()};return this.syncController_.one(\\\"timestampoffset\\\",e),void(this.state=\\\"WAITING_ON_TIMELINE\\\")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state=\\\"READY\\\",this.pause(),this.trigger(\\\"error\\\")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state=\\\"READY\\\");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\\\"READY\\\",void(this.mediaRequestsAborted+=1);if(e)return e.code===cp&&this.handleTimeout_(),e.code===dp?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_,n=i.mp4VttCues&&i.mp4VttCues.length;n&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state=\\\"APPENDING\\\",this.trigger(\\\"appending\\\");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,\\\"function\\\"!=typeof Le.WebVTT&&\\\"function\\\"==typeof this.loadVttJs)return this.state=\\\"WAITING_ON_VTTJS\\\",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:\\\"Error loading vtt.js\\\"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:bu.Error.StreamingVttParserError,error:e}})}if(n||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger(\\\"syncinfoupdate\\\"),this.pendingSegment_=null,void(this.state=\\\"READY\\\");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new Le.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&\\\"vtt\\\"===e.type,s=t&&\\\"text\\\"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(i=>{const s=i.start+t,n=i.end+t,r=new Le.VTTCue(s,n,i.cueText);i.settings&&i.settings.split(\\\" \\\").forEach(e=>{const t=e.split(\\\":\\\"),i=t[0],s=t[1];r[i]=isNaN(s)?s:Number(s)}),e.cues.push(r)})}parseVTTCues_(e){let t,i=!1;if(\\\"function\\\"!=typeof Le.WebVTT)throw new mm;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);\\\"function\\\"==typeof Le.TextDecoder?t=new Le.TextDecoder(\\\"utf8\\\"):(t=Le.WebVTT.StringDecoder(),i=!0);const s=new Le.WebVTT.Parser(Le,Le.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{bu.log.warn(\\\"Error encountered when parsing cues: \\\"+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=hm(t)),s.parse(t)}let n=e.bytes;i&&(n=hm(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/ea.ONE_SECOND_IN_TS-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*ea.ONE_SECOND_IN_TS;const s=t*ea.ONE_SECOND_IN_TS;let n;for(n=s<i?-8589934592:8589934592;Math.abs(i-s)>4294967296;)i+=n;return i/ea.ONE_SECOND_IN_TS}}const fm=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const s=i[e];if(t>=s.adStartTime&&t<=s.adEndTime)return s}return null};class ym{constructor({start:e,end:t,segmentIndex:i,partIndex:s=null,appended:n=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=s,this.appended_=n}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class vm{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class bm{constructor(){this.storage_=new Map,this.diagnostics_=\\\"\\\",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(i,s),this.isReliable_)return this.updateStorage_(s,i,this.calculateBaseTime_(i,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const s=new Map;let n=\\\"\\\\n\\\",r=i,a=t;this.start_=r,e.forEach((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,c=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),d=new ym({start:o,end:l,appended:c,segmentIndex:t});e.syncInfo=d;let u=r;const h=(e.parts||[]).map((e,s)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[s]&&i.partsSyncInfo[s].isAppended),c=new ym({start:r,end:o,appended:l,segmentIndex:t,partIndex:s});return u=o,n+=`Media Sequence: ${a}.${s} | Range: ${r} --\\\\x3e ${o} | Appended: ${l}\\\\n`,e.syncInfo=c,c});s.set(a,new vm(d,h)),n+=`${jp(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\\\\x3e ${l} | Appended: ${c}\\\\n`,a++,r=l}),this.end_=r,this.storage_=s,this.diagnostics_=n}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const i=s-e;let n=this.storage_.get(s).segmentSyncInfo.start;for(let e=0;e<i;e++){n-=t[e].duration}return n}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class _m extends bm{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Tm=[{name:\\\"VOD\\\",run:(e,t,i,s,n)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:\\\"MediaSequence\\\",run:(e,t,i,s,n,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:\\\"ProgramDateTime\\\",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Bu(t);n=n||0;for(let i=0;i<o.length;i++){const s=o[t.endList||0===n?i:o.length-(i+1)],l=s.segment,c=e.timelineToDatetimeMappings[l.timeline];if(!c||!l.dateTimeObject)continue;let d=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&\\\"number\\\"==typeof s.partIndex)for(let e=0;e<s.partIndex;e++)d+=l.parts[e].duration;const u=Math.abs(n-d);if(null!==a&&(0===u||a<u))break;a=u,r={time:d,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:\\\"Segment\\\",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Bu(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===n?e:o.length-(e+1)],l=i.segment,c=i.part&&i.part.start||l&&l.start;if(l.timeline===s&&void 0!==c){const e=Math.abs(n-c);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:\\\"Discontinuity\\\",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:\\\"Playlist\\\",run:(e,t,i,s,n)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class Sm extends bu.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new bm,i=new _m(t),s=new _m(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Eu(\\\"SyncController\\\")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,n){if(t!==1/0){return Tm.find(({name:e})=>\\\"VOD\\\"===e).run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:n}=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${n}. Current time: ${s}. selected segment: ${r}. Time: [${o} -> ${l}]}`),s>=o&&s<l)return this.logger_(\\\"Found sync point with exact match: \\\",i),i}return this.selectSyncPoint_(r,{key:\\\"time\\\",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:\\\"segmentIndex\\\",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Vu({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Tm.length;a++){const o=Tm[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(\\\"number\\\"==typeof i.partIndex?`,partIndex:${i.partIndex}`:\\\"\\\")+\\\"]\\\"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)bu.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger(\\\"syncinfoupdate\\\");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if(\\\"number\\\"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger(\\\"timestampoffset\\\"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Vu({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger(\\\"dispose\\\"),this.off()}}class wm extends bu.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger(\\\"pendingtimelinechange\\\")}pendingTimelineChange({type:e,from:t,to:i}){return\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger(\\\"pendingtimelinechange\\\")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(\\\"number\\\"==typeof t&&\\\"number\\\"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:i}};this.trigger({type:\\\"timelinechange\\\",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger(\\\"dispose\\\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const km=Kh(Qh(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on(\\\"data\\\",function(t){e.push(t)})},e}();\\n/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,s,n;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],c=[];let d,u,h,p,m,g;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[u=l[d=l[a]]],g=16843009*h^65537*u^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error(\\\"Invalid aes key size\\\");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o===0||8===o&&i%o===4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],u=s^a[1],h=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g<m;g++)o=v[d>>>24]^b[u>>16&255]^_[h>>8&255]^T[255&p]^a[f],l=v[u>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[h>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&u]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[u>>8&255]^T[255&h]^a[f+3],f+=4,d=o,u=l,h=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[u>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[f++],o=d,d=u,u=h,h=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const n=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d<l.length;d+=o)i=new Uint32Array([n(l[d-4]),n(l[d-3]),n(l[d-2]),n(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c));this.asyncStream_.push(function(){var e;\\n/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}static get STEP(){return 32e3}decryptChunk_(e,t,s,r){return function(){const a=function(e,t,s){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,u,h,p,m,g,f,y;for(c=s[0],d=s[1],u=s[2],h=s[3],y=0;y<r.length;y+=4)p=n(r[y]),m=n(r[y+1]),g=n(r[y+2]),f=n(r[y+3]),a.decrypt(p,m,g,f,l,y),l[y]=n(l[y]^c),l[y+1]=n(l[y+1]^d),l[y+2]=n(l[y+2]^u),l[y+3]=n(l[y+3]^h),c=p,d=m,u=g,h=f;return o}(e,t,s);r.set(a,e.byteOffset)}}}var a,o=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};a=\\\"undefined\\\"!=typeof window?window:void 0!==o?o:\\\"undefined\\\"!=typeof self?self:{};var l=a.BigInt||Number;l(\\\"0x1\\\"),l(\\\"0x100\\\"),l(\\\"0x10000\\\"),l(\\\"0x1000000\\\"),l(\\\"0x100000000\\\"),l(\\\"0x10000000000\\\"),l(\\\"0x1000000000000\\\"),l(\\\"0x100000000000000\\\"),l(\\\"0x10000000000000000\\\"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const c=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];var n;n=s,(\\\"function\\\"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,s,n,function(e,i){self.postMessage(c({source:t.source,decrypted:i}),[i.buffer])})}}));var xm=Yh(km);const Em=e=>{let t=e.default?\\\"main\\\":\\\"alternative\\\";return e.characteristics&&e.characteristics.indexOf(\\\"public.accessibility.describes-video\\\")>=0&&(t=\\\"main-desc\\\"),t},Cm=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Am=(e,t)=>{t.activePlaylistLoader=e,e.load()},Im={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){bu.log.warn(\\\"Problem encountered loading the alternate audio track.Switching back to default.\\\");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:\\\"Problem encountered loading the default audio track.\\\"}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;bu.log.warn(\\\"Problem encountered loading the subtitle track.Disabling subtitle track.\\\");const s=i.activeTrack();s&&(s.mode=\\\"disabled\\\"),i.onTrackChanged()}},jm={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on(\\\"loadedmetadata\\\",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&\\\"none\\\"!==s.preload())&&r.load()}),t.on(\\\"loadedplaylist\\\",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on(\\\"error\\\",Im[e](e,i))}},Dm={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,u=eh(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const h in a[e][n]){let p,m=a[e][n][h];if(u?(c(`AUDIO group '${n}' label '${h}' is a main playlist`),m.isMainPlaylist=!0,p=null):p=\\\"vhs-json\\\"===s&&m.playlists?new kh(m.playlists[0],i,r):m.resolvedUri?new kh(m.resolvedUri,i,r):m.playlists&&\\\"dash\\\"===s?new Wh(m.playlists[0],i,r,d):null,m=Cu({id:h,playlistLoader:p},m),jm[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[h]){const e=new bu.AudioTrack({id:h,kind:Em(m),enabled:!1,language:m.language,default:m.default,label:h});l[h]=e}}}n.on(\\\"error\\\",Im[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const u in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][u].forced)continue;let h,p=o[e][r][u];if(\\\"hls\\\"===n)h=new kh(p.resolvedUri,s,a);else if(\\\"dash\\\"===n){if(!p.playlists.filter(e=>e.excludeUntil!==1/0).length)return;h=new Wh(p.playlists[0],s,a,d)}else\\\"vhs-json\\\"===n&&(h=new kh(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Cu({id:u,playlistLoader:h},p),jm[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[u]){const e=i.addRemoteTextTrack({id:u,kind:\\\"subtitles\\\",default:p.default&&p.autoselect,language:p.language,label:u},!1).track;c[u]=e}}}r.on(\\\"error\\\",Im[e](e,t))},\\\"CLOSED-CAPTIONS\\\":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=Cu(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(Cu({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:\\\"captions\\\",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Pm=(e,t)=>{for(let i=0;i<e.length;i++){if(Ju(t,e[i]))return!0;if(e[i].playlists&&Pm(e[i].playlists,t))return!0}return!1},Lm={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(\\\"showing\\\"===i[e].mode||\\\"hidden\\\"===i[e].mode)return i[e];return null}},Om=e=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{Dm[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if(\\\"AUDIO\\\"===e&&o.length>1&&eh(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Pm(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return void 0===i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null})(i,e),t[i].activeTrack=Lm[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Cm(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Am(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Cm(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if(\\\"AUDIO\\\"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Am(o.playlistLoader,r)):Am(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on(\\\"mediachange\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanged())}),i.on(\\\"mediachanging\\\",()=>{[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:\\\"usage\\\",name:\\\"vhs-audio-change\\\"})};s.audioTracks().addEventListener(\\\"change\\\",l),s.remoteTextTracks().addEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged),n.on(\\\"dispose\\\",()=>{s.audioTracks().removeEventListener(\\\"change\\\",l),s.remoteTextTracks().removeEventListener(\\\"change\\\",t.SUBTITLES.onTrackChanged)}),s.clearTracks(\\\"audio\\\");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])};class Nm{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ku(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mm extends bu.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nm,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Eu(\\\"Content Steering\\\"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?\\\"HLS\\\":\\\"DASH\\\";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger(\\\"error\\\");i.startsWith(\\\"data:\\\")?this.decodeDataUriManifest_(i.substring(i.indexOf(\\\",\\\")+1)):(this.steeringManifest.reloadUri=ku(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger(\\\"content-steering\\\"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_(\\\"No valid content steering manifest URIs. Stopping content steering.\\\"),this.trigger(\\\"error\\\"),void this.dispose();const s={contentSteeringInfo:{uri:i}};this.trigger({type:\\\"contentsteeringloadstart\\\",metadata:s}),this.request_=this.xhr_({uri:i,requestType:\\\"content-steering-manifest\\\"},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders[\\\"retry-after\\\"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let n;this.trigger({type:\\\"contentsteeringloadcomplete\\\",metadata:s});try{n=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:bu.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:\\\"error\\\",metadata:t})}this.assignSteeringProperties_(n);const r={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:\\\"contentsteeringparsed\\\",metadata:r}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new Le.URL(e),i=new Le.URL(this.proxyServerUrl_);return i.searchParams.set(\\\"url\\\",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Le.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new Le.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger(\\\"error\\\");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e[\\\"RELOAD-URI\\\"],this.steeringManifest.priority=e[\\\"PATHWAY-PRIORITY\\\"]||e[\\\"SERVICE-LOCATION-PRIORITY\\\"],this.steeringManifest.pathwayClones=e[\\\"PATHWAY-CLONES\\\"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_(\\\"There are no available pathways for content steering. Ending content steering.\\\"),this.trigger(\\\"error\\\"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger(\\\"content-steering\\\"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Le.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){Le.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off(\\\"content-steering\\\"),this.off(\\\"error\\\"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nm}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(ku(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Rm;const Um=[\\\"mediaRequests\\\",\\\"mediaRequestsAborted\\\",\\\"mediaRequestsTimedout\\\",\\\"mediaRequestsErrored\\\",\\\"mediaTransferDuration\\\",\\\"mediaBytesTransferred\\\",\\\"mediaAppends\\\"],Bm=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Fm extends bu.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{e.apply(null,s)},t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error(\\\"A non-empty playlist URL or JSON manifest string is required\\\");let{maxPlaylistRetries:g}=e;null==g&&(g=1/0),Rm=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack(\\\"metadata\\\",\\\"ad-cues\\\"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=\\\"\\\"),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on(\\\"error\\\",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Wp,activeTrack:Wp,getActiveGroup:Wp,onGroupChanged:Wp,onTrackChanged:Wp,lastTrack_:null,logger_:Eu(`MediaGroups[${t}]`)}}),e})(),m&&Le.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Le.ManagedMediaSource,this.usingManagedMediaSource_=!0,bu.log(\\\"Using ManagedMediaSource\\\")):Le.MediaSource&&(this.mediaSource=new Le.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.addEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.addEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.mediaSource.addEventListener(\\\"startstreaming\\\",this.load),this.mediaSource.addEventListener(\\\"endstreaming\\\",this.pause),this.seekable_=Au(),this.hasPlayed_=!1,this.syncController_=new Sm(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:\\\"metadata\\\",label:\\\"segment-metadata\\\"},!1).track,this.segmentMetadataTrack_.mode=\\\"hidden\\\",this.decrypter_=new xm,this.sourceUpdater_=new um(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new wm,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=\\\"dash\\\"===this.sourceType_?new Wh(t,this.vhs_,Cu(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new kh(t,this.vhs_,Cu(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vp(Cu(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:\\\"main\\\"}),e),this.audioSegmentLoader_=new Vp(Cu(f,{loaderType:\\\"audio\\\"}),e),this.subtitleSegmentLoader_=new gm(Cu(f,{loaderType:\\\"vtt\\\",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off(\\\"vttjserror\\\",n),e()}function n(){s.off(\\\"vttjsloaded\\\",i),t()}s.one(\\\"vttjsloaded\\\",i),s.one(\\\"vttjserror\\\",n),s.addWebVttScript_()})}),e);this.contentSteeringController_=new Mm(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one(\\\"loadedplaylist\\\",()=>this.startABRTimer_()),this.tech_.on(\\\"pause\\\",()=>this.stopABRTimer_()),this.tech_.on(\\\"play\\\",()=>this.startABRTimer_())),Um.forEach(e=>{this[e+\\\"_\\\"]=Bm.bind(this,e)}),this.logger_=Eu(\\\"pc\\\"),this.triggeredFmp4Usage=!1,\\\"none\\\"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one(\\\"play\\\",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=\\\"none\\\"===this.tech_.preload()?\\\"play\\\":\\\"loadstart\\\";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one(\\\"loadeddata\\\",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e=\\\"abr\\\"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);if(n&&n!==r){this.logger_(`switch media ${n} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:\\\"renditionselected\\\",metadata:i}),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){[\\\"AUDIO\\\",\\\"SUBTITLES\\\",\\\"CLOSED-CAPTIONS\\\"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter(e=>e.attributes.serviceLocation===s);t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Le.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Le.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const s=e.playlists[i];s.attributes&&s.attributes.AUDIO&&s.attributes.AUDIO===t&&r.push(s)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on(\\\"loadedmetadata\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&\\\"none\\\"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Om({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger(\\\"selectedinitialmedia\\\"):this.mediaTypes_.AUDIO.activePlaylistLoader.one(\\\"loadedmetadata\\\",()=>{this.trigger(\\\"selectedinitialmedia\\\")})}),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,\\\"initial\\\");if(!(\\\"vhs-json\\\"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on(\\\"error\\\",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on(\\\"mediachanging\\\",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on(\\\"mediachange\\\",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Qu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:\\\"mediachange\\\",bubbles:!0})}),this.mainPlaylistLoader_.on(\\\"playlistunchanged\\\",()=>{const e=this.mainPlaylistLoader_.media();if(\\\"playlist-unchanged\\\"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:\\\"Playlist no longer updating.\\\",reason:\\\"playlist-unchanged\\\"}}),this.tech_.trigger(\\\"playliststuck\\\"))}),this.mainPlaylistLoader_.on(\\\"renditiondisabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-disabled\\\"})}),this.mainPlaylistLoader_.on(\\\"renditionenabled\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-enabled\\\"})});[\\\"manifestrequeststart\\\",\\\"manifestrequestcomplete\\\",\\\"manifestparsestart\\\",\\\"manifestparsecomplete\\\",\\\"playlistrequeststart\\\",\\\"playlistrequestcomplete\\\",\\\"playlistparsestart\\\",\\\"playlistparsecomplete\\\",\\\"renditiondisabled\\\",\\\"renditionenabled\\\"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e]){i.AUDIO[e][t].uri||(s=!1)}s&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-demuxed\\\"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-webvtt\\\"}),Rm.Playlist.isAes(t)&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-aes\\\"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-alternate-audio\\\"}),this.useCueTags_&&this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-playlist-cue-tags\\\"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return bu.log.warn(\\\"We received no playlist to switch to. Please check your stream.\\\"),!1;const c=`allowing switch ${e&&e.id||\\\"null\\\"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(Pu(t,i).length);if(!e.endList)return d||\\\"number\\\"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=Ru(t,i),h=o?Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Gh.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${c} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,m=e.attributes.BANDWIDTH;if(p<m&&(!o||u<r)){let e=`${c} as next bandwidth < current bandwidth (${p} < ${m})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||p>m)&&u>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on(\\\"bandwidthupdate\\\",()=>{this.checkABR_(\\\"bandwidthupdate\\\"),this.tech_.trigger(\\\"bandwidthupdate\\\")}),this.mainSegmentLoader_.on(\\\"timeout\\\",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on(\\\"progress\\\",()=>{this.trigger(\\\"progress\\\")}),this.mainSegmentLoader_.on(\\\"error\\\",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\\\"timestampoffset\\\",()=>{this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-timestamp-offset\\\"})}),this.audioSegmentLoader_.on(\\\"syncinfoupdate\\\",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\\\"appenderror\\\",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger(\\\"error\\\")}),this.mainSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"main segment loader ended\\\"),this.onEndOfStream()}),this.timelineChangeController_.on(\\\"audioTimelineBehind\\\",()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)}),this.timelineChangeController_.on(\\\"fixBadTimelineChange\\\",()=>{this.logger_(\\\"Fix bad timeline change. Restarting al segment loaders...\\\"),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on(\\\"earlyabort\\\",e=>{this.bufferBasedABR||(this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\"]),this.excludePlaylist({error:{message:\\\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\\\"},playlistExclusionDuration:10}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on(\\\"trackinfo\\\",e),this.audioSegmentLoader_.on(\\\"trackinfo\\\",e),this.mainSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"fmp4\\\",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-fmp4\\\"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\\\"ended\\\",()=>{this.logger_(\\\"audioSegmentLoader ended\\\"),this.onEndOfStream()});[\\\"segmentselected\\\",\\\"segmentloadstart\\\",\\\"segmentloaded\\\",\\\"segmentkeyloadstart\\\",\\\"segmentkeyloadcomplete\\\",\\\"segmentdecryptionstart\\\",\\\"segmentdecryptioncomplete\\\",\\\"segmenttransmuxingstart\\\",\\\"segmenttransmuxingcomplete\\\",\\\"segmenttransmuxingtrackinfoavailable\\\",\\\"segmenttransmuxingtiminginfoavailable\\\",\\\"segmentappendstart\\\",\\\"appendsdone\\\",\\\"bandwidthupdated\\\",\\\"timelinechange\\\",\\\"codecschange\\\"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(Vt({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_(\\\"skipping fastQualityChange because new media is same as old\\\"):(this.switchMedia_(e,\\\"fast-quality\\\"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger(\\\"firstplay\\\"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&\\\"function\\\"==typeof e.then&&e.then(null,e=>{})}this.trigger(\\\"sourceopen\\\")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger(\\\"durationchange\\\")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Rm.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ju;const r=n.end(n.length-1);return r-s<=ju&&i-r<=ju}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void(\\\"open\\\"!==this.mediaSource.readyState?this.trigger(\\\"error\\\"):this.sourceUpdater_.endOfStream(\\\"network\\\"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Yu),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return bu.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger(\\\"retryplaylist\\\"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bu.log.warn(\\\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\\\"),this.tech_.trigger(\\\"retryplaylist\\\"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger(\\\"excludeplaylist\\\"),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-rendition-excluded\\\"});const o=this.selectPlaylist();if(!o)return this.error=\\\"Playback cannot continue. No available working or supported playlists.\\\",void this.trigger(\\\"error\\\");const l=t.internal?this.logger_:bu.log.warn,c=t.message?\\\" \\\"+t.message:\\\"\\\";l(`${t.internal?\\\"Internal problem\\\":\\\"Problem\\\"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_(\\\"audio\\\",[\\\"abort\\\",\\\"pause\\\"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_(\\\"subtitle\\\",[\\\"abort\\\",\\\"pause\\\"]),this.delegateLoaders_(\\\"main\\\",[\\\"abort\\\",\\\"pause\\\"]);const d=o.targetDuration/2*1e3||5e3,u=\\\"number\\\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,\\\"exclude\\\",r||u)}pauseLoading(){this.delegateLoaders_(\\\"all\\\",[\\\"abort\\\",\\\"pause\\\"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s=\\\"all\\\"===e;(s||\\\"main\\\"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||\\\"audio\\\"===e)&&n.push(\\\"AUDIO\\\"),(s||\\\"subtitle\\\"===e)&&(n.push(\\\"CLOSED-CAPTIONS\\\"),n.push(\\\"SUBTITLES\\\")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),[\\\"main\\\",\\\"audio\\\",\\\"subtitle\\\"].forEach(t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&\\\"all\\\"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{\\\"function\\\"==typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Pu(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Rm.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const e=s.start,t=s.end;if(!isFinite(e)||!isFinite(t))return null;const n=Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Au([[e,Math.max(e,t-n)]])}const n=this.syncController_.getExpiredTime(i,this.duration());if(null===n)return null;const r=Rm.Playlist.seekable(i,n,Rm.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),s=e.end(0),n=t.start(0),r=t.end(0);return n>s||i>r?e:Au([[Math.max(i,n),Math.min(s,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,\\\"main\\\");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,\\\"audio\\\"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${Ou(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:\\\"seekablerangeschanged\\\",metadata:s}),this.tech_.trigger(\\\"seekablechanged\\\")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.updateDuration_=null),\\\"open\\\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\\\"sourceopen\\\",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Rm.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger(\\\"dispose\\\"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off(\\\"play\\\",this.loadOnPlay_),[\\\"AUDIO\\\",\\\"SUBTITLES\\\"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.updateDuration_),this.mediaSource.removeEventListener(\\\"durationchange\\\",this.handleDurationChange_),this.mediaSource.removeEventListener(\\\"sourceopen\\\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\\\"sourceended\\\",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=gh(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||\\\"avc1.4d400d\\\"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||fi}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||fi,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:\\\"Could not determine codecs for playlist.\\\"},playlistExclusionDuration:1/0});const r=(e,t)=>e?mi(t,this.usingManagedMediaSource_):gi(t),a={};let o;if([\\\"video\\\",\\\"audio\\\"].forEach(function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?\\\"browser\\\":\\\"muxer\\\";a[i]=a[i]||[],a[i].push(s[t]),\\\"audio\\\"===t&&(o=i)}}),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): \\\"${s.audio}\\\"`)}if(Object.keys(a).length){const e=Object.keys(a).reduce((e,t)=>(e&&(e+=\\\", \\\"),e+=`${t} does not support codec(s): \\\"${a[t].join(\\\",\\\")}\\\"`),\\\"\\\")+\\\".\\\";return void this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if([\\\"video\\\",\\\"audio\\\"].forEach(t=>{const i=(ui(this.sourceUpdater_.codecs[t]||\\\"\\\")[0]||{}).type,n=(ui(s[t]||\\\"\\\")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`\\\"${this.sourceUpdater_.codecs[t]}\\\" -> \\\"${s[t]}\\\"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(\\\", \\\")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}tryToCreateSourceBuffers_(){if(\\\"open\\\"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(\\\",\\\");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=gh(this.main,s),r=[];!n.audio||gi(n.audio)||mi(n.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${n.audio}`),!n.video||gi(n.video)||mi(n.video,this.usingManagedMediaSource_)||r.push(`video codec ${n.video}`),n.text&&\\\"stpp.ttml.im1t\\\"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(\\\", \\\")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ph(ui(e)),n=mh(s),r=s.video&&ui(s.video)[0]||null,a=s.audio&&ui(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=gh(this.mainPlaylistLoader_.main,s),c=mh(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count \\\"${c}\\\" !== \\\"${n}\\\"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&ui(l.video)[0]||null,t=l.audio&&ui(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec \\\"${e.type}\\\" !== \\\"${r.type}\\\"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec \\\"${t.type}\\\" !== \\\"${a.type}\\\"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(\\\" && \\\")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i<e.segments.length;i++){const r=e.segments[i];if(s||(s=fm(t,n+r.duration/2)),s){if(\\\"cueIn\\\"in r){s.endTime=n,s.adEndTime=n,n+=r.duration,s=null;continue}if(n<s.endTime){n+=r.duration;continue}s.endTime+=r.duration}else if(\\\"cueOut\\\"in r&&(s=new Le.VTTCue(n,n+r.duration,r.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(r.cueOut),t.addCue(s)),\\\"cueOutCont\\\"in r){const[e,i]=r.cueOutCont.split(\\\"/\\\").map(parseFloat);s=new Le.VTTCue(n,n+r.duration,\\\"\\\"),s.adStartTime=n-e,s.adEndTime=s.adStartTime+i,t.addCue(s)}n+=r.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Gh.GOAL_BUFFER_LENGTH,i=Gh.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Gh.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Gh.BUFFER_LOW_WATER_LINE,i=Gh.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Gh.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Gh.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Gh.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Op(this.inbandTextTracks_,\\\"com.apple.streaming\\\",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=Le.WebKitDataCue||Le.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Lp.has(t))continue;const n=new s(e.startTime,e.endTime,\\\"\\\");n.id=e.id,n.type=\\\"com.apple.quicktime.HLS\\\",n.value={key:Pp[t],data:e[t]},\\\"scte35Out\\\"!==t&&\\\"scte35In\\\"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\\\\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Op(this.inbandTextTracks_,e,this.tech_),Dp({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes[\\\"PATHWAY-ID\\\"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one(\\\"canplay\\\",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on(\\\"content-steering\\\",this.excludeThenChangePathway_.bind(this));[\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(Vt({},e))})}),\\\"dash\\\"===this.sourceType_&&this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach(n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&\\\"content-steering\\\"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_=\\\"content-steering\\\",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,s]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(s),this.contentSteeringController_.excludePathway(e))}for(const[s,n]of i.entries()){const i=t.get(s);if(!i){e.filter(e=>e.attributes[\\\"PATHWAY-ID\\\"]===n[\\\"BASE-ID\\\"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(i,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e[\\\"BASE-ID\\\"]!==t[\\\"BASE-ID\\\"]||e.ID!==t.ID||e[\\\"URI-REPLACEMENT\\\"].HOST!==t[\\\"URI-REPLACEMENT\\\"].HOST)return!1;const i=e[\\\"URI-REPLACEMENT\\\"].PARAMS,s=t[\\\"URI-REPLACEMENT\\\"].PARAMS;for(const e in i)if(i[e]!==s[e])return!1;for(const e in s)if(i[e]!==s[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),\\\"DASH\\\"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,\\\"content-steering\\\")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t=\\\"non-usable\\\";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n=\\\"usable\\\",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,bu.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i=(\\\"string\\\"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on(\\\"loadedplaylist\\\",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qm{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes[\\\"FRAME-RATE\\\"]}var r,a,o;this.codecs=gh(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Xu(t),s=Yu(t);if(void 0===e)return s;e?delete t.disabled:t.disabled=!0;const n={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:\\\"fast-quality\\\"};return e===s||i||(e?(o(t),r.trigger({type:\\\"renditionenabled\\\",metadata:n})):r.trigger({type:\\\"renditiondisabled\\\",metadata:n})),e})}}const $m=[\\\"seeking\\\",\\\"seeked\\\",\\\"pause\\\",\\\"playing\\\",\\\"error\\\"];class zm extends bu.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Eu(\\\"PlaybackWatcher\\\"),this.logger_(\\\"initialize\\\");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=[\\\"main\\\",\\\"subtitle\\\",\\\"audio\\\"],o={};a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].on(\\\"playlistupdate\\\",o[e].reset),this.tech_.on([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)});const l=e=>{[\\\"main\\\",\\\"audio\\\"].forEach(t=>{r[`${t}SegmentLoader_`][e](\\\"appended\\\",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l(\\\"off\\\"))},this.clearSeekingAppendCheck_=()=>l(\\\"off\\\"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l(\\\"on\\\")},this.tech_.on(\\\"seeked\\\",this.clearSeekingAppendCheck_),this.tech_.on(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.on(\\\"waiting\\\",s),this.tech_.on($m,n),this.tech_.on(\\\"canplay\\\",i),this.tech_.one(\\\"play\\\",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_(\\\"dispose\\\"),this.tech_.off(\\\"waiting\\\",s),this.tech_.off($m,n),this.tech_.off(\\\"canplay\\\",i),this.tech_.off(\\\"play\\\",t),this.tech_.off(\\\"seeking\\\",this.watchForBadSeeking_),this.tech_.off(\\\"seeked\\\",this.clearSeekingAppendCheck_),a.forEach(e=>{r[`${e}SegmentLoader_`].off(\\\"appendsdone\\\",o[e].updateend),r[`${e}SegmentLoader_`].off(\\\"playlistupdate\\\",o[e].reset),this.tech_.off([\\\"seeked\\\",\\\"seeking\\\"],o[e].reset)}),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Le.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Le.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,n){const i={bufferedRanges:s};return t.trigger({type:\\\"bufferedrangeschanged\\\",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Nu(s)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\\\"usage\\\",name:`vhs-${e}-download-exclusion`}),\\\"subtitle\\\"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+ju>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Au([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:\\\"playedrangeschanged\\\",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ju)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${Ou(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Iu),c=[r,a];for(let e=0;e<c.length;e++){if(!c[e])continue;if(Ru(c[e],t)<l)return!1}const d=Lu(n,t);return 0!==d.length&&(i=d.start(0)+ju,this.logger_(`Buffered region starts (${d.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Pu(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-unknown-waiting\\\"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-live-resync\\\"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-video-underflow\\\"}),!0;const n=Lu(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ju;const r=!i.endList,a=\\\"number\\\"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=Pu(e,i-3),r=Pu(e,i),a=Pu(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{Lu(e,i).length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Lu(t,i);if(this.resetTimeUpdate_(),0===s.length||i!==e)return;this.logger_(\\\"skipTheGap_:\\\",\\\"currentTime:\\\",i,\\\"scheduled currentTime:\\\",e,\\\"nextRange start:\\\",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Iu);const n={gapInfo:{from:i,to:s.start(0)}};this.playlistController_.trigger({type:\\\"gapjumped\\\",metadata:n}),this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-gap-skip\\\"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Au();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Au(t)}(e);for(let e=0;e<i.length;e++){const s=i.start(e),n=i.end(e);if(t-s<4&&t-s>2)return{start:s,end:n}}return null}}const Hm={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Vm=function(e,t){let i=0,s=0;const n=Cu(Hm,t);e.ready(()=>{e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-initialized\\\"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one(\\\"loadedmetadata\\\",r),e.src(t),e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload\\\"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:\\\"usage\\\",name:\\\"vhs-error-reload-canceled\\\"});else{if(n.getSource&&\\\"function\\\"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);bu.log.error(\\\"ERROR: reloadSourceOnError - The option getSource must be a function!\\\")}},l=function(){e.off(\\\"loadedmetadata\\\",r),e.off(\\\"error\\\",o),e.off(\\\"dispose\\\",l)};e.on(\\\"error\\\",o),e.on(\\\"dispose\\\",l),e.reloadSourceOnError=function(t){l(),Vm(e,t)}},Wm=function(e){Vm(this,e)};var Gm=\\\"3.17.0\\\";const Xm={PlaylistLoader:kh,Playlist:th,utils:Nh,STANDARD_PLAYLIST_SELECTOR:Ip,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(th.isEnabled);Ep(e,(e,t)=>Cp(e,t));return e.filter(e=>!!gh(this.playlists.main,e).video)[0]||null},lastBandwidthSelector:Ip,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error(\\\"Moving average bandwidth decay must be between 0 and 1.\\\");return function(){let s=this.useDevicePixelRatio&&Le.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Ap({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(xp(this.tech_.el(),\\\"width\\\"),10)*s,playerHeight:parseInt(xp(this.tech_.el(),\\\"height\\\"),10)*s,playerObjectFit:this.usePlayerObjectFit?xp(this.tech_.el(),\\\"objectFit\\\"):\\\"\\\",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Cp,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Le.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Le.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:Eh()};Object.keys(Gh).forEach(e=>{Object.defineProperty(Xm,e,{get:()=>(bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Gh[e]),set(t){bu.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),\\\"number\\\"!=typeof t||t<0?bu.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Gh[e]=t}})});const Ym=\\\"videojs-vhs\\\",Km=function(e,t){const i=t.media();let s=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){s=t;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:\\\"change\\\"})};Xm.canPlaySource=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")};const Qm=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=((e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]))(i?s.concat([i]):s,Object.keys(t)),r=[],a=[];return n.forEach(t=>{a.push(new Promise((t,i)=>{e.tech_.one(\\\"keysessioncreated\\\",t)})),r.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(r),Promise.race(a)])},Jm=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ph(ui(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=pi(s.video),r=pi(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),\\\"string\\\"==typeof e[i]&&(a[i].url=e[i]);return Cu(e,a)})(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(bu.log.warn(\\\"DRM encrypted source cannot be decrypted without a DRM plugin\\\"),!1))},Zm=()=>{if(!Le.localStorage)return null;const e=Le.localStorage.getItem(Ym);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},eg=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},tg=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},ig=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},sg=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Xm.supportsNativeHls=function(){if(!Re||!Re.createElement)return!1;const e=Re.createElement(\\\"video\\\");if(!bu.getTech(\\\"Html5\\\").isSupported())return!1;return[\\\"application/vnd.apple.mpegurl\\\",\\\"audio/mpegurl\\\",\\\"audio/x-mpegurl\\\",\\\"application/x-mpegurl\\\",\\\"video/x-mpegurl\\\",\\\"video/mpegurl\\\",\\\"application/mpegurl\\\"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xm.supportsNativeDash=!!(Re&&Re.createElement&&bu.getTech(\\\"Html5\\\").isSupported())&&/maybe|probably/i.test(Re.createElement(\\\"video\\\").canPlayType(\\\"application/dash+xml\\\")),Xm.supportsTypeNatively=e=>\\\"hls\\\"===e?Xm.supportsNativeHls:\\\"dash\\\"===e&&Xm.supportsNativeDash,Xm.isSupported=function(){return bu.log.warn(\\\"VHS is no longer a tech. Please remove it from your player's techOrder.\\\")},Xm.xhr.onRequest=function(e){eg(Xm.xhr,e)},Xm.xhr.onResponse=function(e){tg(Xm.xhr,e)},Xm.xhr.offRequest=function(e){ig(Xm.xhr,e)},Xm.xhr.offResponse=function(e){sg(Xm.xhr,e)};const ng=bu.getComponent(\\\"Component\\\");class rg extends ng{constructor(e,t,i){if(super(t,i.vhs),\\\"number\\\"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Eu(\\\"VhsHandler\\\"),t.options_&&t.options_.playerId){const e=bu.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\\\"Overriding native VHS requires emulated tracks. See https://git.io/vMpjB\\\");this.on(Re,[\\\"fullscreenchange\\\",\\\"webkitfullscreenchange\\\",\\\"mozfullscreenchange\\\",\\\"MSFullscreenChange\\\"],e=>{const t=Re.fullscreenElement||Re.webkitFullscreenElement||Re.mozFullScreenElement||Re.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,\\\"seeking\\\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,\\\"error\\\",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,\\\"play\\\",this.play)}setOptions_(e={}){if(this.options_=Cu(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,\\\"number\\\"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),\\\"number\\\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Zm();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-bandwidth-from-local-storage\\\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\\\"usage\\\",name:\\\"vhs-throughput-from-local-storage\\\"}))}\\\"number\\\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Gh.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Gh.INITIAL_BANDWIDTH,[\\\"withCredentials\\\",\\\"useDevicePixelRatio\\\",\\\"usePlayerObjectFit\\\",\\\"customPixelRatio\\\",\\\"limitRenditionByPlayerDimensions\\\",\\\"bandwidth\\\",\\\"customTagParsers\\\",\\\"customTagMappers\\\",\\\"cacheEncryptionKeys\\\",\\\"playlistSelector\\\",\\\"initialPlaylistSelector\\\",\\\"bufferBasedABR\\\",\\\"liveRangeSafeTimeDelta\\\",\\\"llhls\\\",\\\"useForcedSubtitles\\\",\\\"useNetworkInformationApi\\\",\\\"useDtsForTimestampOffset\\\",\\\"exactManifestTimings\\\",\\\"leastPixelDiffSelector\\\"].forEach(e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;\\\"number\\\"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf(\\\"data:application/vnd.videojs.vhs+json,\\\")?JSON.parse(i.substring(i.indexOf(\\\",\\\")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=Xm,this.options_.sourceType=bi(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fm(this.options_);const s=Cu({liveRangeSafeTimeDelta:ju},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new zm(s),this.attachStreamingEventListeners_(),this.playlistController_.on(\\\"error\\\",()=>{const e=bu.players[this.tech_.options_.playerId];let t=this.playlistController_.error;\\\"object\\\"!=typeof t||t.code?\\\"string\\\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?Xm.movingAverageBandwidthSelector(.55):Xm.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Xm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Le.navigator.connection||Le.navigator.mozConnection||Le.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){bu.log.error('The \\\"systemBandwidth\\\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one(\\\"canplay\\\",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on(\\\"bandwidthupdate\\\",()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Le.localStorage)return!1;let t=Zm();t=t?Cu(t,e):e;try{Le.localStorage.setItem(Ym,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=eh(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!Xu(e)).map((t,i)=>new qm(e,t,t.id)):[]}}),this.playlistController_.sourceUpdater_.on(\\\"createdsourcebuffers\\\",()=>{this.setupEme_()}),this.on(this.playlistController_,\\\"progress\\\",function(){this.tech_.trigger(\\\"progress\\\")}),this.on(this.playlistController_,\\\"firstplay\\\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Le.URL.createObjectURL(this.playlistController_.mediaSource),(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS)&&this.options_.overrideNative&&\\\"hls\\\"===this.options_.sourceType&&\\\"function\\\"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_(\\\"waiting for EME key session creation\\\"),Qm({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_(\\\"created EME key session\\\"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_(\\\"error while creating EME key session\\\",e),this.player_.error({message:\\\"Failed to initialize media keys for EME\\\",code:3})})}handleWaitingForKey_(){this.logger_(\\\"waitingforkey fired, attempting to create any new key sessions\\\"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Jm({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on(\\\"keystatuschange\\\",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on(\\\"waitingforkey\\\",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bu.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on(\\\"selectedinitialmedia\\\",()=>{!function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Km(e,t.playlists)}(this.qualityLevels_,this)}),this.playlists.on(\\\"mediachange\\\",()=>{Km(this.qualityLevels_,this.playlists)}))}static version(){return{\\\"@videojs/http-streaming\\\":Gm,\\\"mux.js\\\":\\\"7.1.0\\\",\\\"mpd-parser\\\":\\\"1.3.1\\\",\\\"m3u8-parser\\\":\\\"7.2.0\\\",\\\"aes-decrypter\\\":\\\"4.0.2\\\"}}version(){return this.constructor.version()}canChangeType(){return um.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Le.URL.revokeObjectURL&&(Le.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off(\\\"waitingforkey\\\",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Mh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Rh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{eg(this.xhr,e)},this.xhr.onResponse=e=>{tg(this.xhr,e)},this.xhr.offRequest=e=>{ig(this.xhr,e)},this.xhr.offResponse=e=>{sg(this.xhr,e)},this.player_.trigger(\\\"xhr-hooks-ready\\\")}attachStreamingEventListeners_(){[\\\"seekablerangeschanged\\\",\\\"bufferedrangeschanged\\\",\\\"contentsteeringloadstart\\\",\\\"contentsteeringloadcomplete\\\",\\\"contentsteeringparsed\\\"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(Vt({},e))})}),[\\\"gapjumped\\\",\\\"playedrangeschanged\\\"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(Vt({},e))})})}}const ag={name:\\\"videojs-http-streaming\\\",VERSION:Gm,canHandleSource(e,t={}){const i=Cu(bu.options,t);return!(!i.vhs.experimentalUseMMS&&!mi(\\\"avc1.4d400d,mp4a.40.2\\\",!1))&&ag.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Cu(bu.options,i);return t.vhs=new rg(e,t,s),t.vhs.xhr=Eh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=bi(e);if(!i)return\\\"\\\";const s=ag.getOverrideNative(t);return!Xm.supportsTypeNatively(i)||s?\\\"maybe\\\":\\\"\\\"},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(bu.browser.IS_ANY_SAFARI||bu.browser.IS_IOS),{overrideNative:s=i}=t;return s}};mi(\\\"avc1.4d400d,mp4a.40.2\\\",!0)&&bu.getTech(\\\"Html5\\\").registerSourceHandler(ag,0),bu.VhsHandler=rg,bu.VhsSourceHandler=ag,bu.Vhs=Xm,bu.use||bu.registerComponent(\\\"Vhs\\\",Xm),bu.options.vhs=bu.options.vhs||{},bu.getPlugin&&bu.getPlugin(\\\"reloadSourceOnError\\\")||bu.registerPlugin(\\\"reloadSourceOnError\\\",Wm);function og(t){let i,s,n,r;return{c(){i=f(\\\"div\\\"),s=f(\\\"video\\\"),n=f(\\\"source\\\"),o(n.src,r=`data:video/${t[0].format};base64,${t[0].value}`)||S(n,\\\"src\\\",r),S(n,\\\"type\\\",\\\"video/mp4\\\"),S(s,\\\"class\\\",\\\"video-js\\\"),s.playsInline=!0,S(s,\\\"allow\\\",\\\"fullscreen\\\"),s.controls=!0,S(i,\\\"class\\\",\\\"video-container svelte-xkosau\\\")},m(e,r){p(e,i,r),h(i,s),h(s,n),t[2](s)},p(e,[t]){1&t&&!o(n.src,r=`data:video/${e[0].format};base64,${e[0].value}`)&&S(n,\\\"src\\\",r)},i:e,o:e,d(e){e&&m(i),t[2](null)}}}function lg(e,t,i){let s,n,{videoData:r}=t;return D(()=>{console.log(\\\"videoElement exists?\\\",!!s),s?setTimeout(()=>{try{n=bu(s,{controls:!0,fluid:!0,playsinline:!0,controlBar:{fullscreenToggle:!0}}),console.log(\\\"Player initialized successfully\\\")}catch(e){console.error(\\\"Failed to initialize player:\\\",e)}},0):console.error(\\\"Video element not found during mount\\\")}),P(()=>{n&&n.dispose()}),e.$$set=e=>{\\\"videoData\\\"in e&&i(0,r=e.videoData)},[r,s,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{s=e,i(1,s)})}]}ne(\\\".video-container.svelte-xkosau{width:500px}\\\");class cg extends se{constructor(e){super(),ie(this,e,lg,og,r,{videoData:0})}}function dg(e,t,i){const s=e.slice();return s[4]=t[i],s[6]=i,s}function ug(e){let t,i,s,n,r,a,o=e[4]+\\\"\\\",l=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),l&&l.c(),i=b(),s=v(o),n=b(),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\")),S(t,\\\"style\\\",a=`${e[2]} ${e[3]}`)},m(e,r){p(e,t,r),l&&l.m(t,null),h(t,i),h(t,s),h(t,n)},p(e,i){0===e[6]&&l.p(e,i),1&i&&o!==(o=e[4]+\\\"\\\")&&w(s,o),2&i&&S(t,\\\"data-index\\\",e[1]),1&i&&r!==(r=\\\"token-grid-item inline-block mt-2 border-b-2 \\\"+(e[0].special?\\\"text-gray-300 dark:text-gray-500\\\":\\\"\\\"))&&S(t,\\\"class\\\",r),12&i&&a!==(a=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",a)},d(e){e&&m(t),l&&l.d()}}}function hg(e){let t,i,s,n,r,a=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),a&&a.c(),i=v(\\\"\\\\n            \\\\\\\\n\\\"),n=b(),r=f(\\\"div\\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`),S(r,\\\"class\\\",\\\"basis-full h-full\\\")},m(e,s){p(e,t,s),a&&a.m(t,null),h(t,i),p(e,n,s),p(e,r,s)},p(e,i){0===e[6]&&a.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&(m(t),m(n),m(r)),a&&a.d()}}}function pg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n            \\\\\\\\t  \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function mg(e){let t,i,s,n=0===e[6]&&function(e){let t,i,s=e[0].role+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"absolute text-xs uppercase -mt-4 text-purple-800 dark:text-purple-300 font-sans\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].role+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}(e);return{c(){t=f(\\\"span\\\"),n&&n.c(),i=v(\\\"\\\\n             \\\\n        \\\"),S(t,\\\"data-index\\\",e[1]),S(t,\\\"role\\\",\\\"tooltip\\\"),S(t,\\\"class\\\",\\\"token-grid-item inline-block mt-2 border-b-2 text-gray-300 dark:text-gray-500\\\"),S(t,\\\"style\\\",s=`${e[2]} ${e[3]}`)},m(e,s){p(e,t,s),n&&n.m(t,null),h(t,i)},p(e,i){0===e[6]&&n.p(e,i),2&i&&S(t,\\\"data-index\\\",e[1]),12&i&&s!==(s=`${e[2]} ${e[3]}`)&&S(t,\\\"style\\\",s)},d(e){e&&m(t),n&&n.d()}}}function gg(e){let t;function i(e,t){return\\\" \\\"===e[4]?mg:\\\"\\\\t\\\"===e[4]?pg:\\\"\\\\n\\\"===e[4]?hg:ug}let s=i(e),n=s(e);return{c(){n.c(),t=_()},m(e,i){n.m(e,i),p(e,t,i)},p(e,r){s===(s=i(e))&&n?n.p(e,r):(n.d(1),n=s(e),n&&(n.c(),n.m(t.parentNode,t)))},d(e){e&&m(t),n.d(e)}}}function fg(t){let i,s=Q(t[0].text),n=[];for(let e=0;e<s.length;e+=1)n[e]=gg(dg(t,s,e));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();i=_()},m(e,t){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,t);p(e,i,t)},p(e,[t]){if(15&t){let r;for(s=Q(e[0].text),r=0;r<s.length;r+=1){const a=dg(e,s,r);n[r]?n[r].p(a,t):(n[r]=gg(a),n[r].c(),n[r].m(i.parentNode,i))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:e,o:e,d(e){e&&m(i),g(n,e)}}}function yg(e,t,i){let{token:s}=t,{index:n}=t,{underlineStyle:r=\\\"\\\"}=t,{bgStyle:a=\\\"\\\"}=t;return e.$$set=e=>{\\\"token\\\"in e&&i(0,s=e.token),\\\"index\\\"in e&&i(1,n=e.index),\\\"underlineStyle\\\"in e&&i(2,r=e.underlineStyle),\\\"bgStyle\\\"in e&&i(3,a=e.bgStyle)},[s,n,r,a]}class vg extends se{constructor(e){super(),ie(this,e,yg,fg,r,{token:0,index:1,underlineStyle:2,bgStyle:3})}}function bg(e,t){var i,s=function(s){i=setTimeout(function(){e.dispatchEvent(new CustomEvent(\\\"longmouseover\\\",{detail:s}))},t)},n=function(t){clearTimeout(i),e.dispatchEvent(new CustomEvent(\\\"longmouseout\\\",{detail:t}))};return e.addEventListener(\\\"mouseover\\\",s),e.addEventListener(\\\"mouseout\\\",n),{update:function(e){t=e},destroy:function(){e.removeEventListener(\\\"mouseover\\\",s),e.removeEventListener(\\\"mouseout\\\",n)}}}\\n/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:_g,setPrototypeOf:Tg,isFrozen:Sg,getPrototypeOf:wg,getOwnPropertyDescriptor:kg}=Object;let{freeze:xg,seal:Eg,create:Cg}=Object,{apply:Ag,construct:Ig}=\\\"undefined\\\"!=typeof Reflect&&Reflect;xg||(xg=function(e){return e}),Eg||(Eg=function(e){return e}),Ag||(Ag=function(e,t,i){return e.apply(t,i)}),Ig||(Ig=function(e,t){return new e(...t)});const jg=Hg(Array.prototype.forEach),Dg=Hg(Array.prototype.lastIndexOf),Pg=Hg(Array.prototype.pop),Lg=Hg(Array.prototype.push),Og=Hg(Array.prototype.splice),Ng=Hg(String.prototype.toLowerCase),Mg=Hg(String.prototype.toString),Rg=Hg(String.prototype.match),Ug=Hg(String.prototype.replace),Bg=Hg(String.prototype.indexOf),Fg=Hg(String.prototype.trim),qg=Hg(Object.prototype.hasOwnProperty),$g=Hg(RegExp.prototype.test),zg=function(e){return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ig(e,i)}}(TypeError);function Hg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return Ag(e,t,s)}}function Vg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ng;Tg&&Tg(e,null);let s=t.length;for(;s--;){let n=t[s];if(\\\"string\\\"==typeof n){const e=i(n);e!==n&&(Sg(t)||(t[s]=e),n=e)}e[n]=!0}return e}function Wg(e){for(let t=0;t<e.length;t++){qg(e,t)||(e[t]=null)}return e}function Gg(e){const t=Cg(null);for(const[i,s]of _g(e)){qg(e,i)&&(Array.isArray(s)?t[i]=Wg(s):s&&\\\"object\\\"==typeof s&&s.constructor===Object?t[i]=Gg(s):t[i]=s)}return t}function Xg(e,t){for(;null!==e;){const i=kg(e,t);if(i){if(i.get)return Hg(i.get);if(\\\"function\\\"==typeof i.value)return Hg(i.value)}e=wg(e)}return function(){return null}}const Yg=xg([\\\"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\\\"]),Kg=xg([\\\"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\\\"]),Qg=xg([\\\"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\\\"]),Jg=xg([\\\"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\\\"]),Zg=xg([\\\"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\\\"]),ef=xg([\\\"maction\\\",\\\"maligngroup\\\",\\\"malignmark\\\",\\\"mlongdiv\\\",\\\"mscarries\\\",\\\"mscarry\\\",\\\"msgroup\\\",\\\"mstack\\\",\\\"msline\\\",\\\"msrow\\\",\\\"semantics\\\",\\\"annotation\\\",\\\"annotation-xml\\\",\\\"mprescripts\\\",\\\"none\\\"]),tf=xg([\\\"#text\\\"]),sf=xg([\\\"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\\\"]),nf=xg([\\\"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\\\"]),rf=xg([\\\"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\\\"]),af=xg([\\\"xlink:href\\\",\\\"xml:id\\\",\\\"xlink:title\\\",\\\"xml:space\\\",\\\"xmlns:xlink\\\"]),of=Eg(/\\\\{\\\\{[\\\\w\\\\W]*|[\\\\w\\\\W]*\\\\}\\\\}/gm),lf=Eg(/<%[\\\\w\\\\W]*|[\\\\w\\\\W]*%>/gm),cf=Eg(/\\\\$\\\\{[\\\\w\\\\W]*/gm),df=Eg(/^data-[\\\\-\\\\w.\\\\u00B7-\\\\uFFFF]+$/),uf=Eg(/^aria-[\\\\-\\\\w]+$/),hf=Eg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\\\-]+(?:[^a-z+.\\\\-:]|$))/i),pf=Eg(/^(?:\\\\w+script|data):/i),mf=Eg(/[\\\\u0000-\\\\u0020\\\\u00A0\\\\u1680\\\\u180E\\\\u2000-\\\\u2029\\\\u205F\\\\u3000]/g),gf=Eg(/^html$/i),ff=Eg(/^[a-z][.\\\\w]*(-[.\\\\w]+)+$/i);var yf=Object.freeze({__proto__:null,ARIA_ATTR:uf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:ff,DATA_ATTR:df,DOCTYPE_NAME:gf,ERB_EXPR:lf,IS_ALLOWED_URI:hf,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:of,TMPLIT_EXPR:cf});const vf=1,bf=3,_f=7,Tf=8,Sf=9,wf=function(){return\\\"undefined\\\"==typeof window?null:window};var kf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wf();const i=t=>e(t);if(i.version=\\\"3.2.6\\\",i.removed=[],!t||!t.document||t.document.nodeType!==Sf||!t.Element)return i.isSupported=!1,i;let{document:s}=t;const n=s,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,g=c.prototype,f=Xg(g,\\\"cloneNode\\\"),y=Xg(g,\\\"remove\\\"),v=Xg(g,\\\"nextSibling\\\"),b=Xg(g,\\\"childNodes\\\"),_=Xg(g,\\\"parentNode\\\");if(\\\"function\\\"==typeof o){const e=s.createElement(\\\"template\\\");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let T,S=\\\"\\\";const{implementation:w,createNodeIterator:k,createDocumentFragment:x,getElementsByTagName:E}=s,{importNode:C}=n;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported=\\\"function\\\"==typeof _g&&\\\"function\\\"==typeof _&&w&&void 0!==w.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:j,TMPLIT_EXPR:D,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:M}=yf;let{IS_ALLOWED_URI:R}=yf,U=null;const B=Vg({},[...Yg,...Kg,...Qg,...Zg,...tf]);let F=null;const q=Vg({},[...sf,...nf,...rf,...af]);let $=Object.seal(Cg(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}})),z=null,H=null,V=!0,W=!0,G=!1,X=!0,Y=!1,K=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ie=!1,se=!0,ne=!1,re=!0,ae=!1,oe={},le=null;const ce=Vg({},[\\\"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 de=null;const ue=Vg({},[\\\"audio\\\",\\\"video\\\",\\\"img\\\",\\\"source\\\",\\\"image\\\",\\\"track\\\"]);let he=null;const pe=Vg({},[\\\"alt\\\",\\\"class\\\",\\\"for\\\",\\\"id\\\",\\\"label\\\",\\\"name\\\",\\\"pattern\\\",\\\"placeholder\\\",\\\"role\\\",\\\"summary\\\",\\\"title\\\",\\\"value\\\",\\\"style\\\",\\\"xmlns\\\"]),me=\\\"http://www.w3.org/1998/Math/MathML\\\",ge=\\\"http://www.w3.org/2000/svg\\\",fe=\\\"http://www.w3.org/1999/xhtml\\\";let ye=fe,ve=!1,be=null;const _e=Vg({},[me,ge,fe],Mg);let Te=Vg({},[\\\"mi\\\",\\\"mo\\\",\\\"mn\\\",\\\"ms\\\",\\\"mtext\\\"]),Se=Vg({},[\\\"annotation-xml\\\"]);const we=Vg({},[\\\"title\\\",\\\"style\\\",\\\"font\\\",\\\"a\\\",\\\"script\\\"]);let ke=null;const xe=[\\\"application/xhtml+xml\\\",\\\"text/html\\\"];let Ee=null,Ce=null;const Ae=s.createElement(\\\"form\\\"),Ie=function(e){return e instanceof RegExp||e instanceof Function},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&\\\"object\\\"==typeof e||(e={}),e=Gg(e),ke=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?\\\"text/html\\\":e.PARSER_MEDIA_TYPE,Ee=\\\"application/xhtml+xml\\\"===ke?Mg:Ng,U=qg(e,\\\"ALLOWED_TAGS\\\")?Vg({},e.ALLOWED_TAGS,Ee):B,F=qg(e,\\\"ALLOWED_ATTR\\\")?Vg({},e.ALLOWED_ATTR,Ee):q,be=qg(e,\\\"ALLOWED_NAMESPACES\\\")?Vg({},e.ALLOWED_NAMESPACES,Mg):_e,he=qg(e,\\\"ADD_URI_SAFE_ATTR\\\")?Vg(Gg(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=qg(e,\\\"ADD_DATA_URI_TAGS\\\")?Vg(Gg(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=qg(e,\\\"FORBID_CONTENTS\\\")?Vg({},e.FORBID_CONTENTS,Ee):ce,z=qg(e,\\\"FORBID_TAGS\\\")?Vg({},e.FORBID_TAGS,Ee):Gg({}),H=qg(e,\\\"FORBID_ATTR\\\")?Vg({},e.FORBID_ATTR,Ee):Gg({}),oe=!!qg(e,\\\"USE_PROFILES\\\")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||hf,ye=e.NAMESPACE||fe,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&\\\"boolean\\\"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),oe&&(U=Vg({},tf),F=[],!0===oe.html&&(Vg(U,Yg),Vg(F,sf)),!0===oe.svg&&(Vg(U,Kg),Vg(F,nf),Vg(F,af)),!0===oe.svgFilters&&(Vg(U,Qg),Vg(F,nf),Vg(F,af)),!0===oe.mathMl&&(Vg(U,Zg),Vg(F,rf),Vg(F,af))),e.ADD_TAGS&&(U===B&&(U=Gg(U)),Vg(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===q&&(F=Gg(F)),Vg(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Vg(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Gg(le)),Vg(le,e.FORBID_CONTENTS,Ee)),re&&(U[\\\"#text\\\"]=!0),Q&&Vg(U,[\\\"html\\\",\\\"head\\\",\\\"body\\\"]),U.table&&(Vg(U,[\\\"tbody\\\"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.');if(\\\"function\\\"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw zg('TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML(\\\"\\\")}else void 0===T&&(T=function(e,t){if(\\\"object\\\"!=typeof e||\\\"function\\\"!=typeof e.createPolicy)return null;let i=null;const s=\\\"data-tt-policy-suffix\\\";t&&t.hasAttribute(s)&&(i=t.getAttribute(s));const n=\\\"dompurify\\\"+(i?\\\"#\\\"+i:\\\"\\\");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn(\\\"TrustedTypes policy \\\"+n+\\\" could not be created.\\\"),null}}(m,r)),null!==T&&\\\"string\\\"==typeof S&&(S=T.createHTML(\\\"\\\"));xg&&xg(e),Ce=e}},De=Vg({},[...Kg,...Qg,...Jg]),Pe=Vg({},[...Zg,...ef]),Le=function(e){Lg(i.removed,{element:e});try{_(e).removeChild(e)}catch(t){y(e)}},Oe=function(e,t){try{Lg(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Lg(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),\\\"is\\\"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,\\\"\\\")}catch(e){}},Ne=function(e){let t=null,i=null;if(Z)e=\\\"<remove></remove>\\\"+e;else{const t=Rg(e,/^[\\\\r\\\\n\\\\t ]+/);i=t&&t[0]}\\\"application/xhtml+xml\\\"===ke&&ye===fe&&(e='<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>'+e+\\\"</body></html>\\\");const n=T?T.createHTML(e):e;if(ye===fe)try{t=(new p).parseFromString(n,ke)}catch(e){}if(!t||!t.documentElement){t=w.createDocument(ye,\\\"template\\\",null);try{t.documentElement.innerHTML=ve?S:n}catch(e){}}const r=t.body||t.documentElement;return e&&i&&r.insertBefore(s.createTextNode(i),r.childNodes[0]||null),ye===fe?E.call(t,Q?\\\"html\\\":\\\"body\\\")[0]:Q?t.documentElement:r},Me=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&(\\\"string\\\"!=typeof e.nodeName||\\\"string\\\"!=typeof e.textContent||\\\"function\\\"!=typeof e.removeChild||!(e.attributes instanceof u)||\\\"function\\\"!=typeof e.removeAttribute||\\\"function\\\"!=typeof e.setAttribute||\\\"string\\\"!=typeof e.namespaceURI||\\\"function\\\"!=typeof e.insertBefore||\\\"function\\\"!=typeof e.hasChildNodes)},Ue=function(e){return\\\"function\\\"==typeof l&&e instanceof l};function Be(e,t,s){jg(e,e=>{e.call(i,t,s,Ce)})}const Fe=function(e){let t=null;if(Be(A.beforeSanitizeElements,e,null),Re(e))return Le(e),!0;const s=Ee(e.nodeName);if(Be(A.uponSanitizeElement,e,{tagName:s,allowedTags:U}),K&&e.hasChildNodes()&&!Ue(e.firstElementChild)&&$g(/<[/\\\\w!]/g,e.innerHTML)&&$g(/<[/\\\\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===_f)return Le(e),!0;if(K&&e.nodeType===Tf&&$g(/<[/\\\\w]/g,e.data))return Le(e),!0;if(!U[s]||z[s]){if(!z[s]&&$e(s)){if($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,s))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(s))return!1}if(re&&!le[s]){const t=_(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&t){for(let s=i.length-1;s>=0;--s){const n=f(i[s],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:\\\"template\\\"});const i=Ng(e.tagName),s=Ng(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?\\\"svg\\\"===i:t.namespaceURI===me?\\\"svg\\\"===i&&(\\\"annotation-xml\\\"===s||Te[s]):Boolean(De[i]):e.namespaceURI===me?t.namespaceURI===fe?\\\"math\\\"===i:t.namespaceURI===ge?\\\"math\\\"===i&&Se[s]:Boolean(Pe[i]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!Se[s])&&!(t.namespaceURI===me&&!Te[s])&&!Pe[i]&&(we[i]||!De[i]):!(\\\"application/xhtml+xml\\\"!==ke||!be[e.namespaceURI]))}(e)?(Le(e),!0):\\\"noscript\\\"!==s&&\\\"noembed\\\"!==s&&\\\"noframes\\\"!==s||!$g(/<\\\\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===bf&&(t=e.textContent,jg([I,j,D],e=>{t=Ug(t,e,\\\" \\\")}),e.textContent!==t&&(Lg(i.removed,{element:e.cloneNode()}),e.textContent=t)),Be(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},qe=function(e,t,i){if(se&&(\\\"id\\\"===t||\\\"name\\\"===t)&&(i in s||i in Ae))return!1;if(W&&!H[t]&&$g(P,t));else if(V&&$g(L,t));else if(!F[t]||H[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&$g($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||\\\"is\\\"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$g($.tagNameCheck,i)||$.tagNameCheck instanceof Function&&$.tagNameCheck(i))))return!1}else if(he[t]);else if($g(R,Ug(i,N,\\\"\\\")));else if(\\\"src\\\"!==t&&\\\"xlink:href\\\"!==t&&\\\"href\\\"!==t||\\\"script\\\"===e||0!==Bg(i,\\\"data:\\\")||!de[e]){if(G&&!$g(O,Ug(i,N,\\\"\\\")));else if(i)return!1}else;return!0},$e=function(e){return\\\"annotation-xml\\\"!==e&&Rg(e,M)},ze=function(e){Be(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const s={attrName:\\\"\\\",attrValue:\\\"\\\",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:a,namespaceURI:o,value:l}=r,c=Ee(a),d=l;let u=\\\"value\\\"===a?d:Fg(d);if(s.attrName=c,s.attrValue=u,s.keepAttr=!0,s.forceKeepAttr=void 0,Be(A.uponSanitizeAttribute,e,s),u=s.attrValue,!ne||\\\"id\\\"!==c&&\\\"name\\\"!==c||(Oe(a,e),u=\\\"user-content-\\\"+u),K&&$g(/((--!?|])>)|<\\\\/(style|title)/i,u)){Oe(a,e);continue}if(s.forceKeepAttr)continue;if(!s.keepAttr){Oe(a,e);continue}if(!X&&$g(/\\\\/>/i,u)){Oe(a,e);continue}Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")});const h=Ee(e.nodeName);if(qe(h,c,u)){if(T&&\\\"object\\\"==typeof m&&\\\"function\\\"==typeof m.getAttributeType)if(o);else switch(m.getAttributeType(h,c)){case\\\"TrustedHTML\\\":u=T.createHTML(u);break;case\\\"TrustedScriptURL\\\":u=T.createScriptURL(u)}if(u!==d)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Re(e)?Le(e):Pg(i.removed)}catch(t){Oe(a,e)}}else Oe(a,e)}Be(A.afterSanitizeAttributes,e,null)},He=function e(t){let i=null;const s=Me(t);for(Be(A.beforeSanitizeShadowDOM,t,null);i=s.nextNode();)Be(A.uponSanitizeShadowNode,i,null),Fe(i),ze(i),i.content instanceof a&&e(i.content);Be(A.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null,r=null,o=null,c=null;if(ve=!e,ve&&(e=\\\"\\\\x3c!--\\\\x3e\\\"),\\\"string\\\"!=typeof e&&!Ue(e)){if(\\\"function\\\"!=typeof e.toString)throw zg(\\\"toString is not a function\\\");if(\\\"string\\\"!=typeof(e=e.toString()))throw zg(\\\"dirty is not a string, aborting\\\")}if(!i.isSupported)return e;if(J||je(t),i.removed=[],\\\"string\\\"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||z[t])throw zg(\\\"root node is forbidden and cannot be sanitized in-place\\\")}}else if(e instanceof l)s=Ne(\\\"\\\\x3c!----\\\\x3e\\\"),r=s.ownerDocument.importNode(e,!0),r.nodeType===vf&&\\\"BODY\\\"===r.nodeName||\\\"HTML\\\"===r.nodeName?s=r:s.appendChild(r);else{if(!ee&&!Y&&!Q&&-1===e.indexOf(\\\"<\\\"))return T&&ie?T.createHTML(e):e;if(s=Ne(e),!s)return ee?null:ie?S:\\\"\\\"}s&&Z&&Le(s.firstChild);const d=Me(ae?e:s);for(;o=d.nextNode();)Fe(o),ze(o),o.content instanceof a&&He(o.content);if(ae)return e;if(ee){if(te)for(c=x.call(s.ownerDocument);s.firstChild;)c.appendChild(s.firstChild);else c=s;return(F.shadowroot||F.shadowrootmode)&&(c=C.call(n,c,!0)),c}let u=Q?s.outerHTML:s.innerHTML;return Q&&U[\\\"!doctype\\\"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&$g(gf,s.ownerDocument.doctype.name)&&(u=\\\"<!DOCTYPE \\\"+s.ownerDocument.doctype.name+\\\">\\\\n\\\"+u),Y&&jg([I,j,D],e=>{u=Ug(u,e,\\\" \\\")}),T&&ie?T.createHTML(u):u},i.setConfig=function(){je(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},i.clearConfig=function(){Ce=null,J=!1},i.isValidAttribute=function(e,t,i){Ce||je({});const s=Ee(e),n=Ee(t);return qe(s,n,i)},i.addHook=function(e,t){\\\"function\\\"==typeof t&&Lg(A[e],t)},i.removeHook=function(e,t){if(void 0!==t){const i=Dg(A[e],t);return-1===i?void 0:Og(A[e],i,1)[0]}return Pg(A[e])},i.removeHooks=function(e){A[e]=[]},i.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();function xf(e){for(var t=e.length/6|0,i=new Array(t),s=0;s<t;)i[s]=\\\"#\\\"+e.slice(6*s,6*++s);return i}function Ef(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Cf(e,t){var i=Object.create(e.prototype);for(var s in t)i[s]=t[s];return i}function Af(){}var If=.7,jf=1/If,Df=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",Pf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",Lf=\\\"\\\\\\\\s*([+-]?(?:\\\\\\\\d*\\\\\\\\.)?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",Of=/^#([0-9a-f]{3,8})$/,Nf=new RegExp(`^rgb\\\\\\\\(${Df},${Df},${Df}\\\\\\\\)$`),Mf=new RegExp(`^rgb\\\\\\\\(${Lf},${Lf},${Lf}\\\\\\\\)$`),Rf=new RegExp(`^rgba\\\\\\\\(${Df},${Df},${Df},${Pf}\\\\\\\\)$`),Uf=new RegExp(`^rgba\\\\\\\\(${Lf},${Lf},${Lf},${Pf}\\\\\\\\)$`),Bf=new RegExp(`^hsl\\\\\\\\(${Pf},${Lf},${Lf}\\\\\\\\)$`),Ff=new RegExp(`^hsla\\\\\\\\(${Pf},${Lf},${Lf},${Pf}\\\\\\\\)$`),qf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $f(){return this.rgb().formatHex()}function zf(){return this.rgb().formatRgb()}function Hf(e){var t,i;return e=(e+\\\"\\\").trim().toLowerCase(),(t=Of.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Vf(t):3===i?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Wf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Mf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rf.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?Wf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bf.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):qf.hasOwnProperty(e)?Vf(qf[e]):\\\"transparent\\\"===e?new Xf(NaN,NaN,NaN,0):null}function Vf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Wf(e,t,i,s){return s<=0&&(e=t=i=NaN),new Xf(e,t,i,s)}function Gf(e,t,i,s){return 1===arguments.length?((n=e)instanceof Af||(n=Hf(n)),n?new Xf((n=n.rgb()).r,n.g,n.b,n.opacity):new Xf):new Xf(e,t,i,null==s?1:s);var n}function Xf(e,t,i,s){this.r=+e,this.g=+t,this.b=+i,this.opacity=+s}function Yf(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}`}function Kf(){const e=Qf(this.opacity);return`${1===e?\\\"rgb(\\\":\\\"rgba(\\\"}${Jf(this.r)}, ${Jf(this.g)}, ${Jf(this.b)}${1===e?\\\")\\\":`, ${e})`}`}function Qf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zf(e){return((e=Jf(e))<16?\\\"0\\\":\\\"\\\")+e.toString(16)}function ey(e,t,i,s){return s<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new iy(e,t,i,s)}function ty(e){if(e instanceof iy)return new iy(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Hf(e)),!e)return new iy;if(e instanceof iy)return e;var t=(e=e.rgb()).r/255,i=e.g/255,s=e.b/255,n=Math.min(t,i,s),r=Math.max(t,i,s),a=NaN,o=r-n,l=(r+n)/2;return o?(a=t===r?(i-s)/o+6*(i<s):i===r?(s-t)/o+2:(t-i)/o+4,o/=l<.5?r+n:2-r-n,a*=60):o=l>0&&l<1?0:a,new iy(a,o,l,e.opacity)}function iy(e,t,i,s){this.h=+e,this.s=+t,this.l=+i,this.opacity=+s}function sy(e){return(e=(e||0)%360)<0?e+360:e}function ny(e){return Math.max(0,Math.min(1,e||0))}function ry(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}Ef(Af,Hf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:zf,toString:zf}),Ef(Xf,Gf,Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Jf(this.r),Jf(this.g),Jf(this.b),Qf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yf,formatHex:Yf,formatHex8:function(){return`#${Zf(this.r)}${Zf(this.g)}${Zf(this.b)}${Zf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kf,toString:Kf})),Ef(iy,function(e,t,i,s){return 1===arguments.length?ty(e):new iy(e,t,i,null==s?1:s)},Cf(Af,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new iy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?If:Math.pow(If,e),new iy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*t,n=2*i-s;return new Xf(ry(e>=240?e-240:e+120,n,s),ry(e,n,s),ry(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new iy(sy(this.h),ny(this.s),ny(this.l),Qf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qf(this.opacity);return`${1===e?\\\"hsl(\\\":\\\"hsla(\\\"}${sy(this.h)}, ${100*ny(this.s)}%, ${100*ny(this.l)}%${1===e?\\\")\\\":`, ${e})`}`}}));var ay=e=>()=>e;function oy(e){return 1===(e=+e)?ly:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(s){return Math.pow(e+s*t,i)}}(t,i,e):ay(isNaN(t)?i:t)}}function ly(e,t){var i=t-e;return i?function(e,t){return function(i){return e+i*t}}(e,i):ay(isNaN(e)?t:e)}var cy=function e(t){var i=oy(t);function s(e,t){var s=i((e=Gf(e)).r,(t=Gf(t)).r),n=i(e.g,t.g),r=i(e.b,t.b),a=ly(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=r(t),e.opacity=a(t),e+\\\"\\\"}}return s.gamma=e,s}(1);var dy,uy=(dy=function(e){var t=e.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),n=e[s],r=e[s+1],a=s>0?e[s-1]:2*n-r,o=s<t-1?e[s+2]:2*r-n;return function(e,t,i,s,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*i+(1+3*e+3*r-3*a)*s+a*n)/6}((i-s/t)*t,a,n,r,o)}},function(e){var t,i,s=e.length,n=new Array(s),r=new Array(s),a=new Array(s);for(t=0;t<s;++t)i=Gf(e[t]),n[t]=i.r||0,r[t]=i.g||0,a[t]=i.b||0;return n=dy(n),r=dy(r),a=dy(a),i.opacity=1,function(e){return i.r=n(e),i.g=r(e),i.b=a(e),i+\\\"\\\"}});function hy(e,t){t||(t=[]);var i,s=e?Math.min(t.length,e.length):0,n=t.slice();return function(r){for(i=0;i<s;++i)n[i]=e[i]*(1-r)+t[i]*r;return n}}function py(e,t){var i,s=t?t.length:0,n=e?Math.min(s,e.length):0,r=new Array(n),a=new Array(s);for(i=0;i<n;++i)r[i]=_y(e[i],t[i]);for(;i<s;++i)a[i]=t[i];return function(e){for(i=0;i<n;++i)a[i]=r[i](e);return a}}function my(e,t){var i=new Date;return e=+e,t=+t,function(s){return i.setTime(e*(1-s)+t*s),i}}function gy(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function fy(e,t){var i,s={},n={};for(i in null!==e&&\\\"object\\\"==typeof e||(e={}),null!==t&&\\\"object\\\"==typeof t||(t={}),t)i in e?s[i]=_y(e[i],t[i]):n[i]=t[i];return function(e){for(i in s)n[i]=s[i](e);return n}}var yy=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,vy=new RegExp(yy.source,\\\"g\\\");function by(e,t){var i,s,n,r=yy.lastIndex=vy.lastIndex=0,a=-1,o=[],l=[];for(e+=\\\"\\\",t+=\\\"\\\";(i=yy.exec(e))&&(s=vy.exec(t));)(n=s.index)>r&&(n=t.slice(r,n),o[a]?o[a]+=n:o[++a]=n),(i=i[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:gy(i,s)})),r=vy.lastIndex;return r<t.length&&(n=t.slice(r),o[a]?o[a]+=n:o[++a]=n),o.length<2?l[0]?function(e){return function(t){return e(t)+\\\"\\\"}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,s=0;s<t;++s)o[(i=l[s]).i]=i.x(e);return o.join(\\\"\\\")})}function _y(e,t){var i,s,n=typeof t;return null==t||\\\"boolean\\\"===n?ay(t):(\\\"number\\\"===n?gy:\\\"string\\\"===n?(i=Hf(t))?(t=i,cy):by:t instanceof Hf?cy:t instanceof Date?my:(s=t,!ArrayBuffer.isView(s)||s instanceof DataView?Array.isArray(t)?py:\\\"function\\\"!=typeof t.valueOf&&\\\"function\\\"!=typeof t.toString||isNaN(t)?fy:gy:hy))(e,t)}function Ty(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var Sy=e=>uy(e[e.length-1]),wy=Sy(new Array(3).concat(\\\"deebf79ecae13182bd\\\",\\\"eff3ffbdd7e76baed62171b5\\\",\\\"eff3ffbdd7e76baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed63182bd08519c\\\",\\\"eff3ffc6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\\\",\\\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\\\").map(xf)),ky=Sy(new Array(3).concat(\\\"e5f5e0a1d99b31a354\\\",\\\"edf8e9bae4b374c476238b45\\\",\\\"edf8e9bae4b374c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47631a354006d2c\\\",\\\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\\\",\\\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\\\").map(xf));function xy(e,t,i){const s=e.slice();return s[44]=t[i],s}function Ey(e,t,i){const s=e.slice();return s[47]=t[i],s[49]=i,s}function Cy(e,t,i){const s=e.slice();return s[50]=t[i],s[49]=i,s}function Ay(t){let i;return{c(){i=f(\\\"div\\\"),i.textContent=\\\"Missing tokens will show on completion.\\\",S(i,\\\"class\\\",\\\"text-sm border-b text-red-700 dark:text-red-400\\\")},m(e,t){p(e,i,t)},p:e,i:e,o:e,d(e){e&&m(i)}}}function Iy(e){let t,i,s,n,r,a,o,l,c,d;n=new vg({props:{token:e[11],index:-1,underlineStyle:e[6](e[11]),bgStyle:e[7](e[11])}});let u=\\\"None\\\"!==e[2]&&jy(e),g=\\\"None\\\"!==e[3]&&Dy(e),y=void 0!==e[11].top_k&&Py(e);return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),s=f(\\\"div\\\"),J(n.$$.fragment),r=b(),a=f(\\\"table\\\"),o=f(\\\"tbody\\\"),u&&u.c(),l=b(),g&&g.c(),c=b(),y&&y.c(),S(s,\\\"class\\\",\\\"mb-5 mt-1\\\"),S(o,\\\"class\\\",\\\"text-xs tracking-wider dark:text-white\\\"),S(a,\\\"class\\\",\\\"w-full\\\"),S(i,\\\"class\\\",\\\"text-2xl px-1 pb-1 text-left w-full bg-white dark:bg-[#5A5F72] dark:text-white\\\"),S(t,\\\"class\\\",\\\"col-1 flex flex-col items-center\\\")},m(e,m){p(e,t,m),h(t,i),h(i,s),Z(n,s,null),h(i,r),h(i,a),h(a,o),u&&u.m(o,null),h(o,l),g&&g.m(o,null),h(t,c),y&&y.m(t,null),d=!0},p(e,i){const s={};2048&i[0]&&(s.token=e[11]),2112&i[0]&&(s.underlineStyle=e[6](e[11])),2176&i[0]&&(s.bgStyle=e[7](e[11])),n.$set(s),\\\"None\\\"!==e[2]?u?u.p(e,i):(u=jy(e),u.c(),u.m(o,l)):u&&(u.d(1),u=null),\\\"None\\\"!==e[3]?g?g.p(e,i):(g=Dy(e),g.c(),g.m(o,null)):g&&(g.d(1),g=null),void 0!==e[11].top_k?y?y.p(e,i):(y=Py(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i(e){d||(Y(n.$$.fragment,e),d=!0)},o(e){K(n.$$.fragment,e),d=!1},d(e){e&&m(t),ee(n),u&&u.d(),g&&g.d(),y&&y.d()}}}function jy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[2]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"style\\\",r=e[7](e[11])),S(l,\\\"class\\\",\\\"pl-1\\\"),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){4&t[0]&&w(n,e[2]),2176&t[0]&&r!==(r=e[7](e[11]))&&S(s,\\\"style\\\",r),2052&t[0]&&d!==(d=(e[12](e[11],e[2])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Dy(e){let t,i,s,n,r,a,o,l,c,d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),n=v(e[3]),a=b(),o=f(\\\"td\\\"),l=f(\\\"span\\\"),c=v(d),S(s,\\\"class\\\",\\\"border-b-2\\\"),S(s,\\\"style\\\",r=e[6](e[11])),S(o,\\\"class\\\",\\\"text-right dark:text-white\\\")},m(e,r){p(e,t,r),h(t,i),h(i,s),h(s,n),h(t,a),h(t,o),h(o,l),h(l,c)},p(e,t){8&t[0]&&w(n,e[3]),2112&t[0]&&r!==(r=e[6](e[11]))&&S(s,\\\"style\\\",r),2056&t[0]&&d!==(d=(e[12](e[11],e[3])??\\\"None\\\")+\\\"\\\")&&w(c,d)},d(e){e&&m(t)}}}function Py(e){let t,i,s,n,r,a,o=Q(e[11].top_k),l=[];for(let t=0;t<o.length;t+=1)l[t]=Ly(Cy(e,o,t));return{c(){t=f(\\\"hr\\\"),i=b(),s=f(\\\"table\\\"),n=f(\\\"thead\\\"),n.innerHTML='<tr><th class=\\\"px-1 pb-1 font-normal text-xs text-left text-gray-700 dark:text-white tracking-wide\\\">Candidate</th> <th class=\\\"px-1 pb-1 font-normal text-xs text-right text-gray-700 dark:text-white tracking-wide\\\">Prob</th></tr>',r=b(),a=f(\\\"tbody\\\");for(let e=0;e<l.length;e+=1)l[e].c();S(t,\\\"class\\\",\\\"bg-gray-400 dark:bg-gray-600 w-full my-2\\\"),S(s,\\\"class\\\",\\\"w-full\\\")},m(e,o){p(e,t,o),p(e,i,o),p(e,s,o),h(s,n),h(s,r),h(s,a);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(a,null)},p(e,t){if(264192&t[0]){let i;for(o=Q(e[11].top_k),i=0;i<o.length;i+=1){const s=Cy(e,o,i);l[i]?l[i].p(s,t):(l[i]=Ly(s),l[i].c(),l[i].m(a,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=o.length}},d(e){e&&(m(t),m(i),m(s)),g(l,e)}}}function Ly(e){let t,i,s,n,r,a,o,l,c,d=e[18](e[50].text)+\\\"\\\",u=e[50].prob?.toFixed(3)+\\\"\\\";return{c(){t=f(\\\"tr\\\"),i=f(\\\"td\\\"),s=f(\\\"span\\\"),r=b(),a=f(\\\"td\\\"),o=v(u),c=b(),S(s,\\\"class\\\",\\\"bg-gray-200 dark:bg-gray-700 dark:text-white\\\"),S(i,\\\"class\\\",n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(a,\\\"class\\\",l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\")),S(t,\\\"class\\\",\\\"\\\"+(5===e[49]?\\\"border-t border-dashed border-gray-300 dark:border-gray-600\\\":\\\"\\\"))},m(e,n){p(e,t,n),h(t,i),h(i,s),s.innerHTML=d,h(t,r),h(t,a),h(a,o),h(t,c)},p(e,t){2048&t[0]&&d!==(d=e[18](e[50].text)+\\\"\\\")&&(s.innerHTML=d),2048&t[0]&&n!==(n=\\\"px-1 text-left font-mono text-sm decoration-2 \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(i,\\\"class\\\",n),2048&t[0]&&u!==(u=e[50].prob?.toFixed(3)+\\\"\\\")&&w(o,u),2048&t[0]&&l!==(l=\\\"px-1 text-right font-mono text-sm decoration-2 dark:text-white \\\"+(e[50].is_masked?\\\"line-through\\\":\\\"\\\"))&&S(a,\\\"class\\\",l)},d(e){e&&m(t)}}}function Oy(t){let i,s,n,r;return i=new vg({props:{token:t[19],index:-1}}),{c(){J(i.$$.fragment),s=b(),n=f(\\\"div\\\"),S(n,\\\"class\\\",\\\"basis-full h-2\\\")},m(e,t){Z(i,e,t),p(e,s,t),p(e,n,t),r=!0},p:e,i(e){r||(Y(i.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),r=!1},d(e){e&&(m(s),m(n)),ee(i,e)}}}function Ny(e){let t,i,s=e[49]>0&&function(){let e;return{c(){e=f(\\\"div\\\"),S(e,\\\"class\\\",\\\"basis-full py-3\\\")},m(t,i){p(t,e,i)},d(t){t&&m(e)}}}();return{c(){s&&s.c(),t=b(),i=f(\\\"div\\\"),S(i,\\\"class\\\",\\\"basis-full h-0\\\")},m(e,n){s&&s.m(e,n),p(e,t,n),p(e,i,n)},d(e){e&&(m(t),m(i)),s&&s.d(e)}}}function My(e){let t,i,s,n=\\\"\\\"!==e[47].role&&Ny(e);return i=new vg({props:{token:e[47],index:e[49],underlineStyle:e[6](e[47]),bgStyle:e[7](e[47])}}),{c(){n&&n.c(),t=b(),J(i.$$.fragment)},m(e,r){n&&n.m(e,r),p(e,t,r),Z(i,e,r),s=!0},p(e,s){\\\"\\\"!==e[47].role?n||(n=Ny(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null);const r={};32&s[0]&&(r.token=e[47]),96&s[0]&&(r.underlineStyle=e[6](e[47])),160&s[0]&&(r.bgStyle=e[7](e[47])),i.$set(r)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),n&&n.d(e),ee(i,e)}}}function Ry(e){let t;return{c(){t=f(\\\"span\\\"),t.textContent=\\\">\\\\n           \\\",S(t,\\\"class\\\",\\\"inline-block mt-2 border-b-2 border-white dark:border-gray-900 bg-gray-700 dark:bg-gray-300 animate-cpulse\\\")},m(e,i){p(e,t,i)},d(e){e&&m(t)}}}function Uy(e){let t,i,s,n,r=\\\"audio\\\"==e[44].data.type&&By(e),a=\\\"video\\\"==e[44].data.type&&Fy(e),o=\\\"image\\\"==e[44].data.type&&qy(e);return{c(){r&&r.c(),t=b(),a&&a.c(),i=b(),o&&o.c(),s=_()},m(e,l){r&&r.m(e,l),p(e,t,l),a&&a.m(e,l),p(e,i,l),o&&o.m(e,l),p(e,s,l),n=!0},p(e,n){\\\"audio\\\"==e[44].data.type?r?(r.p(e,n),16&n[0]&&Y(r,1)):(r=By(e),r.c(),Y(r,1),r.m(t.parentNode,t)):r&&(G(),K(r,1,1,()=>{r=null}),X()),\\\"video\\\"==e[44].data.type?a?(a.p(e,n),16&n[0]&&Y(a,1)):(a=Fy(e),a.c(),Y(a,1),a.m(i.parentNode,i)):a&&(G(),K(a,1,1,()=>{a=null}),X()),\\\"image\\\"==e[44].data.type?o?o.p(e,n):(o=qy(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(e){n||(Y(r),Y(a),n=!0)},o(e){K(r),K(a),n=!1},d(e){e&&(m(t),m(i),m(s)),r&&r.d(e),a&&a.d(e),o&&o.d(e)}}}function By(e){let t,i,s;return i=new Ce({props:{audioData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.audioData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function Fy(e){let t,i,s;return i=new cg({props:{videoData:e[44].data}}),{c(){t=f(\\\"div\\\"),J(i.$$.fragment),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,n){p(e,t,n),Z(i,t,null),s=!0},p(e,t){const s={};16&t[0]&&(s.videoData=e[44].data),i.$set(s)},i(e){s||(Y(i.$$.fragment,e),s=!0)},o(e){K(i.$$.fragment,e),s=!1},d(e){e&&m(t),ee(i)}}}function qy(e){let t,i,s,n;return{c(){t=f(\\\"div\\\"),i=f(\\\"img\\\"),n=b(),o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)||S(i,\\\"src\\\",s),S(i,\\\"alt\\\",\\\"Image output\\\"),S(t,\\\"class\\\",\\\"my-3\\\")},m(e,s){p(e,t,s),h(t,i),h(t,n)},p(e,t){16&t[0]&&!o(i.src,s=`data:${e[44].data.format};base64,${e[44].data.value}`)&&S(i,\\\"src\\\",s)},d(e){e&&m(t)}}}function $y(e){let t,i,s=\\\"media\\\"===e[44].type&&Uy(e);return{c(){s&&s.c(),t=_()},m(e,n){s&&s.m(e,n),p(e,t,n),i=!0},p(e,i){\\\"media\\\"===e[44].type?s?(s.p(e,i),16&i[0]&&Y(s,1)):(s=Uy(e),s.c(),Y(s,1),s.m(t.parentNode,t)):s&&(G(),K(s,1,1,()=>{s=null}),X())},i(e){i||(Y(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d(e)}}}function zy(e){let t,i,n,r,a,o,l,c,u,y,v,_,w,k;const E=[Iy,Ay],C=[];function A(e,t){return e[11]?0:1}n=A(e),r=C[n]=E[n](e);let I=e[1]&&Oy(e),j=Q(e[5]),D=[];for(let t=0;t<j.length;t+=1)D[t]=My(Ey(e,j,t));const P=e=>K(D[e],1,1,()=>{D[e]=null});let L=!1===e[0]&&Ry(),O=Q(e[4]),N=[];for(let t=0;t<O.length;t+=1)N[t]=$y(xy(e,O,t));const M=e=>K(N[e],1,1,()=>{N[e]=null});return{c(){t=f(\\\"div\\\"),i=f(\\\"div\\\"),r.c(),a=b(),o=f(\\\"div\\\"),l=f(\\\"div\\\"),c=f(\\\"span\\\"),I&&I.c(),u=b();for(let e=0;e<D.length;e+=1)D[e].c();y=b(),L&&L.c(),v=b();for(let e=0;e<N.length;e+=1)N[e].c();S(t,\\\"class\\\",\\\"px-1 pt-1 pb-3 absolute opacity-95 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600 pointer-events-none z-50\\\"),x(t,\\\"top\\\",e[10]+\\\"px\\\"),x(t,\\\"left\\\",e[9]+\\\"px\\\"),x(t,\\\"display\\\",\\\"none\\\"),S(c,\\\"class\\\",\\\"flex flex-wrap text-sm\\\"),S(c,\\\"role\\\",\\\"main\\\"),S(l,\\\"class\\\",\\\"px-4\\\"),S(o,\\\"class\\\",\\\"pt-6 pb-6 flex text-gray-800 dark:text-gray-200 font-token\\\")},m(s,r){p(s,t,r),h(t,i),C[n].m(i,null),e[32](t),p(s,a,r),p(s,o,r),h(o,l),h(l,c),I&&I.m(c,null),h(c,u);for(let e=0;e<D.length;e+=1)D[e]&&D[e].m(c,null);h(c,y),L&&L.m(c,null),h(l,v);for(let e=0;e<N.length;e+=1)N[e]&&N[e].m(l,null);_=!0,w||(k=[d(bg.call(null,c,Hy)),T(c,\\\"longmouseover\\\",e[13]),T(c,\\\"longmouseout\\\",e[15]),T(c,\\\"mouseover\\\",e[14]),T(c,\\\"mouseout\\\",e[16]),T(c,\\\"focus\\\",e[17]),T(c,\\\"blur\\\",e[17])],w=!0)},p(e,s){let a=n;if(n=A(e),n===a?C[n].p(e,s):(G(),K(C[a],1,1,()=>{C[a]=null}),X(),r=C[n],r?r.p(e,s):(r=C[n]=E[n](e),r.c()),Y(r,1),r.m(i,null)),(!_||1024&s[0])&&x(t,\\\"top\\\",e[10]+\\\"px\\\"),(!_||512&s[0])&&x(t,\\\"left\\\",e[9]+\\\"px\\\"),e[1]?I?(I.p(e,s),2&s[0]&&Y(I,1)):(I=Oy(e),I.c(),Y(I,1),I.m(c,u)):I&&(G(),K(I,1,1,()=>{I=null}),X()),224&s[0]){let t;for(j=Q(e[5]),t=0;t<j.length;t+=1){const i=Ey(e,j,t);D[t]?(D[t].p(i,s),Y(D[t],1)):(D[t]=My(i),D[t].c(),Y(D[t],1),D[t].m(c,y))}for(G(),t=j.length;t<D.length;t+=1)P(t);X()}if(!1===e[0]?L||(L=Ry(),L.c(),L.m(c,null)):L&&(L.d(1),L=null),16&s[0]){let t;for(O=Q(e[4]),t=0;t<O.length;t+=1){const i=xy(e,O,t);N[t]?(N[t].p(i,s),Y(N[t],1)):(N[t]=$y(i),N[t].c(),Y(N[t],1),N[t].m(l,null))}for(G(),t=O.length;t<N.length;t+=1)M(t);X()}},i(e){if(!_){Y(r),Y(I);for(let e=0;e<j.length;e+=1)Y(D[e]);for(let e=0;e<O.length;e+=1)Y(N[e]);_=!0}},o(e){K(r),K(I),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)K(D[e]);N=N.filter(Boolean);for(let e=0;e<N.length;e+=1)K(N[e]);_=!1},d(i){i&&(m(t),m(a),m(o)),C[n].d(),e[32](null),I&&I.d(),g(D,i),L&&L.d(),g(N,i),w=!1,s(k)}}}const Hy=200;function Vy(e,t,i){let{components:s}=t,{isCompleted:n}=t,{isError:r}=t,{requireFullReplay:a=!1}=t,{bgField:o=\\\"Token\\\"}=t,{underlineField:l=\\\"Probability\\\"}=t,{backtrackCount:c=0}=t,{resetCount:d=0}=t,{isDarkMode:u=!1}=t,h=e=>\\\"\\\",p=e=>\\\"\\\";const m=e=>{const t=(e=>{const t=e.match(/rgba?\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+),\\\\s*(\\\\d+)/);return t?.299*parseInt(t[1],10)+.587*parseInt(t[2],10)+.114*parseInt(t[3],10):(console.error(\\\"Invalid RGBA format.\\\"),0)})(e);return t>186?\\\"rgba(0, 0, 0, 1)\\\":\\\"rgba(255, 255, 255, 1)\\\"},g=(e,t)=>{if(void 0===e)return\\\"\\\";let i=wy(e);return`background-color: ${i}; color: ${m(i)};`},f=(e,t)=>{if(void 0===e)return\\\"\\\";return`border-bottom-color: ${ky(.7*e)};`},y=(e,t)=>{let i=\\\"\\\";return i=e.is_input?\\\"rgba(255, 255, 255, 0)\\\":e.is_force_forwarded?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(243, 244, 246, 1)\\\":e.is_generated?t?\\\"rgba(88, 119, 173, 1)\\\":\\\"rgba(229, 231, 235, 1)\\\":\\\"rgba(255, 255, 254, 0)\\\",`background-color: ${i};`};let v,b,_=[],T=[],S=[],w=[],k=new Set,x=new Set,E={},C=0,A={},I=0,j=0,D=0,P=0;let L=\\\"\\\",O=\\\"\\\";return e.$$set=e=>{\\\"components\\\"in e&&i(20,s=e.components),\\\"isCompleted\\\"in e&&i(0,n=e.isCompleted),\\\"isError\\\"in e&&i(21,r=e.isError),\\\"requireFullReplay\\\"in e&&i(1,a=e.requireFullReplay),\\\"bgField\\\"in e&&i(2,o=e.bgField),\\\"underlineField\\\"in e&&i(3,l=e.underlineField),\\\"backtrackCount\\\"in e&&i(22,c=e.backtrackCount),\\\"resetCount\\\"in e&&i(23,d=e.resetCount),\\\"isDarkMode\\\"in e&&i(24,u=e.isDarkMode)},e.$$.update=()=>{if(1077936128&e.$$.dirty[0]&&c!==I&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(30,I=c)),8388608&e.$$.dirty[0]|1&e.$$.dirty[1]&&d!==j&&(i(28,C=0),i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(31,j=d)),1060110397&e.$$.dirty[0]){for(0===s.length?(i(5,T=[]),i(4,_=[]),i(25,S=[]),i(26,w=[]),k.clear(),x.clear(),i(27,E={}),i(28,C=0)):C>s.length&&i(28,C=s.length);C<s.length;i(28,C+=1)){const e=s[C],t=(e,t)=>({type:\\\"media\\\",data:{type:e,value:t.value,format:t.format,context:{roleStack:[...S],index:C}}});if(oe(e)){S.push(e),w.push(e.closer_text||\\\"\\\");const t=e.name||\\\"\\\";i(27,E[t]=(E[t]||0)+1,E)}else if(le(e))S.length>0&&(S.pop(),w.pop());else if(he(e))_.push(t(\\\"audio\\\",e));else if(ue(e))_.push(t(\\\"image\\\",e));else if(pe(e))_.push(t(\\\"video\\\",e));else if(de(e)||ce(e)&&!e.value.includes(\\\"<|im_start|>\\\")&&!e.value.includes(\\\"<|im_end|>\\\"))if(0===S.length)if(0!==w.length&&w[w.length-1]===e.value){const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!0,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};k.add(t.text),i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t),w.pop()}else{const t={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(t.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(t)}else{const t=S[S.length-1];if(e.value.includes(\\\"<|im_start|>\\\")||e.value.includes(\\\"<|im_end|>\\\"))k.add(e.value);else{const s=t.name||\\\"\\\",n=`${s}-${E[s]||0}`,r=!x.has(n);r&&x.add(n);const a={text:e.value,prob:de(e)?e.token.prob:0,latency_ms:e.latency_ms,role:r&&t.name||\\\"\\\",special:!1,is_input:e.is_input,is_force_forwarded:e.is_force_forwarded,is_generated:e.is_generated,is_masked:!!de(e)&&e.token.masked,top_k:de(e)&&null!==e.top_k?e.top_k.map(e=>({text:e.token,prob:e.prob,is_masked:e.masked,latency_ms:0})):void 0};i(29,A[\\\"latency.max\\\"]=Math.max(a.latency_ms,A[\\\"latency.max\\\"]||0),A),T.push(a)}}}0!==S.length||w.length,i(6,h=!n||r?e=>\\\"border: none;\\\":\\\"Probability\\\"===l?e=>f(e.prob):\\\"Latency (ms)\\\"===l?e=>f(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"])):e=>\\\"border: none;\\\"),!n||r||\\\"Type\\\"===o?i(7,p=e=>y(e,u)):\\\"Probability\\\"===o?i(7,p=e=>g(e.prob)):\\\"Latency (ms)\\\"===o?(i(7,p=e=>g(Math.log(e.latency_ms)/Math.log(A[\\\"latency.max\\\"]))),console.log(A[\\\"latency.max\\\"])):i(7,p=e=>\\\"\\\"),i(0,n),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(21,r),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(20,s),i(42,k),i(43,x),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(22,c),i(30,I),i(23,d),i(31,j),i(4,_),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(29,A),i(5,T),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o),i(5,T),i(22,c),i(30,I),i(42,k),i(43,x),i(23,d),i(31,j),i(20,s),i(28,C),i(25,S),i(26,w),i(27,E),i(4,_),i(29,A),i(0,n),i(21,r),i(3,l),i(24,u),i(2,o)}},[n,a,o,l,_,T,h,p,v,D,P,b,(e,t)=>{var i,s;if(\\\"Probability\\\"===t)return null===(i=e.prob)||void 0===i?void 0:i.toFixed(3);if(\\\"Latency (ms)\\\"===t)return null===(s=e.latency_ms)||void 0===s?void 0:s.toFixed(0);if(\\\"Type\\\"===t){if(e.is_input)return\\\"Input\\\";if(e.is_force_forwarded)return\\\"Forwarded\\\";if(e.is_generated)return\\\"Generated\\\"}else if(\\\"None\\\"===t)return\\\"\\\"},e=>{const t=e.detail.target;if(t.matches(\\\".token-grid-item\\\")){const e=t.dataset.index,s=15,n=10,r=t.getBoundingClientRect();i(9,D=r.left+window.scrollX+r.width/2+s),i(10,P=r.bottom+window.scrollY+n);const a=Number(e);i(11,b=T[a]),i(8,v.style.display=\\\"block\\\",v),requestAnimationFrame(()=>{const e=v.getBoundingClientRect();D+e.width>window.innerWidth&&i(9,D=window.innerWidth-e.width-10),P+e.height>window.innerHeight&&i(10,P=r.top+window.scrollY-e.height-n),D<10&&i(9,D=10),P<10&&i(10,P=10)})}},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;L=t.style.color,O=t.style.backgroundColor,t.style.color=\\\"rgb(249, 250, 251)\\\",t.style.backgroundColor=\\\"rgb(75, 85, 99)\\\"}}},e=>{e.detail.target.matches(\\\".token-grid-item\\\")&&i(8,v.style.display=\\\"none\\\",v)},e=>{var t;const i=e.target;if(i.matches(\\\".token-grid-item\\\")){const e=i.dataset.index,s=null===(t=i.parentElement)||void 0===t?void 0:t.querySelectorAll(`.token-grid-item[data-index=\\\"${e}\\\"]`);if(s)for(const e of s){const t=e;t.style.color=L,t.style.backgroundColor=O}}},e=>{},e=>kf.sanitize(e.replaceAll(\\\" \\\",\\\"&nbsp;\\\").replaceAll(\\\"\\\\t\\\",\\\"\\\\\\\\t\\\").replaceAll(\\\"\\\\n\\\",\\\"\\\\\\\\n\\\")),{text:\\\"...\\\",prob:1,latency_ms:0,role:\\\"\\\",special:!1,is_input:!0,is_force_forwarded:!1,is_generated:!0},s,r,c,d,u,S,w,E,C,A,I,j,function(e){N[e?\\\"unshift\\\":\\\"push\\\"](()=>{v=e,i(8,v)})}]}class Wy extends se{constructor(e){super(),ie(this,e,Vy,zy,r,{components:20,isCompleted:0,isError:21,requireFullReplay:1,bgField:2,underlineField:3,backtrackCount:22,resetCount:23,isDarkMode:24},null,[-1,-1])}}function Gy(e){let t,i=null;return D(()=>{t=document.querySelector(\\\"html\\\"),window.addEventListener(\\\"load\\\",()=>{i=setInterval(()=>{const e=t.getBoundingClientRect().height;if(0!==e&&t.checkVisibility()){const t={type:\\\"resize\\\",content:{height:`${e}px`,width:\\\"100%\\\"}};fe.set(t)}},20)})}),P(()=>{clearInterval(i)}),[]}class Xy extends se{constructor(e){super(),ie(this,e,Gy,null,r,{})}}const{window:Yy}=u;function Ky(t){let i,s;return{c:e,m(e,n){i||(s=T(Yy,\\\"message\\\",t[0]),i=!0)},p:e,i:e,o:e,d(e){i=!1,s()}}}function Qy(e){let t=null,i=null;return D(()=>{t=fe.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")}),i=ye.subscribe(e=>{void 0!==e&&window.parent.postMessage(e,\\\"*\\\")})}),P(()=>{t&&t(),i&&i()}),[e=>{if(e.source===window.parent&&\\\"type\\\"in e.data)if(\\\"kernelmsg\\\"===e.data.type){let t=e.data;ge.set(t)}else if(\\\"init_state\\\"===e.data.type){let t=e.data;ye.set(t);const i={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"ClientReadyMessage\\\"})};fe.set(i)}}]}class Jy extends se{constructor(e){super(),ie(this,e,Qy,Ky,r,{})}}function Zy(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ev(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tv(e){let t,i,s;function n(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<0?n=t+1:r=t}while(n<r)}return n}return 2!==e.length?(t=Zy,i=(t,i)=>Zy(e(t),i),s=(t,i)=>e(t)-i):(t=e===Zy||e===ev?e:iv,i=e,s=e),{left:n,center:function(e,t,i=0,r=e.length){const a=n(e,t,i,r-1);return a>i&&s(e[a-1],t)>-s(e[a],t)?a-1:a},right:function(e,s,n=0,r=e.length){if(n<r){if(0!==t(s,s))return r;do{const t=n+r>>>1;i(e[t],s)<=0?n=t+1:r=t}while(n<r)}return n}}}function iv(){return 0}const sv=tv(Zy).right;tv(function(e){return null===e?NaN:+e}).center;const nv=Math.sqrt(50),rv=Math.sqrt(10),av=Math.sqrt(2);function ov(e,t,i){const s=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(s)),r=s/Math.pow(10,n),a=r>=nv?10:r>=rv?5:r>=av?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=i&&i<2?ov(e,t,2*i):[o,l,c]}function lv(e,t,i){return ov(e=+e,t=+t,i=+i)[2]}function cv(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dv(e){return+e}var uv=[0,1];function hv(e){return e}function pv(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i});var i}function mv(e,t,i){var s=e[0],n=e[1],r=t[0],a=t[1];return n<s?(s=pv(n,s),r=i(a,r)):(s=pv(s,n),r=i(r,a)),function(e){return r(s(e))}}function gv(e,t,i){var s=Math.min(e.length,t.length)-1,n=new Array(s),r=new Array(s),a=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<s;)n[a]=pv(e[a],e[a+1]),r[a]=i(t[a],t[a+1]);return function(t){var i=sv(e,t,1,s)-1;return r[i](n[i](t))}}function fv(){var e,t,i,s,n,r,a=uv,o=uv,l=_y,c=hv;function d(){var e=Math.min(a.length,o.length);return c!==hv&&(c=function(e,t){var i;return e>t&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(a[0],a[e-1])),s=e>2?gv:mv,n=r=null,u}function u(t){return null==t||isNaN(t=+t)?i:(n||(n=s(a.map(e),o,l)))(e(c(t)))}return u.invert=function(i){return c(t((r||(r=s(o,a.map(e),gy)))(i)))},u.domain=function(e){return arguments.length?(a=Array.from(e,dv),d()):a.slice()},u.range=function(e){return arguments.length?(o=Array.from(e),d()):o.slice()},u.rangeRound=function(e){return o=Array.from(e),l=Ty,d()},u.clamp=function(e){return arguments.length?(c=!!e||hv,d()):c!==hv},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(i=e,u):i},function(i,s){return e=i,t=s,d()}}function yv(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(\\\"e\\\"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function vv(e){return(e=yv(Math.abs(e)))?e[1]:NaN}var bv,_v=/^(?:(.)?([<>=^]))?([+\\\\-( ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.\\\\d+)?(~)?([a-z%])?$/i;function Tv(e){if(!(t=_v.exec(e)))throw new Error(\\\"invalid format: \\\"+e);var t;return new Sv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sv(e){this.fill=void 0===e.fill?\\\" \\\":e.fill+\\\"\\\",this.align=void 0===e.align?\\\">\\\":e.align+\\\"\\\",this.sign=void 0===e.sign?\\\"-\\\":e.sign+\\\"\\\",this.symbol=void 0===e.symbol?\\\"\\\":e.symbol+\\\"\\\",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?\\\"\\\":e.type+\\\"\\\"}function wv(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1];return n<0?\\\"0.\\\"+new Array(-n).join(\\\"0\\\")+s:s.length>n+1?s.slice(0,n+1)+\\\".\\\"+s.slice(n+1):s+new Array(n-s.length+2).join(\\\"0\\\")}Tv.prototype=Sv.prototype,Sv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\\\"0\\\":\\\"\\\")+(void 0===this.width?\\\"\\\":Math.max(1,0|this.width))+(this.comma?\\\",\\\":\\\"\\\")+(void 0===this.precision?\\\"\\\":\\\".\\\"+Math.max(0,0|this.precision))+(this.trim?\\\"~\\\":\\\"\\\")+this.type};var kv={\\\"%\\\":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+\\\"\\\",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(\\\"en\\\").replace(/,/g,\\\"\\\"):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wv(100*e,t),r:wv,s:function(e,t){var i=yv(e,t);if(!i)return e+\\\"\\\";var s=i[0],n=i[1],r=n-(bv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=s.length;return r===a?s:r>a?s+new Array(r-a+1).join(\\\"0\\\"):r>0?s.slice(0,r)+\\\".\\\"+s.slice(r):\\\"0.\\\"+new Array(1-r).join(\\\"0\\\")+yv(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xv(e){return e}var Ev,Cv,Av,Iv=Array.prototype.map,jv=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"µ\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"];function Dv(e){var t,i,s=void 0===e.grouping||void 0===e.thousands?xv:(t=Iv.call(e.grouping,Number),i=e.thousands+\\\"\\\",function(e,s){for(var n=e.length,r=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),r.push(e.substring(n-=o,n+o)),!((l+=o+1)>s));)o=t[a=(a+1)%t.length];return r.reverse().join(i)}),n=void 0===e.currency?\\\"\\\":e.currency[0]+\\\"\\\",r=void 0===e.currency?\\\"\\\":e.currency[1]+\\\"\\\",a=void 0===e.decimal?\\\".\\\":e.decimal+\\\"\\\",o=void 0===e.numerals?xv:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Iv.call(e.numerals,String)),l=void 0===e.percent?\\\"%\\\":e.percent+\\\"\\\",c=void 0===e.minus?\\\"−\\\":e.minus+\\\"\\\",d=void 0===e.nan?\\\"NaN\\\":e.nan+\\\"\\\";function u(e){var t=(e=Tv(e)).fill,i=e.align,u=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,f=e.precision,y=e.trim,v=e.type;\\\"n\\\"===v?(g=!0,v=\\\"g\\\"):kv[v]||(void 0===f&&(f=12),y=!0,v=\\\"g\\\"),(p||\\\"0\\\"===t&&\\\"=\\\"===i)&&(p=!0,t=\\\"0\\\",i=\\\"=\\\");var b=\\\"$\\\"===h?n:\\\"#\\\"===h&&/[boxX]/.test(v)?\\\"0\\\"+v.toLowerCase():\\\"\\\",_=\\\"$\\\"===h?r:/[%p]/.test(v)?l:\\\"\\\",T=kv[v],S=/[defgprs%]/.test(v);function w(e){var n,r,l,h=b,w=_;if(\\\"c\\\"===v)w=T(e)+w,e=\\\"\\\";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:T(Math.abs(e),f),y&&(e=function(e){e:for(var t,i=e.length,s=1,n=-1;s<i;++s)switch(e[s]){case\\\".\\\":n=t=s;break;case\\\"0\\\":0===n&&(n=s),t=s;break;default:if(!+e[s])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0===+e&&\\\"+\\\"!==u&&(k=!1),h=(k?\\\"(\\\"===u?u:c:\\\"-\\\"===u||\\\"(\\\"===u?\\\"\\\":u)+h,w=(\\\"s\\\"===v?jv[8+bv/3]:\\\"\\\")+w+(k&&\\\"(\\\"===u?\\\")\\\":\\\"\\\"),S)for(n=-1,r=e.length;++n<r;)if(48>(l=e.charCodeAt(n))||l>57){w=(46===l?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}g&&!p&&(e=s(e,1/0));var x=h.length+e.length+w.length,E=x<m?new Array(m-x+1).join(t):\\\"\\\";switch(g&&p&&(e=s(E+e,E.length?m-w.length:1/0),E=\\\"\\\"),i){case\\\"<\\\":e=h+e+w+E;break;case\\\"=\\\":e=h+E+e+w;break;case\\\"^\\\":e=E.slice(0,x=E.length>>1)+h+e+w+E.slice(x);break;default:e=E+h+e+w}return o(e)}return f=void 0===f?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return e+\\\"\\\"},w}return{format:u,formatPrefix:function(e,t){var i=u(((e=Tv(e)).type=\\\"f\\\",e)),s=3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3))),n=Math.pow(10,-s),r=jv[8+s/3];return function(e){return i(n*e)+r}}}}function Pv(e,t,i,s){var n,r=function(e,t,i){i=+i;const s=(t=+t)<(e=+e),n=s?lv(t,e,i):lv(e,t,i);return(s?-1:1)*(n<0?1/-n:n)}(e,t,i);switch((s=Tv(null==s?\\\",f\\\":s)).type){case\\\"s\\\":var a=Math.max(Math.abs(e),Math.abs(t));return null!=s.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vv(t)/3)))-vv(Math.abs(e)))}(r,a))||(s.precision=n),Av(s,a);case\\\"\\\":case\\\"e\\\":case\\\"g\\\":case\\\"p\\\":case\\\"r\\\":null!=s.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vv(t)-vv(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(s.precision=n-(\\\"e\\\"===s.type));break;case\\\"f\\\":case\\\"%\\\":null!=s.precision||isNaN(n=function(e){return Math.max(0,-vv(Math.abs(e)))}(r))||(s.precision=n-2*(\\\"%\\\"===s.type))}return Cv(s)}function Lv(e){var t=e.domain;return e.ticks=function(e){var i=t();return function(e,t,i){if(!((i=+i)>0))return[];if((e=+e)===(t=+t))return[e];const s=t<e,[n,r,a]=s?ov(t,e,i):ov(e,t,i);if(!(r>=n))return[];const o=r-n+1,l=new Array(o);if(s)if(a<0)for(let e=0;e<o;++e)l[e]=(r-e)/-a;else for(let e=0;e<o;++e)l[e]=(r-e)*a;else if(a<0)for(let e=0;e<o;++e)l[e]=(n+e)/-a;else for(let e=0;e<o;++e)l[e]=(n+e)*a;return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var s=t();return Pv(s[0],s[s.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var s,n,r=t(),a=0,o=r.length-1,l=r[a],c=r[o],d=10;for(c<l&&(n=l,l=c,c=n,n=a,a=o,o=n);d-- >0;){if((n=lv(l,c,i))===s)return r[a]=l,r[o]=c,t(r);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}s=n}return e},e}function Ov(){var e=fv()(hv,hv);return e.copy=function(){return t=e,Ov().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},cv.apply(e,arguments),Lv(e)}function Nv(t){let i,s,n,r,a,o;return{c(){i=f(\\\"div\\\"),s=y(\\\"svg\\\"),n=y(\\\"g\\\"),r=y(\\\"path\\\"),S(r,\\\"d\\\",a=t[3].map(Mv).join(\\\" \\\")),S(r,\\\"fill\\\",\\\"none\\\"),S(r,\\\"stroke-width\\\",\\\"1.25\\\"),S(r,\\\"stroke\\\",\\\"#374151\\\"),S(r,\\\"class\\\",\\\"stroke-gray-700 dark:stroke-gray-300\\\"),S(s,\\\"class\\\",t[0]),S(i,\\\"class\\\",\\\"inline-block font-medium text-gray-700 dark:text-gray-300\\\"),F(()=>t[9].call(i))},m(e,a){p(e,i,a),h(i,s),h(s,n),h(n,r),o=function(e,t){\\\"static\\\"===getComputedStyle(e).position&&(e.style.position=\\\"relative\\\");const i=f(\\\"iframe\\\");i.setAttribute(\\\"style\\\",\\\"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;\\\"),i.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),i.tabIndex=-1;const s=A();let n;return s?(i.src=\\\"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\\\\/script>\\\",n=T(window,\\\"message\\\",e=>{e.source===i.contentWindow&&t()})):(i.src=\\\"about:blank\\\",i.onload=()=>{n=T(i.contentWindow,\\\"resize\\\",t),t()}),h(e,i),()=>{(s||n&&i.contentWindow)&&n(),m(i)}}(i,t[9].bind(i))},p(e,[t]){8&t&&a!==(a=e[3].map(Mv).join(\\\" \\\"))&&S(r,\\\"d\\\",a),1&t&&S(s,\\\"class\\\",e[0])},i:e,o:e,d(e){e&&m(i),o()}}}Ev=Dv({thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"]}),Cv=Ev.format,Av=Ev.formatPrefix;const Mv=(e,t)=>`${0===t?\\\"M\\\":\\\"L\\\"} ${e.x} ${e.y}`;function Rv(e,t,i){let s,n,r,a,{values:o}=t,{svgClass:l}=t,{padding:c={left:0,right:0,top:0,bottom:0}}=t,d=0,u=0;return e.$$set=e=>{\\\"values\\\"in e&&i(4,o=e.values),\\\"svgClass\\\"in e&&i(0,l=e.svgClass),\\\"padding\\\"in e&&i(5,c=e.padding)},e.$$.update=()=>{16&e.$$.dirty&&i(8,s=o),292&e.$$.dirty&&i(7,n=Ov().domain([0,s.length-1]).range([c.left,c.left+u-c.right])),34&e.$$.dirty&&i(6,r=Ov().domain([0,1]).range([d-c.bottom,c.top])),448&e.$$.dirty&&i(3,a=s.map((e,t)=>({x:n(t),y:r(e)})))},[l,d,u,a,o,c,r,n,s,function(){d=this.clientHeight,u=this.clientWidth,i(1,d),i(2,u)}]}class Uv extends se{constructor(e){super(),ie(this,e,Rv,Nv,r,{values:4,svgClass:0,padding:5})}}function Bv(t){let i,s,n,r,a=t[0].name+\\\"\\\";function o(e,t){return\\\"number\\\"==typeof e[1]?$v:qv}let l=o(t),d=l(t);return{c(){i=f(\\\"span\\\"),s=v(a),n=b(),d.c(),r=_(),S(i,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,t){p(e,i,t),h(i,s),p(e,n,t),d.m(e,t),p(e,r,t)},p(e,t){1&t&&a!==(a=e[0].name+\\\"\\\")&&w(s,a),l===(l=o(e))&&d?d.p(e,t):(d.d(1),d=l(e),d&&(d.c(),d.m(r.parentNode,r)))},i:e,o:e,d(e){e&&(m(i),m(n),m(r)),d.d(e)}}}function Fv(e){let t,i,s,n,r,a=e[0].name+\\\"\\\";return n=new Uv({props:{values:e[1],svgClass:\\\"w-8 h-4 inline\\\",padding:e[2]}}),{c(){t=f(\\\"span\\\"),i=v(a),s=b(),J(n.$$.fragment),S(t,\\\"class\\\",c(\\\"text-gray-600 dark:text-gray-400 whitespace-nowrap pr-[0.125rem]\\\")+\\\" svelte-nqv7fo\\\")},m(e,a){p(e,t,a),h(t,i),p(e,s,a),Z(n,e,a),r=!0},p(e,t){(!r||1&t)&&a!==(a=e[0].name+\\\"\\\")&&w(i,a);const s={};2&t&&(s.values=e[1]),n.$set(s)},i(e){r||(Y(n.$$.fragment,e),r=!0)},o(e){K(n.$$.fragment,e),r=!1},d(e){e&&(m(t),m(s)),ee(n,e)}}}function qv(e){let t,i,s,n=\\\"\\\"!==e[0].units&&zv(e);return{c(){t=f(\\\"span\\\"),i=v(e[1]),s=b(),n&&n.c(),S(t,\\\"class\\\",c(\\\"font-medium text-center text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,r){p(e,t,r),h(t,i),h(t,s),n&&n.m(t,null)},p(e,s){2&s&&w(i,e[1]),\\\"\\\"!==e[0].units?n?n.p(e,s):(n=zv(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&m(t),n&&n.d()}}}function $v(e){let t,i,s,n=e[1].toFixed(e[0].precision)+\\\"\\\",r=\\\"\\\"!==e[0].units&&Hv(e);return{c(){t=f(\\\"span\\\"),i=v(n),s=b(),r&&r.c(),S(t,\\\"class\\\",c(\\\"font-medium text-gray-700 dark:text-gray-300 \\\")+\\\" svelte-nqv7fo\\\")},m(e,n){p(e,t,n),h(t,i),h(t,s),r&&r.m(t,null)},p(e,s){3&s&&n!==(n=e[1].toFixed(e[0].precision)+\\\"\\\")&&w(i,n),\\\"\\\"!==e[0].units?r?r.p(e,s):(r=Hv(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&m(t),r&&r.d()}}}function zv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Hv(e){let t,i,s=e[0].units+\\\"\\\";return{c(){t=f(\\\"span\\\"),i=v(s),S(t,\\\"class\\\",\\\"\\\")},m(e,s){p(e,t,s),h(t,i)},p(e,t){1&t&&s!==(s=e[0].units+\\\"\\\")&&w(i,s)},d(e){e&&m(t)}}}function Vv(e){let t,i,s,n,r,a;const o=[Fv,Bv],l=[];function d(e,t){return e[1].constructor===Array?0:1}return s=d(e),n=l[s]=o[s](e),{c(){t=f(\\\"span\\\"),i=f(\\\"span\\\"),n.c(),S(t,\\\"class\\\",c(\\\"dot-divider flex items-center text-xs whitespace-nowrap px-1\\\")+\\\" svelte-nqv7fo\\\"),S(t,\\\"title\\\",r=e[0].description)},m(e,n){p(e,t,n),h(t,i),l[s].m(i,null),a=!0},p(e,[c]){let u=s;s=d(e),s===u?l[s].p(e,c):(G(),K(l[u],1,1,()=>{l[u]=null}),X(),n=l[s],n?n.p(e,c):(n=l[s]=o[s](e),n.c()),Y(n,1),n.m(i,null)),(!a||1&c&&r!==(r=e[0].description))&&S(t,\\\"title\\\",r)},i(e){a||(Y(n),a=!0)},o(e){K(n),a=!1},d(e){e&&m(t),l[s].d()}}}function Wv(e,t,i){let{metricDef:s}=t,{value:n}=t;return e.$$set=e=>{\\\"metricDef\\\"in e&&i(0,s=e.metricDef),\\\"value\\\"in e&&i(1,n=e.value)},[s,n,{left:0,right:0,top:5,bottom:3}]}ne('.dot-divider.svelte-nqv7fo.svelte-nqv7fo:not(:last-child):after{color:#d1d5db;content:\\\"•\\\"}.dark.svelte-nqv7fo .dot-divider.svelte-nqv7fo:not(:last-child):after{color:#6b7280;margin-left:.5rem}');class Gv extends se{constructor(e){super(),ie(this,e,Wv,Vv,r,{metricDef:0,value:1})}}function Xv(e){var t=function(t){var i=t.target;e.contains(i)||e.dispatchEvent(new CustomEvent(\\\"outclick\\\"))};return document.addEventListener(\\\"click\\\",t,!0),{destroy:function(){document.removeEventListener(\\\"click\\\",t,!0)}}}function Yv(e,t,i){const s=e.slice();return s[10]=t[i],s[12]=i,s}function Kv(e){let t,i=Q(e[1]),s=[];for(let t=0;t<i.length;t+=1)s[t]=Qv(Yv(e,i,t));return{c(){t=f(\\\"ul\\\");for(let e=0;e<s.length;e+=1)s[e].c();S(t,\\\"role\\\",\\\"listbox\\\"),S(t,\\\"class\\\",\\\"absolute pt-2 pb-3 z-10 mt-1 bg-white dark:bg-[#5A5F72] shadow border border-gray-300 dark:border-gray-600\\\")},m(e,i){p(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null)},p(e,n){if(66&n){let r;for(i=Q(e[1]),r=0;r<i.length;r+=1){const a=Yv(e,i,r);s[r]?s[r].p(a,n):(s[r]=Qv(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(e){e&&m(t),g(s,e)}}}function Qv(e){let t,i,n,r,a=e[10]+\\\"\\\";function o(...t){return e[8](e[10],...t)}return{c(){t=f(\\\"li\\\"),i=v(a),S(t,\\\"class\\\",`w-full px-4 py-1 ${0===e[12]?\\\"mt-1\\\":\\\"\\\"} hover:bg-gray-700 hover:text-white dark:hover:bg-gray-600 dark:hover:text-white dark:text-white text-nowrap`),S(t,\\\"role\\\",\\\"option\\\"),S(t,\\\"aria-selected\\\",\\\"false\\\")},m(e,s){p(e,t,s),h(t,i),n||(r=[T(t,\\\"click\\\",o),T(t,\\\"keypress\\\",Zv)],n=!0)},p(t,s){e=t,2&s&&a!==(a=e[10]+\\\"\\\")&&w(i,a)},d(e){e&&m(t),n=!1,s(r)}}}function Jv(t){let i,n,r,a,o,l,c,u,g,_,k,x,E=t[3]&&Kv(t);return{c(){i=f(\\\"div\\\"),n=f(\\\"button\\\"),r=f(\\\"span\\\"),a=f(\\\"span\\\"),o=v(t[2]),l=b(),c=y(\\\"svg\\\"),u=y(\\\"path\\\"),_=b(),E&&E.c(),S(a,\\\"class\\\",\\\"\\\"),S(u,\\\"fill-rule\\\",\\\"evenodd\\\"),S(u,\\\"d\\\",\\\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\\\"),S(u,\\\"clip-rule\\\",\\\"evenodd\\\"),S(c,\\\"xmlns\\\",\\\"http://www.w3.org/2000/svg\\\"),S(c,\\\"viewBox\\\",\\\"0 0 16 16\\\"),S(c,\\\"fill\\\",\\\"currentColor\\\"),S(c,\\\"class\\\",\\\"size-4\\\"),S(r,\\\"class\\\",g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${t[0]}`),S(i,\\\"class\\\",\\\"relative\\\")},m(e,s){p(e,i,s),h(i,n),h(n,r),h(r,a),h(a,o),h(r,l),h(r,c),h(c,u),h(i,_),E&&E.m(i,null),k||(x=[d(Xv.call(null,n)),T(n,\\\"click\\\",t[4]),d(Xv.call(null,i)),T(i,\\\"outclick\\\",t[5])],k=!0)},p(e,[t]){4&t&&w(o,e[2]),1&t&&g!==(g=`mr-4 inline-flex justify-between items-center hover:bg-gray-700 hover:text-white dark:hover:bg-transparent dark:hover:text-white dark:text-white ${e[0]}`)&&S(r,\\\"class\\\",g),e[3]?E?E.p(e,t):(E=Kv(e),E.c(),E.m(i,null)):E&&(E.d(1),E=null)},i:e,o:e,d(e){e&&m(i),E&&E.d(),k=!1,s(x)}}}const Zv=e=>{};function eb(e,t,i){let{classes:s=\\\"\\\"}=t,{values:n=[]}=t,{defaultValue:r=\\\"\\\"}=t,a=r,o=!1;const l=L(),c=e=>{i(2,a=e),i(3,o=!1),l(\\\"select\\\",a)};return e.$$set=e=>{\\\"classes\\\"in e&&i(0,s=e.classes),\\\"values\\\"in e&&i(1,n=e.values),\\\"defaultValue\\\"in e&&i(7,r=e.defaultValue)},[s,n,a,o,e=>{i(3,o=!o)},e=>{i(3,o=!1)},c,r,(e,t)=>c(e)]}class tb extends se{constructor(e){super(),ie(this,e,eb,Jv,r,{classes:0,values:1,defaultValue:7})}}var ib={status:{name:\\\"\\\",units:\\\"\\\",description:\\\"Determines whether engine is running, completed or in error.\\\",isScalar:!0,precision:0},cpu:{name:\\\"CPU\\\",units:\\\"%\\\",description:\\\"Average utilization across CPU cores.\\\",isScalar:!1,precision:1},gpu:{name:\\\"GPU\\\",units:\\\"%\\\",description:\\\"Average utilization across GPUs.\\\",isScalar:!1,precision:1},ram:{name:\\\"RAM\\\",units:\\\"GB\\\",description:\\\"Utilization of RAM.\\\",isScalar:!0,precision:1},vram:{name:\\\"VRAM\\\",units:\\\"GB\\\",description:\\\"Utilization of video RAM.\\\",isScalar:!0,precision:1},\\\"wall time\\\":{name:\\\"Time\\\",units:\\\"s\\\",description:\\\"Time taken from initial display to engine completion.\\\",isScalar:!0,precision:1},\\\"avg latency\\\":{name:\\\"Latency\\\",units:\\\"ms\\\",description:\\\"Average roundtrip latency per token\\\",isScalar:!0,precision:0},consumed:{name:\\\"Used\\\",units:\\\"tkn\\\",description:\\\"Total tokens consumed by language model.\\\",isScalar:!0,precision:0},\\\"token reduction\\\":{name:\\\"Reduced\\\",units:\\\"%\\\",description:\\\"Total tokens consumed by language model divided by total tokens.\\\",isScalar:!0,precision:0}};const{document:sb}=u;function nb(e,t,i){const s=e.slice();return s[10]=t[i],s}function rb(e){let t,i;return t=new Gv({props:{value:e[0].metrics[e[10]],metricDef:ib[e[10]]}}),{c(){J(t.$$.fragment)},m(e,s){Z(t,e,s),i=!0},p(e,i){const s={};1&i&&(s.value=e[0].metrics[e[10]]),1&i&&(s.metricDef=ib[e[10]]),t.$set(s)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){K(t.$$.fragment,e),i=!1},d(e){ee(t,e)}}}function ab(e){let t,i,s,n,r,a,o,l,c,d,u,y,v,_,T,w,k,x,E,C;s=new Jy({}),r=new Xy({}),y=new tb({props:{values:[\\\"None\\\",\\\"Type\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"ml-4 pl-1 bg-gray-200 dark:bg-transparent\\\",defaultValue:\\\"Type\\\"}}),y.$on(\\\"select\\\",e[6]),_=new tb({props:{values:[\\\"None\\\",\\\"Probability\\\",\\\"Latency (ms)\\\"],classes:\\\"border-b-2 pl-1 border-gray-400 dark:border-gray-500 bg-transparent dark:bg-transparent\\\",defaultValue:\\\"Probability\\\"}}),_.$on(\\\"select\\\",e[7]);let A=Q(e[0].shownMetrics),I=[];for(let t=0;t<A.length;t+=1)I[t]=rb(nb(e,A,t));const j=e=>K(I[e],1,1,()=>{I[e]=null});return E=new Wy({props:{components:e[0].components,isCompleted:[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status),isError:e[0].status===me.Error,bgField:e[2],underlineField:e[3],requireFullReplay:e[0].requireFullReplay,backtrackCount:e[0].backtrackCount,resetCount:e[0].resetCount,isDarkMode:e[1]}}),{c(){t=f(\\\"meta\\\"),i=b(),J(s.$$.fragment),n=b(),J(r.$$.fragment),a=b(),o=f(\\\"div\\\"),l=f(\\\"nav\\\"),c=f(\\\"section\\\"),d=f(\\\"div\\\"),u=f(\\\"span\\\"),J(y.$$.fragment),v=b(),J(_.$$.fragment),T=b(),w=f(\\\"span\\\");for(let e=0;e<I.length;e+=1)I[e].c();k=b(),x=f(\\\"section\\\"),J(E.$$.fragment),sb.title=\\\"graphpaper\\\",S(t,\\\"name\\\",\\\"description\\\"),S(t,\\\"content\\\",\\\"graphpaper\\\"),S(u,\\\"class\\\",\\\"flex mr-2\\\"),S(w,\\\"class\\\",\\\"flex mr-4 text-gray-300 dark:text-gray-400\\\"),S(d,\\\"class\\\",\\\"text-sm pt-2 pb-2 flex justify-between border-b border-gray-200 dark:border-gray-700\\\"),S(c,\\\"class\\\",\\\"\\\"),S(l,\\\"class\\\",\\\"sticky top-0 z-50 bg-white dark:bg-gray-900\\\"),S(x,\\\"class\\\",\\\"w-full min-h-40\\\"),S(o,\\\"class\\\",\\\"w-full\\\")},m(e,m){h(sb.head,t),p(e,i,m),Z(s,e,m),p(e,n,m),Z(r,e,m),p(e,a,m),p(e,o,m),h(o,l),h(l,c),h(c,d),h(d,u),Z(y,u,null),h(u,v),Z(_,u,null),h(d,T),h(d,w);for(let e=0;e<I.length;e+=1)I[e]&&I[e].m(w,null);h(o,k),h(o,x),Z(E,x,null),C=!0},p(e,[t]){if(1&t){let i;for(A=Q(e[0].shownMetrics),i=0;i<A.length;i+=1){const s=nb(e,A,i);I[i]?(I[i].p(s,t),Y(I[i],1)):(I[i]=rb(s),I[i].c(),Y(I[i],1),I[i].m(w,null))}for(G(),i=A.length;i<I.length;i+=1)j(i);X()}const i={};1&t&&(i.components=e[0].components),1&t&&(i.isCompleted=[\\\"Done\\\",\\\"Error\\\"].includes(e[0].status)),1&t&&(i.isError=e[0].status===me.Error),4&t&&(i.bgField=e[2]),8&t&&(i.underlineField=e[3]),1&t&&(i.requireFullReplay=e[0].requireFullReplay),1&t&&(i.backtrackCount=e[0].backtrackCount),1&t&&(i.resetCount=e[0].resetCount),2&t&&(i.isDarkMode=e[1]),E.$set(i)},i(e){if(!C){Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(y.$$.fragment,e),Y(_.$$.fragment,e);for(let e=0;e<A.length;e+=1)Y(I[e]);Y(E.$$.fragment,e),C=!0}},o(e){K(s.$$.fragment,e),K(r.$$.fragment,e),K(y.$$.fragment,e),K(_.$$.fragment,e),I=I.filter(Boolean);for(let e=0;e<I.length;e+=1)K(I[e]);K(E.$$.fragment,e),C=!1},d(e){e&&(m(i),m(n),m(a),m(o)),m(t),ee(s,e),ee(r,e),ee(y),ee(_),g(I,e),ee(E)}}}function ob(e,t,i){let s,n;l(e,ge,e=>i(4,s=e)),l(e,ye,e=>i(5,n=e));let r=!1,a={components:[],status:me.Running,shownMetrics:[],metrics:{status:me.Running,\\\"wall time\\\":0,consumed:0,\\\"token reduction\\\":0,\\\"avg latency\\\":0,cpu:[0,0,0,0,0],gpu:[0,0,0,0,0],ram:0,vram:0},requireFullReplay:!0,currentMessageId:-1,backtrackCount:0,resetCount:0},o=\\\"Type\\\",c=\\\"Probability\\\";let d=()=>{if(0===a.components.length){console.log(\\\"No messages received: requesting output.\\\");const e={type:\\\"clientmsg\\\",content:JSON.stringify({class_name:\\\"OutputRequestMessage\\\",identifier:\\\"\\\"})};fe.set(e)}};D(()=>{fe.set({type:\\\"init_stitch\\\",content:\\\"\\\"}),setTimeout(d,400);const e=e=>{var t,s;\\\"theme\\\"===(null===(t=e.data)||void 0===t?void 0:t.type)&&\\\"dark\\\"===(null===(s=e.data)||void 0===s?void 0:s.theme)&&(i(1,r=!0),document.documentElement.classList.add(\\\"dark\\\"),console.log(\\\"[Guidance Widget] ✅ Dark mode applied via postMessage\\\"))};return window.addEventListener(\\\"message\\\",e),()=>{window.removeEventListener(\\\"message\\\",e)}});return e.$$.update=()=>{if(32&e.$$.dirty&&void 0!==n&&\\\"\\\"!==n.content&&i(0,a=JSON.parse(n.content)),16&e.$$.dirty&&void 0!==s&&\\\"\\\"!==s.content){(e=>{if(a.currentMessageId!==e.message_id){if(i(0,a.currentMessageId=e.message_id,a),null!=(t=e)&&\\\"TraceMessage\\\"===t.class_name){if(de(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ce(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(oe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(le(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(he(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(ue(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(pe(e.node_attr))i(0,a.components=[...a.components,e.node_attr],a);else if(function(e){return null!=e&&\\\"Backtrack\\\"===e.class_name}(e.node_attr)){let t=e.node_attr.n_tokens;console.log(`Backtracking ${t} tokens.`),i(0,a.components=a.components.slice(0,-t),a),i(0,a.backtrackCount+=1,a)}}else if(function(e){return null!=e&&\\\"ExecutionStartedMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"OutputRequestAckMessage\\\"===e.class_name}(e))i(0,a.requireFullReplay=!1,a);else if(function(e){return null!=e&&\\\"ClientReadyAckMessage\\\"===e.class_name}(e));else if(function(e){return null!=e&&\\\"ResetDisplayMessage\\\"===e.class_name}(e))i(0,a.components=[],a),i(0,a.status=a.status!==me.Error?me.Running:a.status,a),i(0,a.backtrackCount=0,a),i(0,a.resetCount+=1,a);else if(function(e){return null!=e&&\\\"MetricMessage\\\"===e.class_name}(e)){const t=e.name,s=e.value;if(t in a.metrics&&t in ib){let e=a.metrics[t];const n=ib[t];!1===n.isScalar?s.constructor===Array?i(0,a.metrics[t]=s,a):i(0,a.metrics[t]=[...e.slice(1),s],a):!0===n.isScalar?i(0,a.metrics[t]=s,a):console.error(`Cannot handle metric: ${t}: ${s}.`),\\\"status\\\"===t&&i(0,a.status=s,a)}}else if(function(e){return null!=e&&\\\"ExecutionCompletedMessage\\\"===e.class_name}(e)){i(0,a.status=me.Done,a);const e={type:\\\"state\\\",content:JSON.stringify(a)};ye.set(e)}var t;i(0,a=Object.assign({},a))}else console.log(`Duplicate message detected: ${e.message_id}`)})(JSON.parse(s.content))}1&e.$$.dirty&&(a.status===me.Running?i(0,a.shownMetrics=[\\\"status\\\",\\\"cpu\\\",\\\"ram\\\",\\\"gpu\\\",\\\"vram\\\"],a):i(0,a.shownMetrics=[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],a))},[a,r,o,c,s,n,e=>i(2,o=e.detail),e=>i(3,c=e.detail)]}return new class extends se{constructor(e){super(),ie(this,e,ob,ab,r,{})}}({target:document.body})}();\\n</script>\\n</body>\\n</html>\\n\",\n       \"state\": \"{\\\"components\\\":[{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>user\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"If Johnny has 5 apples and gives 2 to Mary, how many apples does he have left?\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"user\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"<tool=calculator>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"-\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"</tool>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"\\\\n<tool_result=calculator>3</tool_result>\\\",\\\"is_input\\\":false,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"class_name\\\":\\\"RoleCloserInput\\\"},{\\\"name\\\":\\\"assistant\\\",\\\"text\\\":null,\\\"closer_text\\\":null,\\\"class_name\\\":\\\"RoleOpenerInput\\\"},{\\\"value\\\":\\\"<|im_start|>assistant\\\\n\\\",\\\"is_input\\\":true,\\\"is_generated\\\":false,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"Johnny\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2579689025878906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" has\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.3440380096435547,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4100799560546875,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2777576446533203,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" apples\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2770423889160156,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" left\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.141143798828125,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\".\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.14400482177734375,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" (\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.12803077697753906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"5\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.13899803161621094,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" −\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.12183189392089844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.33402442932128906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"2\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.12803077697753906,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" =\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.4010200500488281,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\" \\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.15997886657714844,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\"3\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.9782314300537109,\\\"class_name\\\":\\\"TextOutput\\\"},{\\\"value\\\":\\\")\\\",\\\"is_input\\\":false,\\\"is_generated\\\":true,\\\"is_force_forwarded\\\":false,\\\"latency_ms\\\":0.2627372741699219,\\\"class_name\\\":\\\"TextOutput\\\"}],\\\"status\\\":\\\"Done\\\",\\\"shownMetrics\\\":[\\\"status\\\",\\\"consumed\\\",\\\"token reduction\\\",\\\"avg latency\\\"],\\\"metrics\\\":{\\\"status\\\":\\\"Done\\\",\\\"wall time\\\":0,\\\"consumed\\\":110,\\\"token reduction\\\":0,\\\"avg latency\\\":0.4344571720470082,\\\"cpu\\\":[0,0,0,0,0],\\\"gpu\\\":[0,0,0,0,0],\\\"ram\\\":0,\\\"vram\\\":0},\\\"requireFullReplay\\\":false,\\\"currentMessageId\\\":132,\\\"backtrackCount\\\":0,\\\"resetCount\\\":5}\"\n      }\n     },\n     \"e4b8276a798b4603baf61d793b4916fb\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     },\n     \"f0e363ca0dce44f3bb1ffd9eb9371ad6\": {\n      \"model_module\": \"@jupyter-widgets/base\",\n      \"model_module_version\": \"2.0.0\",\n      \"model_name\": \"LayoutModel\",\n      \"state\": {}\n     }\n    },\n    \"version_major\": 2,\n    \"version_minor\": 0\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "notebooks/unstable/.gitignore",
    "content": "*\n!.gitignore"
  },
  {
    "path": "packages/python/stitch/.eslintignore",
    "content": "node_modules\ndist\ncoverage\n**/*.d.ts\ntests"
  },
  {
    "path": "packages/python/stitch/.eslintrc.js",
    "content": "module.exports = {\n  extends: [\n    'eslint:recommended',\n    'plugin:@typescript-eslint/eslint-recommended',\n    'plugin:@typescript-eslint/recommended',\n    'plugin:prettier/recommended'\n  ],\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    project: 'tsconfig.eslint.json',\n    sourceType: 'module'\n  },\n  plugins: ['@typescript-eslint'],\n  rules: {\n    '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],\n    '@typescript-eslint/no-explicit-any': 'off',\n    '@typescript-eslint/no-namespace': 'off',\n    '@typescript-eslint/no-use-before-define': 'off',\n    '@typescript-eslint/quotes': [\n      'error',\n      'single',\n      { avoidEscape: true, allowTemplateLiterals: false }\n    ],\n    curly: ['error', 'all'],\n    eqeqeq: 'error',\n    'prefer-arrow-callback': 'error'\n  }\n};"
  },
  {
    "path": "packages/python/stitch/.github/workflows/build.yml",
    "content": "name: Build\n\non:\n  push:\n    branches: main\n  pull_request:\n    branches: \"*\"\n\njobs:\n  build:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        python-version: [\"3.7\", \"3.10\"]\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n\n      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1\n\n      - name: Install dependencies\n        run: |\n          python -m pip install -U codecov\n          npm install -g codecov\n      - name: Test the extension\n        run: |\n          python -m pip install --upgrade -v -e \".[test, examples, docs]\"\n          python -m pytest\n          yarn run test\n\n      - name: Linting\n        if: ${{ matrix.os == 'ubuntu-latest' }}\n        run: |\n          yarn run lint:check\n\n      - name: Check docs can be build + links\n        if: ${{ matrix.os == 'ubuntu-latest' }}\n        working-directory: docs\n        run: |\n          sudo apt install -y pandoc\n          make html\n          python -m pytest --check-links\n"
  },
  {
    "path": "packages/python/stitch/.gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*,cover\n.hypothesis/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\n\n# Flask instance folder\ninstance/\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\ndocs/source/_static/embed-bundle.js\ndocs/source/_static/embed-bundle.js.map\n\n# PyBuilder\ntarget/\n\n# IPython Notebook\n.ipynb_checkpoints\n\n# pyenv\n.python-version\n\n# celery beat schedule file\ncelerybeat-schedule\n\n# dotenv\n.env\n\n# virtualenv\nvenv/\nENV/\n\n# Spyder project settings\n.spyderproject\n\n# Rope project settings\n.ropeproject\n\n# =========================\n# Operating System Files\n# =========================\n\n# OSX\n# =========================\n\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Thumbnails\n._*\n\n# Files that might appear in the root of a volume\n.DocumentRevisions-V100\n.fseventsd\n.Spotlight-V100\n.TemporaryItems\n.Trashes\n.VolumeIcon.icns\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n# Windows\n# =========================\n\n# Windows image file caches\nThumbs.db\nehthumbs.db\n\n# Folder config file\nDesktop.ini\n\n# Recycle Bin used on file shares\n$RECYCLE.BIN/\n\n# Windows Installer files\n*.cab\n*.msi\n*.msm\n*.msp\n\n# Windows shortcuts\n*.lnk\n\n\n# NPM\n# ----\n\n**/node_modules/\nstitch/nbextension/index.*\n.yarn/\n\n# Coverage data\n# -------------\n**/coverage/\n\n# Packed lab extensions\nstitch/labextension\n"
  },
  {
    "path": "packages/python/stitch/.npmignore",
    "content": ".DS_Store\nnode_modules/\ntests/\n.jshintrc\n# Ignore any build output from python:\ndist/*.tar.gz\ndist/*.wheel\n"
  },
  {
    "path": "packages/python/stitch/MANIFEST.in",
    "content": "include LICENSE.txt\ninclude README.md\n\ninclude setup.py\ninclude pyproject.toml\ninclude pytest.ini\ninclude .coverage.rc\n\ninclude tsconfig.json\ninclude package.json\ninclude webpack.config.js\ninclude stitch/labextension/*.tgz\n\n# Documentation\ngraft docs\nexclude docs/\\#*\nprune docs/build\nprune docs/gh-pages\nprune docs/dist\n\n# Examples\ngraft examples\n\n# Tests\ngraft tests\nprune tests/build\n\n# Javascript files\ngraft stitch/nbextension\ngraft src\ngraft css\nprune **/node_modules\nprune coverage\nprune lib\n\n# Patterns to exclude from any directory\nglobal-exclude *~\nglobal-exclude *.pyc\nglobal-exclude *.pyo\nglobal-exclude .git\nglobal-exclude .ipynb_checkpoints\n"
  },
  {
    "path": "packages/python/stitch/stitch/tests/__init__.py",
    "content": ""
  },
  {
    "path": "tests/__init__.py",
    "content": ""
  },
  {
    "path": "tests/model_integration/__init__.py",
    "content": ""
  },
  {
    "path": "tests/model_specific/__init__.py",
    "content": ""
  },
  {
    "path": "tests/need_credentials/__init__.py",
    "content": ""
  },
  {
    "path": "tests/notebooks/__init__.py",
    "content": ""
  },
  {
    "path": "tests/unit/__init__.py",
    "content": ""
  },
  {
    "path": "tests/unit/library/__init__.py",
    "content": ""
  },
  {
    "path": "tests/unit/library/json/__init__.py",
    "content": ""
  }
]